nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 96 lines 2.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 gnutls, 6 openssl, 7 libgcrypt, 8 libgpg-error, 9 pkg-config, 10 gettext, 11 which, 12 13 # GUI support 14 gtk3, 15 qt5, 16 17 pluginSearchPaths ? [ 18 "/run/current-system/sw/lib/gwenhywfar/plugins" 19 ".nix-profile/lib/gwenhywfar/plugins" 20 ], 21}: 22 23let 24 inherit ((import ./sources.nix).gwenhywfar) hash releaseId version; 25in 26stdenv.mkDerivation rec { 27 pname = "gwenhywfar"; 28 inherit version; 29 30 src = fetchurl { 31 url = "https://www.aquamaniac.de/rdm/attachments/download/${releaseId}/gwenhywfar-${version}.tar.gz"; 32 inherit hash; 33 }; 34 35 configureFlags = [ 36 "--with-openssl-includes=${openssl.dev}/include" 37 "--with-openssl-libs=${lib.getLib openssl}/lib" 38 ]; 39 40 preConfigure = '' 41 configureFlagsArray+=("--with-guis=gtk3 qt5") 42 ''; 43 44 postPatch = 45 let 46 isRelative = path: builtins.substring 0 1 path != "/"; 47 mkSearchPath = 48 path: 49 '' 50 p; g; s,\<PLUGINDIR\>,"${path}",g; 51 '' 52 + lib.optionalString (isRelative path) '' 53 s/AddPath(\(.*\));/AddRelPath(\1, GWEN_PathManager_RelModeHome);/g 54 ''; 55 56 in 57 '' 58 sed -i -e '/GWEN_PathManager_DefinePath.*GWEN_PM_PLUGINDIR/,/^#endif/ { 59 /^#if/,/^#endif/ { 60 H; /^#endif/ { 61 ${lib.concatMapStrings mkSearchPath pluginSearchPaths} 62 } 63 } 64 }' src/gwenhywfar.c 65 66 # Strip off the effective SO version from the path so that for example 67 # "lib/gwenhywfar/plugins/60" becomes just "lib/gwenhywfar/plugins". 68 sed -i -e '/^gwenhywfar_plugindir=/s,/\''${GWENHYWFAR_SO_EFFECTIVE},,' \ 69 configure 70 ''; 71 72 nativeBuildInputs = [ 73 pkg-config 74 gettext 75 which 76 ]; 77 78 buildInputs = [ 79 gtk3 80 qt5.qtbase 81 gnutls 82 openssl 83 libgcrypt 84 libgpg-error 85 ]; 86 87 dontWrapQtApps = true; 88 89 meta = { 90 description = "OS abstraction functions used by aqbanking and related tools"; 91 homepage = "https://www.aquamaniac.de/rdm/projects/gwenhywfar"; 92 license = lib.licenses.lgpl21Plus; 93 maintainers = [ ]; 94 platforms = lib.platforms.linux; 95 }; 96}