git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #123581 from veprbl/pr/bibutils_enable_darwin

bibutils: enable darwin

commitd61cf2be364d365d04fdb4ec4293055f88b1f78d authorDmitry Kalinkin <dmitry.kalinkin@gmail.com> dateThu 20 May 2021, 04:13 (5 years ago) parent145658ab75ce20
1 file changed+19−3
pkgs/tools/misc/bibutils/default.nix+19−3
pkgs/tools/misc/bibutils/default.nix+19−3
@@ -1,4 +1,8 @@
1−{ lib, stdenv, fetchurl }:
1+{ lib
2+, stdenv
3+, fetchurl
4+, static ? stdenv.hostPlatform.isStatic
5+}:
26
37stdenv.mkDerivation rec {
48 pname = "bibutils";
@@ -9,11 +13,23 @@ stdenv.mkDerivation rec {
913 sha256 = "15p4av74ihsg03j854dkdqihpspwnp58p9g1lhx48w8kz91c0ml6";
1014 };
1115
12− configureFlags = [ "--dynamic" "--install-dir" "$(out)/bin" "--install-lib" "$(out)/lib" ];
16+ preConfigure = lib.optionalString stdenv.isDarwin ''
17+ substituteInPlace lib/Makefile.dynamic \
18+ --replace '-Wl,-soname,$(SONAME)' ""
19+ '';
20+
21+ configureFlags = [
22+ (if static then "--static" else "--dynamic")
23+ "--install-dir" "$(out)/bin"
24+ "--install-lib" "$(out)/lib"
25+ ];
1326 dontAddPrefix = true;
1427
1528 doCheck = true;
1629 checkTarget = "test";
30+ preCheck = lib.optionalString stdenv.isDarwin ''
31+ export DYLD_LIBRARY_PATH=`pwd`/lib
32+ '';
1733
1834 meta = with lib; {
1935 description = "Bibliography format interconversion";
@@ -21,6 +37,6 @@ stdenv.mkDerivation rec {
2137 homepage = "https://sourceforge.net/p/bibutils/home/Bibutils/";
2238 license = licenses.gpl2;
2339 maintainers = [ maintainers.garrison ];
24− platforms = platforms.linux;
40+ platforms = platforms.unix;
2541 };
2642}