commit
b6cad72585
|
@ -16,6 +16,9 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
cd nspr
|
cd nspr
|
||||||
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
|
substituteInPlace configure --replace '@executable_path/' "$out/lib/"
|
||||||
|
substituteInPlace configure.in --replace '@executable_path/' "$out/lib/"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl, nspr, perl, zlib, sqlite }:
|
{ stdenv, fetchurl, nspr, perl, zlib, sqlite, fixDarwinDylibNames }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
|
@ -16,7 +16,8 @@ in stdenv.mkDerivation rec {
|
||||||
sha256 = "186x33wsk4mzjz7dzbn8p0py9a0nzkgzpfkdv4rlyy5gghv5vhd3";
|
sha256 = "186x33wsk4mzjz7dzbn8p0py9a0nzkgzpfkdv4rlyy5gghv5vhd3";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ perl zlib sqlite ];
|
buildInputs = [ perl zlib sqlite ]
|
||||||
|
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||||
|
|
||||||
propagatedBuildInputs = [ nspr ];
|
propagatedBuildInputs = [ nspr ];
|
||||||
|
|
||||||
|
@ -33,6 +34,10 @@ in stdenv.mkDerivation rec {
|
||||||
|
|
||||||
patchFlags = "-p0";
|
patchFlags = "-p0";
|
||||||
|
|
||||||
|
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
|
substituteInPlace nss/coreconf/Darwin.mk --replace '@executable_path/$(notdir $@)' "$out/lib/\$(notdir \$@)"
|
||||||
|
'';
|
||||||
|
|
||||||
outputs = [ "out" "dev" "tools" ];
|
outputs = [ "out" "dev" "tools" ];
|
||||||
|
|
||||||
preConfigure = "cd nss";
|
preConfigure = "cd nss";
|
||||||
|
|
|
@ -18,7 +18,8 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [ cpio zlib bzip2 file libarchive nspr nss db xz python lua ];
|
buildInputs = [ cpio zlib bzip2 file libarchive nspr nss db xz python lua ];
|
||||||
|
|
||||||
# rpm/rpmlib.h includes popt.h, and then the pkg-config file mentions these as linkage requirements
|
# rpm/rpmlib.h includes popt.h, and then the pkg-config file mentions these as linkage requirements
|
||||||
propagatedBuildInputs = [ popt elfutils nss db bzip2 libarchive libbfd ];
|
propagatedBuildInputs = [ popt nss db bzip2 libarchive libbfd ]
|
||||||
|
++ stdenv.lib.optional stdenv.isLinux elfutils;
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss";
|
NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss";
|
||||||
|
|
||||||
|
@ -59,6 +60,6 @@ stdenv.mkDerivation rec {
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
description = "The RPM Package Manager";
|
description = "The RPM Package Manager";
|
||||||
maintainers = with maintainers; [ copumpkin ];
|
maintainers = with maintainers; [ copumpkin ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux ++ platforms.darwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue