default.nix (1294B)
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"; 19 20 src = fetchurl { 21 url = "mirror://sourceforge/stardict-4/stardict-${finalAttrs.version}-2-src.7z"; 22 hash = "sha256-2Q+PNqFCnxioFmD4IEUQlD2x22Ueh+nKXP5i9N3STFE="; 23 }; 24 25 nativeBuildInputs = [ 26 autoconf 27 automake 28 libtool 29 p7zip 30 pkg-config 31 ]; 32 33 buildInputs = [ 34 gtk2 35 libmysqlclient 36 libxml2 37 pcre 38 ]; 39 40 hardeningDisable = [ "format" ]; 41 42 postPatch = '' 43 substituteInPlace tools/src/Makefile.am \ 44 --replace-fail "noinst_PROGRAMS =" "bin_PROGRAMS =" 45 ''; 46 47 preConfigure = "./autogen.sh"; 48 configureFlags = [ (lib.enableFeature false "dict") ]; 49 50 env.NIX_CFLAGS_COMPILE = "-std=c++14"; 51 52 postInstall = '' 53 find $out/bin/ -not -name 'stardict-*' -type f | \ 54 sed 'p;s#bin/#bin/stardict-#' | \ 55 xargs -n2 mv 56 ''; 57 58 enableParallelBuilding = true; 59 60 meta = { 61 description = "Stardict tools"; 62 homepage = "https://stardict-4.sourceforge.net/"; 63 license = lib.licenses.gpl3Plus; 64 maintainers = [ lib.maintainers.sikmir ]; 65 platforms = lib.platforms.unix; 66 broken = stdenv.isDarwin; 67 }; 68 })