commit 2bb47dd4ecbed579f3264906594524604f853fe1
parent 81a2512de388b92c5d1c1fc2cfd75cf4c81ad65b
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Thu, 19 Dec 2019 20:25:01 +0300
Add redict
Diffstat:
3 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/default.nix b/default.nix
@@ -14,4 +14,5 @@ in
gpxtools = callPackage ./pkgs/gpxtools { inherit (sources) gpxtools; };
gt4gd = python3Packages.callPackage ./pkgs/gt4gd { inherit (sources) google-translate-for-goldendict; };
mbutil = python3Packages.callPackage ./pkgs/mbutil { inherit (sources) mbutil; };
+ redict = libsForQt5.callPackage ./pkgs/redict { inherit (sources) redict; };
}
diff --git a/nix/sources.json b/nix/sources.json
@@ -94,5 +94,17 @@
"type": "tarball",
"url": "https://github.com/mapbox/mbutil/archive/2fc4161f9be890a65d07f5e7b2ed0c8a0a123ed6.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
+ },
+ "redict": {
+ "branch": "master",
+ "description": "A dictionary for Linux, based on C++/Qt development.",
+ "homepage": "",
+ "owner": "rekols",
+ "repo": "redict",
+ "rev": "525aac01ed5fc0f74f8393dc5b5b3bb57c9b0c5f",
+ "sha256": "1zlad1bmlyy4hirm93f0744c98y9hg11b32ym06rsax719qj2rjl",
+ "type": "tarball",
+ "url": "https://github.com/rekols/redict/archive/525aac01ed5fc0f74f8393dc5b5b3bb57c9b0c5f.tar.gz",
+ "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
diff --git a/pkgs/redict/default.nix b/pkgs/redict/default.nix
@@ -0,0 +1,33 @@
+{ mkDerivation, lib, pkgconfig, qmake, qtbase, qtmultimedia, qtsvg, qttools
+, qtx11extras, libX11, libXext, libXtst, redict }:
+
+mkDerivation rec {
+ pname = "redict";
+ version = lib.substring 0 7 src.rev;
+ src = redict;
+
+ nativeBuildInputs = [ qmake qttools pkgconfig ];
+ buildInputs =
+ [ qtbase qtmultimedia qtsvg qtx11extras libX11 libXext libXtst ];
+
+ preConfigure = ''
+ lupdate redict.pro
+ lrelease redict.pro
+ '';
+
+ qmakeFlags = [
+ "PREFIX=${placeholder "out"}"
+ "BINDIR=${placeholder "out"}/bin"
+ "APPDIR=${placeholder "out"}/share/applications"
+ ];
+
+ enableParallelBuilding = true;
+
+ meta = with lib; {
+ homepage = "https://github.com/rekols/redict";
+ description = redict.description;
+ license = licenses.gpl3;
+ maintainers = with maintainers; [ sikmir ];
+ platforms = platforms.linux;
+ };
+}