cryptopp: 8.4.0 -> 8.6.0
Disabling fortify because it clashes with upstream optimisation flags
This commit is contained in:
parent
e6647de754
commit
e8a44b5583
@ -5,30 +5,22 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "crypto++";
|
pname = "crypto++";
|
||||||
version = "8.4.0";
|
version = "8.6.0";
|
||||||
underscoredVersion = lib.strings.replaceStrings ["."] ["_"] version;
|
underscoredVersion = lib.strings.replaceStrings ["."] ["_"] version;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "weidai11";
|
owner = "weidai11";
|
||||||
repo = "cryptopp";
|
repo = "cryptopp";
|
||||||
rev = "CRYPTOPP_${underscoredVersion}";
|
rev = "CRYPTOPP_${underscoredVersion}";
|
||||||
sha256 = "1gwn8yh1mh41hkh6sgnhb9c3ygrdazd7645msl20i0zdvcp7f5w3";
|
hash = "sha256-a3TYaK34WvKEXN7LKAfGwQ3ZL6a3k/zMZyyVfnkQqO4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace GNUmakefile \
|
substituteInPlace GNUmakefile \
|
||||||
--replace "AR = libtool" "AR = ar" \
|
--replace "AR = libtool" "AR = ar" \
|
||||||
--replace "ARFLAGS = -static -o" "ARFLAGS = -cru"
|
--replace "ARFLAGS = -static -o" "ARFLAGS = -cru"
|
||||||
|
|
||||||
# See https://github.com/weidai11/cryptopp/issues/1011
|
|
||||||
substituteInPlace GNUmakefile \
|
|
||||||
--replace "ZOPT = -O0" "ZOPT ="
|
|
||||||
'';
|
|
||||||
|
|
||||||
preConfigure = ''
|
|
||||||
sh TestScripts/configure.sh
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
||||||
@ -37,10 +29,11 @@ stdenv.mkDerivation rec {
|
|||||||
++ lib.optional enableShared "shared"
|
++ lib.optional enableShared "shared"
|
||||||
++ [ "libcryptopp.pc" ];
|
++ [ "libcryptopp.pc" ];
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
hardeningDisable = [ "fortify" ];
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
# built for checks but we don't install static lib into the nix store
|
# always built for checks but install static lib only when necessary
|
||||||
preInstall = lib.optionalString (!enableStatic) "rm libcryptopp.a";
|
preInstall = lib.optionalString (!enableStatic) "rm libcryptopp.a";
|
||||||
|
|
||||||
installTargets = [ "install-lib" ];
|
installTargets = [ "install-lib" ];
|
||||||
|
Loading…
Reference in New Issue
Block a user