2021-09-04 21:05:03 +01:00
|
|
|
{ lib, stdenv, fetchurl, gnutls, openssl, libgcrypt, libgpg-error, pkg-config, gettext
|
2018-04-27 17:23:11 +01:00
|
|
|
, which
|
|
|
|
|
|
|
|
# GUI support
|
|
|
|
, gtk2, gtk3, qt5
|
2016-06-02 17:56:29 +01:00
|
|
|
|
|
|
|
, pluginSearchPaths ? [
|
|
|
|
"/run/current-system/sw/lib/gwenhywfar/plugins"
|
|
|
|
".nix-profile/lib/gwenhywfar/plugins"
|
|
|
|
]
|
|
|
|
}:
|
2012-01-08 19:29:07 +00:00
|
|
|
|
2018-04-27 16:10:59 +01:00
|
|
|
let
|
|
|
|
inherit ((import ./sources.nix).gwenhywfar) sha256 releaseId version;
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "gwenhywfar";
|
2018-04-27 16:10:59 +01:00
|
|
|
inherit version;
|
2016-05-30 12:54:46 +01:00
|
|
|
|
2020-02-27 11:46:55 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.aquamaniac.de/rdm/attachments/download/${releaseId}/${pname}-${version}.tar.gz";
|
2016-06-02 17:17:04 +01:00
|
|
|
inherit sha256;
|
2012-01-08 19:29:07 +00:00
|
|
|
};
|
|
|
|
|
2018-04-27 17:23:11 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--with-openssl-includes=${openssl.dev}/include"
|
treewide: use lib.getLib for OpenSSL libraries
At some point, I'd like to make another attempt at
71f1f4884b5 ("openssl: stop static binaries referencing libs"), which
was reverted in 195c7da07df. One problem with my previous attempt is
that I moved OpenSSL's libraries to a lib output, but many dependent
packages were hardcoding the out output as the location of the
libraries. This patch fixes every such case I could find in the tree.
It won't have any effect immediately, but will mean these packages
will automatically use an OpenSSL lib output if it is reintroduced in
future.
This patch should cause very few rebuilds, because it shouldn't make
any change at all to most packages I'm touching. The few rebuilds
that are introduced come from when I've changed a package builder not
to use variable names like openssl.out in scripts / substitution
patterns, which would be confusing since they don't hardcode the
output any more.
I started by making the following global replacements:
${pkgs.openssl.out}/lib -> ${lib.getLib pkgs.openssl}/lib
${openssl.out}/lib -> ${lib.getLib openssl}/lib
Then I removed the ".out" suffix when part of the argument to
lib.makeLibraryPath, since that function uses lib.getLib internally.
Then I fixed up cases where openssl was part of the -L flag to the
compiler/linker, since that unambigously is referring to libraries.
Then I manually investigated and fixed the following packages:
- pycurl
- citrix-workspace
- ppp
- wraith
- unbound
- gambit
- acl2
I'm reasonably confindent in my fixes for all of them.
For acl2, since the openssl library paths are manually provided above
anyway, I don't think openssl is required separately as a build input
at all. Removing it doesn't make a difference to the output size, the
file list, or the closure.
I've tested evaluation with the OfBorg meta checks, to protect against
introducing evaluation failures.
2022-03-25 15:33:21 +00:00
|
|
|
"--with-openssl-libs=${lib.getLib openssl}/lib"
|
2018-04-27 17:23:11 +01:00
|
|
|
];
|
|
|
|
|
2018-04-27 16:41:34 +01:00
|
|
|
preConfigure = ''
|
|
|
|
configureFlagsArray+=("--with-guis=gtk2 gtk3 qt5")
|
|
|
|
'';
|
|
|
|
|
2016-06-02 15:29:16 +01:00
|
|
|
postPatch = let
|
|
|
|
isRelative = path: builtins.substring 0 1 path != "/";
|
|
|
|
mkSearchPath = path: ''
|
|
|
|
p; g; s,\<PLUGINDIR\>,"${path}",g;
|
2021-01-21 17:00:13 +00:00
|
|
|
'' + lib.optionalString (isRelative path) ''
|
2016-06-02 15:29:16 +01:00
|
|
|
s/AddPath(\(.*\));/AddRelPath(\1, GWEN_PathManager_RelModeHome);/g
|
|
|
|
'';
|
|
|
|
|
|
|
|
in ''
|
|
|
|
sed -i -e '/GWEN_PathManager_DefinePath.*GWEN_PM_PLUGINDIR/,/^#endif/ {
|
|
|
|
/^#if/,/^#endif/ {
|
|
|
|
H; /^#endif/ {
|
2021-01-21 17:00:13 +00:00
|
|
|
${lib.concatMapStrings mkSearchPath pluginSearchPaths}
|
2016-06-02 15:29:16 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}' src/gwenhywfar.c
|
|
|
|
|
|
|
|
# Strip off the effective SO version from the path so that for example
|
|
|
|
# "lib/gwenhywfar/plugins/60" becomes just "lib/gwenhywfar/plugins".
|
|
|
|
sed -i -e '/^gwenhywfar_plugindir=/s,/\''${GWENHYWFAR_SO_EFFECTIVE},,' \
|
|
|
|
configure
|
|
|
|
'';
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config gettext which ];
|
2012-01-08 19:29:07 +00:00
|
|
|
|
2021-09-04 21:05:03 +01:00
|
|
|
buildInputs = [ gtk2 gtk3 qt5.qtbase gnutls openssl libgcrypt libgpg-error ];
|
2014-02-23 11:21:19 +00:00
|
|
|
|
2021-01-12 11:50:23 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2014-02-23 11:21:19 +00:00
|
|
|
description = "OS abstraction functions used by aqbanking and related tools";
|
2022-02-06 12:40:34 +00:00
|
|
|
homepage = "https://www.aquamaniac.de/rdm/projects/gwenhywfar";
|
|
|
|
license = licenses.lgpl21Plus;
|
2014-02-23 11:21:19 +00:00
|
|
|
maintainers = with maintainers; [ goibhniu ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2012-01-08 19:29:07 +00:00
|
|
|
}
|