3
0
Fork 0
forked from mirrors/nixpkgs

pond: Fix x86_64 optimizations to be correctly applied to only x86_64

This commit is contained in:
William A. Kennington III 2015-09-05 01:35:13 -07:00
parent 41ae7e00d7
commit 9f1a3a4b0f
2 changed files with 10 additions and 4 deletions

View file

@ -22,6 +22,6 @@ stdenv.mkDerivation {
homepage = "https://github.com/agl/dclxvi";
description = "Naehrig, Niederhagen and Schwabe's pairings code, massaged into a shared library";
maintainers = with maintainers; [ wkennington ];
platforms = platforms.all;
platforms = platforms.x86_64;
};
}

View file

@ -2090,15 +2090,21 @@ let
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";
owner = "agl";
repo = "pond";
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";
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 {