Merge pull request #123581 from veprbl/pr/bibutils_enable_darwin

bibutils: enable darwin

authored by

Dmitry Kalinkin and committed by
GitHub
d61cf2be 145658a4

+19 -3
+19 -3
pkgs/tools/misc/bibutils/default.nix
··· 1 - { lib, stdenv, fetchurl }: 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , static ? stdenv.hostPlatform.isStatic 5 + }: 2 6 3 7 stdenv.mkDerivation rec { 4 8 pname = "bibutils"; ··· 9 13 sha256 = "15p4av74ihsg03j854dkdqihpspwnp58p9g1lhx48w8kz91c0ml6"; 10 14 }; 11 15 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 + ]; 13 26 dontAddPrefix = true; 14 27 15 28 doCheck = true; 16 29 checkTarget = "test"; 30 + preCheck = lib.optionalString stdenv.isDarwin '' 31 + export DYLD_LIBRARY_PATH=`pwd`/lib 32 + ''; 17 33 18 34 meta = with lib; { 19 35 description = "Bibliography format interconversion"; ··· 21 37 homepage = "https://sourceforge.net/p/bibutils/home/Bibutils/"; 22 38 license = licenses.gpl2; 23 39 maintainers = [ maintainers.garrison ]; 24 - platforms = platforms.linux; 40 + platforms = platforms.unix; 25 41 }; 26 42 }