nur-packages

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

package.nix (1375B)


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