diff options
author | John Ericson <Ericson2314@yahoo.com> | 2017-09-13 11:20:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-13 11:20:06 -0400 |
commit | 8fccaa284d8e51eac2a97a6ca3a3c28d78592008 (patch) | |
tree | 825f6ba8235e92abf899c070569b179ed6c9b122 /pkgs/tools | |
parent | 98d84b1375971627d3e5eac9065c4b1dc304b009 (diff) | |
parent | 5aec3f96a26806dc26759bc2f13b062caaad3c17 (diff) |
Merge pull request #29282 from obsidiansystems/soext
lib, treewide: Add `*Platform.extensions` and use it where possible
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/networking/eggdrop/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/security/yara/default.nix | 8 |
2 files changed, 3 insertions, 11 deletions
diff --git a/pkgs/tools/networking/eggdrop/default.nix b/pkgs/tools/networking/eggdrop/default.nix index fda2b47a24432..12d9da87b39b3 100644 --- a/pkgs/tools/networking/eggdrop/default.nix +++ b/pkgs/tools/networking/eggdrop/default.nix @@ -1,9 +1,5 @@ { stdenv, fetchFromGitHub, tcl }: -let - shlib = if stdenv.isDarwin then "dylib" else "so"; -in - stdenv.mkDerivation rec { name = "eggdrop-${version}"; version = "1.6.21-nix1"; @@ -29,7 +25,7 @@ stdenv.mkDerivation rec { ''; configureFlags = [ - "--with-tcllib=${tcl}/lib/lib${tcl.libPrefix}.${shlib}" + "--with-tcllib=${tcl}/lib/lib${tcl.libPrefix}${stdenv.hostPlatform.extensions.sharedLibrary}" "--with-tclinc=${tcl}/include/tcl.h" ]; diff --git a/pkgs/tools/security/yara/default.nix b/pkgs/tools/security/yara/default.nix index 21e5c3ffcef40..34eb5583c4558 100644 --- a/pkgs/tools/security/yara/default.nix +++ b/pkgs/tools/security/yara/default.nix @@ -17,20 +17,16 @@ stdenv.mkDerivation rec { # FIXME: this is probably not the right way to make it work # make[2]: *** No rule to make target 'libyara/.libs/libyara.a', needed by 'yara'. Stop. - dynamic_library_extension = "" - + stdenv.lib.optionalString stdenv.isLinux "so" - + stdenv.lib.optionalString stdenv.isDarwin "dylib" - ; prePatch = '' cat >staticlibrary.patch <<EOF --- a/Makefile.am 2015-11-01 11:39:12.000000000 +0100 +++ b/Makefile.am 2015-11-01 11:45:32.000000000 +0100 @@ -12 +12 @@ -yara_LDADD = libyara/.libs/libyara.a - +yara_LDADD = libyara/.libs/libyara.${dynamic_library_extension} + +yara_LDADD = libyara/.libs/libyara${stdenv.hostPlatform.extensions.sharedLibrary} @@ -15 +15 @@ -yarac_LDADD = libyara/.libs/libyara.a - +yarac_LDADD = libyara/.libs/libyara.${dynamic_library_extension} + +yarac_LDADD = libyara/.libs/libyara${stdenv.hostPlatform.extensions.sharedLibrary} EOF ''; patches = [ |