2019-09-05 21:59:09 +01:00
|
|
|
{ buildGoPackage, fetchurl, fetchFromGitHub, lib }:
|
2017-12-15 04:18:33 +00:00
|
|
|
|
2019-09-05 21:59:09 +01:00
|
|
|
let
|
|
|
|
gouiJS = fetchurl {
|
|
|
|
url = "https://storage.googleapis.com/perkeep-release/gopherjs/goui.js";
|
|
|
|
sha256 = "0xbkdpd900gnmzj8p0x38dn4sv170pdvgzcvzsq70s80p6ykkh6g";
|
|
|
|
};
|
|
|
|
|
|
|
|
publisherJS = fetchurl {
|
|
|
|
url = "https://storage.googleapis.com/perkeep-release/gopherjs/publisher.js";
|
|
|
|
sha256 = "09hd7p0xscqnh612jbrjvh3njmlm4292zd5sbqx2lg0aw688q8p2";
|
|
|
|
};
|
|
|
|
|
|
|
|
in buildGoPackage rec {
|
2017-12-15 04:18:33 +00:00
|
|
|
name = "perkeep-${version}";
|
2019-09-05 21:59:09 +01:00
|
|
|
version = "unstable-2019-07-29";
|
2017-12-15 04:18:33 +00:00
|
|
|
|
2019-09-05 21:59:09 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "perkeep";
|
|
|
|
repo = "perkeep";
|
|
|
|
rev = "c9f78d02adf9740f3b8d403a1418554293cc9f41";
|
|
|
|
sha256 = "11rin94pjzg0kvizrq9ss42fjw7wfwx3g1pk8zdlhyfkiwwh2rmg";
|
2017-12-15 04:18:33 +00:00
|
|
|
};
|
|
|
|
|
2018-07-20 07:28:24 +01:00
|
|
|
goPackagePath = "perkeep.org";
|
2017-12-15 04:18:33 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
2018-07-20 07:28:24 +01:00
|
|
|
cd "$NIX_BUILD_TOP/go/src/$goPackagePath"
|
2019-09-05 21:59:09 +01:00
|
|
|
|
|
|
|
# Skip network fetches
|
|
|
|
sed -i '/fetchAllJS/a if true { return nil }' make.go
|
|
|
|
cp ${publisherJS} app/publisher/publisher.js
|
|
|
|
cp ${gouiJS} server/perkeepd/ui/goui.js
|
|
|
|
|
2017-12-15 04:18:33 +00:00
|
|
|
go run make.go
|
|
|
|
'';
|
|
|
|
|
2018-07-20 07:28:24 +01:00
|
|
|
# devcam is only useful when developing perkeep, we should not install it as
|
|
|
|
# part of this derivation.
|
|
|
|
postInstall = ''
|
|
|
|
rm -f $out/bin/devcam
|
2017-12-15 04:18:33 +00:00
|
|
|
'';
|
|
|
|
|
2018-07-20 07:28:24 +01:00
|
|
|
meta = with lib; {
|
2017-12-15 04:18:33 +00:00
|
|
|
description = "A way of storing, syncing, sharing, modelling and backing up content (née Camlistore)";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://perkeep.org";
|
2017-12-15 04:18:33 +00:00
|
|
|
license = licenses.asl20;
|
2018-07-20 07:28:24 +01:00
|
|
|
maintainers = with maintainers; [ cstrahan kalbasit ];
|
2017-12-15 04:18:33 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|