10 stdenv.mkDerivation rec {
15 url = "mirror://mozilla/nspr/releases/v${version}/src/nspr-${version}.tar.gz";
16 hash = "sha256-Vd7DF/FAHNLl26hE00C5MKt1R/gYF5pAArzmLm8caJU=";
20 ./0001-Makefile-use-SOURCE_DATE_EPOCH-for-reproducibility.patch
33 + lib.optionalString stdenv.hostPlatform.isDarwin ''
34 substituteInPlace configure --replace '@executable_path/' "$out/lib/"
35 substituteInPlace configure.in --replace '@executable_path/' "$out/lib/"
39 depsBuildBuild = [ buildPackages.stdenv.cc ];
43 ] ++ lib.optional stdenv.hostPlatform.is64bit "--enable-64bit";
46 find $out -name "*.a" -delete
47 moveToOutput share "$dev" # just aclocal
50 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ];
52 enableParallelBuilding = true;
55 inherit (nixosTests) firefox firefox-esr;
59 homepage = "https://firefox-source-docs.mozilla.org/nspr/index.html";
60 description = "Netscape Portable Runtime, a platform-neutral API for system-level and libc-like functions";
61 maintainers = with maintainers; [
65 platforms = platforms.all;
66 license = licenses.mpl20;