2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, buildGoPackage, trousers, dclxvi, wrapGAppsHook, pkgconfig, gtk3, gtkspell3,
|
|
|
|
fetchgit }:
|
2016-06-05 11:41:41 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
gui = true; # Might be implemented with nixpkgs config.
|
|
|
|
in
|
|
|
|
buildGoPackage rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "pond";
|
2016-06-05 11:41:41 +02:00
|
|
|
version = "20150830-${stdenv.lib.strings.substring 0 7 rev}";
|
|
|
|
rev = "bce6e0dc61803c23699c749e29a83f81da3c41b2";
|
|
|
|
|
|
|
|
goPackagePath = "github.com/agl/pond";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
inherit rev;
|
|
|
|
url = "https://github.com/agl/pond";
|
|
|
|
sha256 = "1dmgbg4ak3jkbgmxh0lr4hga1nl623mh7pvsgby1rxl4ivbzwkh4";
|
|
|
|
};
|
|
|
|
|
2016-09-10 12:04:13 +02:00
|
|
|
goDeps = ./deps.nix;
|
2016-06-05 11:41:41 +02:00
|
|
|
|
2017-09-05 23:26:13 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ trousers gtk3 gtkspell3 ]
|
2018-03-12 23:30:50 +01:00
|
|
|
++ stdenv.lib.optional stdenv.hostPlatform.isx86_64 dclxvi
|
2016-06-05 11:41:41 +02:00
|
|
|
++ stdenv.lib.optionals gui [ wrapGAppsHook ];
|
2019-10-29 23:21:22 +01:00
|
|
|
buildFlags = stdenv.lib.optionals (!gui) [ "-tags" "nogui" ];
|
2016-06-05 11:41:41 +02:00
|
|
|
excludedPackages = "\\(appengine\\|bn256cgo\\)";
|
2018-03-12 23:30:50 +01:00
|
|
|
postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isx86_64 ''
|
2016-06-05 11:41:41 +02:00
|
|
|
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"
|
|
|
|
'';
|
|
|
|
}
|