nur-packages

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

package.nix (1456B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchurl,
      5   autoconf,
      6   automake,
      7   gnome-common,
      8   libtool,
      9   p7zip,
     10   pkg-config,
     11   gtk2,
     12   libmysqlclient,
     13   libxml2,
     14   pcre2,
     15   which,
     16   yelp-tools,
     17 }:
     18 
     19 stdenv.mkDerivation (finalAttrs: {
     20   pname = "stardict-tools";
     21   version = "3.0.7-2";
     22 
     23   __structuredAttrs = true;
     24 
     25   src = fetchurl {
     26     url = "mirror://sourceforge/stardict-4/stardict-${finalAttrs.version}-src.7z";
     27     hash = "sha256-U9Wfyz0eV3kw7k7XlvBEuHXPrqo+rdhP7fvviSYfyQc=";
     28   };
     29 
     30   nativeBuildInputs = [
     31     autoconf
     32     automake
     33     gnome-common
     34     libtool
     35     p7zip
     36     pkg-config
     37     which
     38     yelp-tools
     39   ];
     40 
     41   buildInputs = [
     42     gtk2
     43     libmysqlclient
     44     libxml2
     45     pcre2
     46   ];
     47 
     48   hardeningDisable = [ "format" ];
     49 
     50   postPatch = ''
     51     substituteInPlace tools/src/Makefile.am \
     52       --replace-fail "noinst_PROGRAMS =" "bin_PROGRAMS ="
     53   '';
     54 
     55   preConfigure = "./autogen.sh";
     56   configureFlags = [ (lib.enableFeature false "dict") ];
     57 
     58   env.NIX_CFLAGS_COMPILE = "-std=c++14";
     59 
     60   postInstall = ''
     61     find $out/bin/ -not -name 'stardict-*' -type f | \
     62       sed 'p;s#bin/#bin/stardict-#' | \
     63       xargs -n2 mv
     64   '';
     65 
     66   enableParallelBuilding = true;
     67 
     68   meta = {
     69     description = "Stardict tools";
     70     homepage = "https://stardict-4.sourceforge.net/";
     71     license = lib.licenses.gpl3Plus;
     72     maintainers = [ lib.maintainers.sikmir ];
     73     platforms = lib.platforms.unix;
     74     broken = true; # configure.ac:91: error: possibly undefined macro: AM_ICONV
     75   };
     76 })