pond: Fix x86_64 optimizations to be correctly applied to only x86_64
This commit is contained in:
parent
41ae7e00d7
commit
9f1a3a4b0f
@ -22,6 +22,6 @@ stdenv.mkDerivation {
|
|||||||
homepage = "https://github.com/agl/dclxvi";
|
homepage = "https://github.com/agl/dclxvi";
|
||||||
description = "Naehrig, Niederhagen and Schwabe's pairings code, massaged into a shared library";
|
description = "Naehrig, Niederhagen and Schwabe's pairings code, massaged into a shared library";
|
||||||
maintainers = with maintainers; [ wkennington ];
|
maintainers = with maintainers; [ wkennington ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.x86_64;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -2090,15 +2090,21 @@ let
|
|||||||
doCheck = false; # bad import path in tests
|
doCheck = false; # bad import path in tests
|
||||||
};
|
};
|
||||||
|
|
||||||
pond = buildFromGitHub {
|
pond = let isx86_64 = stdenv.lib.any (n: n == stdenv.system) stdenv.lib.platforms.x86_64; in buildFromGitHub {
|
||||||
rev = "bce6e0dc61803c23699c749e29a83f81da3c41b2";
|
rev = "bce6e0dc61803c23699c749e29a83f81da3c41b2";
|
||||||
owner = "agl";
|
owner = "agl";
|
||||||
repo = "pond";
|
repo = "pond";
|
||||||
sha256 = "1dmgbg4ak3jkbgmxh0lr4hga1nl623mh7pvsgby1rxl4ivbzwkh4";
|
sha256 = "1dmgbg4ak3jkbgmxh0lr4hga1nl623mh7pvsgby1rxl4ivbzwkh4";
|
||||||
|
|
||||||
buildInputs = [ net crypto protobuf ed25519 pkgs.trousers pkgs.dclxvi ];
|
buildInputs = [ net crypto protobuf ed25519 pkgs.trousers ]
|
||||||
|
++ stdenv.lib.optional isx86_64 pkgs.dclxvi;
|
||||||
buildFlags = "-tags nogui";
|
buildFlags = "-tags nogui";
|
||||||
excludedPackages = "appengine";
|
excludedPackages = "\\(appengine\\|bn256cgo\\)";
|
||||||
|
postPatch = stdenv.lib.optionalString isx86_64 ''
|
||||||
|
grep -r 'bn256' | awk -F: '{print $1}' | xargs sed -i \
|
||||||
|
-e "s,golang.org/x/crypto/bn256,github.com/agl/pond/bn256cgo,g" \
|
||||||
|
-e "s,bn256\.,bn256cgo.,g"
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
pongo2 = buildFromGitHub {
|
pongo2 = buildFromGitHub {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user