diff options
author | aszlig <aszlig@redmoonstudios.org> | 2012-08-21 10:47:29 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2012-08-22 08:29:09 +0200 |
commit | 29fce94665b6434ca22e78d873a01396bcd2a85a (patch) | |
tree | f1ba8b886059bdc66328198807f8ce529d1b9460 /pkgs/development/libraries/nss/default.nix | |
parent | 5f4ca8ec18cf3a4253845f6f50813833c883d7cc (diff) | |
download | nixpkgs-29fce94665b6434ca22e78d873a01396bcd2a85a.tar nixpkgs-29fce94665b6434ca22e78d873a01396bcd2a85a.tar.gz nixpkgs-29fce94665b6434ca22e78d873a01396bcd2a85a.tar.bz2 nixpkgs-29fce94665b6434ca22e78d873a01396bcd2a85a.tar.lz nixpkgs-29fce94665b6434ca22e78d873a01396bcd2a85a.tar.xz nixpkgs-29fce94665b6434ca22e78d873a01396bcd2a85a.tar.zst nixpkgs-29fce94665b6434ca22e78d873a01396bcd2a85a.zip |
nss: Clean up build/make flags.
First of all, let's remove that redundant BUILD_OPT variable. This variable already is in makeFlags, so we really don't want it to be lurking around in the attribute set of the derivation, and it annoys me for being there for days. We now state build targets explicitly rather than relying on "nss_build_all". This makes NSPR_CONFIG_STATUS and the touch of build_nspr stamp obsolete, as only nss_build_all includes build_nspr. In addition, we don't need the -lz hack anymore, as this has been fixed in recent NSS versions, so we can completly remove the postBuild hook. And while we're at it, we're removing those outdated build instructions as well, especially because we don't and can't follow official building guidelines anymore, as those are difficult to apply to Nix.
Diffstat (limited to 'pkgs/development/libraries/nss/default.nix')
-rw-r--r-- | pkgs/development/libraries/nss/default.nix | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/pkgs/development/libraries/nss/default.nix b/pkgs/development/libraries/nss/default.nix index a957996d1f1..222fd6e94f6 100644 --- a/pkgs/development/libraries/nss/default.nix +++ b/pkgs/development/libraries/nss/default.nix @@ -39,9 +39,6 @@ stdenv.mkDerivation rec { patches = [ ./nss-3.12.5-gentoo-fixups.diff ]; - # Based on the build instructions at - # http://www.mozilla.org/projects/security/pki/nss/nss-3.11.4/nss-3.11.4-build.html - postPatch = '' sed -i -e 's/^DIRS.*$/& pem/' mozilla/security/nss/lib/ckfw/manifest.mn sed -i -e "/^PREFIX =/s:= /usr:= $out:" mozilla/security/nss/config/Makefile @@ -49,26 +46,17 @@ stdenv.mkDerivation rec { preConfigure = "cd mozilla/security/nss"; - BUILD_OPT = "1"; - - makeFlags = - [ "NSPR_CONFIG_STATUS=" "NSDISTMODE=copy" "BUILD_OPT=1" "SOURCE_PREFIX=\$(out)" - "NSS_ENABLE_ECC=1" "NSS_USE_SYSTEM_SQLITE=1" - ] - ++ stdenv.lib.optional stdenv.is64bit "USE_64=1"; - - buildFlags = "nss_build_all"; - - NIX_CFLAGS_COMPILE = "-I${nspr}/include/nspr"; - - preBuild = - '' - # Fool it into thinking NSPR has already been built. - touch build_nspr - - # Hack to make -lz dependencies work. - touch cmd/signtool/-lz cmd/modutil/-lz - ''; + makeFlags = [ + "NSPR_INCLUDE_DIR=${nspr}/include/nspr" + "NSPR_LIB_DIR=${nspr}/lib" + "NSDISTMODE=copy" + "BUILD_OPT=1" + "SOURCE_PREFIX=\$(out)" + "NSS_ENABLE_ECC=1" + "NSS_USE_SYSTEM_SQLITE=1" + ] ++ stdenv.lib.optional stdenv.is64bit "USE_64=1"; + + buildFlags = [ "build_coreconf" "build_dbm" "all" ]; postInstall = '' |