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