@@ -1,16 +1,15 @@
1−{ lib, stdenv, fetchFromGitHub, nasm, which }:
1+{ lib, stdenv, fetchFromGitHub, }:
4stdenv.mkDerivation rec {
3stdenv.mkDerivation rec {
5 pname = "crypto++";
4 pname = "crypto++";
6− version = "8.2.0";
5+ version = "8.4.0";
7− underscoredVersion = strings.replaceStrings ["."] ["_"] version;
6+ underscoredVersion = lib.strings.replaceStrings ["."] ["_"] version;
9 src = fetchFromGitHub {
8 src = fetchFromGitHub {
10 owner = "weidai11";
9 owner = "weidai11";
11 repo = "cryptopp";
10 repo = "cryptopp";
12 rev = "CRYPTOPP_${underscoredVersion}";
11 rev = "CRYPTOPP_${underscoredVersion}";
13− sha256 = "01zrrzjn14yhkb9fzzl57vmh7ig9a6n6fka45f8za0gf7jpcq3mj";
12+ sha256 = "1gwn8yh1mh41hkh6sgnhb9c3ygrdazd7645msl20i0zdvcp7f5w3";
16 postPatch = ''
15 postPatch = ''
@@ -19,9 +18,6 @@ stdenv.mkDerivation rec {
19 --replace "ARFLAGS = -static -o" "ARFLAGS = -cru"
18 --replace "ARFLAGS = -static -o" "ARFLAGS = -cru"
22− nativeBuildInputs = optionals stdenv.hostPlatform.isx86 [ nasm which ];
24− preBuild = optionalString stdenv.hostPlatform.isx86 "${stdenv.shell} rdrand-nasm.sh";
25 makeFlags = [ "PREFIX=${placeholder "out"}" ];
21 makeFlags = [ "PREFIX=${placeholder "out"}" ];
26 buildFlags = [ "shared" "libcryptopp.pc" ];
22 buildFlags = [ "shared" "libcryptopp.pc" ];
27 enableParallelBuilding = true;
23 enableParallelBuilding = true;
@@ -31,17 +27,17 @@ stdenv.mkDerivation rec {
31 preInstall = "rm libcryptopp.a"; # built for checks but we don't install static lib into the nix store
27 preInstall = "rm libcryptopp.a"; # built for checks but we don't install static lib into the nix store
32 installTargets = [ "install-lib" ];
28 installTargets = [ "install-lib" ];
33 installFlags = [ "LDCONF=true" ];
29 installFlags = [ "LDCONF=true" ];
34− postInstall = optionalString (!stdenv.hostPlatform.isDarwin) ''
30+ postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
35− ln -sr $out/lib/libcryptopp.so.${version} $out/lib/libcryptopp.so.${versions.majorMinor version}
31+ ln -sr $out/lib/libcryptopp.so.${version} $out/lib/libcryptopp.so.${lib.versions.majorMinor version}
36− ln -sr $out/lib/libcryptopp.so.${version} $out/lib/libcryptopp.so.${versions.major version}
32+ ln -sr $out/lib/libcryptopp.so.${version} $out/lib/libcryptopp.so.${lib.versions.major version}
40 description = "Crypto++, a free C++ class library of cryptographic schemes";
36 description = "Crypto++, a free C++ class library of cryptographic schemes";
41 homepage = "https://cryptopp.com/";
37 homepage = "https://cryptopp.com/";
42 changelog = "https://raw.githubusercontent.com/weidai11/cryptopp/CRYPTOPP_${underscoredVersion}/History.txt";
38 changelog = "https://raw.githubusercontent.com/weidai11/cryptopp/CRYPTOPP_${underscoredVersion}/History.txt";
43− license = with licenses; [ boost publicDomain ];
39+ license = with lib.licenses; [ boost publicDomain ];
44− platforms = platforms.all;
40+ platforms = lib.platforms.all;
45− maintainers = with maintainers; [ c0bw3b ];
41+ maintainers = with lib.maintainers; [ c0bw3b ];