nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 4c224676cb4f712dabaf697553daff8663eb2b67
parent a9325e632b21446aad8c03602233391fa0cce490
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Fri, 20 Dec 2019 10:23:02 +0300

Add stardict-tools

Diffstat:
Mdefault.nix | 3+++
Mnix/sources.json | 12++++++++++++
Apkgs/stardict-tools/default.nix | 49+++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/default.nix b/default.nix @@ -34,4 +34,7 @@ in { redict = libsForQt5.callPackage ./pkgs/redict { inherit (sources) redict; }; + stardict-tools = callPackage ./pkgs/stardict-tools { + inherit (sources) stardict-3; + }; } diff --git a/nix/sources.json b/nix/sources.json @@ -118,5 +118,17 @@ "type": "tarball", "url": "https://github.com/rekols/redict/archive/525aac01ed5fc0f74f8393dc5b5b3bb57c9b0c5f.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" + }, + "stardict-3": { + "branch": "master", + "description": "Automatically exported from code.google.com/p/stardict-3", + "homepage": null, + "owner": "huzheng001", + "repo": "stardict-3", + "rev": "8c5c26996dca52d6bda0aedb5da0381db930a733", + "sha256": "0vmvhr1qlh0zih1v3xg7nnrfajrcy877cfphi5p249pyw3hsv0av", + "type": "tarball", + "url": "https://github.com/huzheng001/stardict-3/archive/8c5c26996dca52d6bda0aedb5da0381db930a733.tar.gz", + "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" } } diff --git a/pkgs/stardict-tools/default.nix b/pkgs/stardict-tools/default.nix @@ -0,0 +1,49 @@ +{ stdenv, autoconf, automake, libtool, pkg-config, + gtk3, libmysqlclient, libxml2, pcre, stardict-3 }: + +stdenv.mkDerivation rec { + pname = "stardict-tools"; + version = stdenv.lib.substring 0 7 src.rev; + src = stardict-3; + + nativeBuildInputs = [ + autoconf + automake + libtool + pkg-config + ]; + buildInputs = [ + gtk3 + libmysqlclient + libxml2 + pcre + ]; + + NIX_CFLAGS_COMPILE = [ "-Wno-error=format-security" ]; + + postPatch = '' + substituteInPlace tools/src/wikipediaImage.cpp \ + --replace "MYSQL_PORT" "0" + substituteInPlace tools/src/Makefile.am \ + --replace "noinst_PROGRAMS =" "bin_PROGRAMS =" + ''; + + preConfigure = ''./autogen.sh''; + configureFlags = [ "--disable-dict" ]; + + postInstall = '' + find $out/bin/ -not -name 'stardict-*' -type f | \ + sed 'p;s#bin/#bin/stardict-#' | \ + xargs -n2 mv + ''; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = stardict-3.description; + homepage = "https://github.com/huzheng001/stardict-3"; + license = licenses.gpl3; + maintainers = with maintainers; [ sikmir ]; + platforms = platforms.linux; + }; +}