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}";
|
2020-04-29 01:16:20 +01:00
|
|
|
version = "unstable-2020-03-23";
|
2017-12-15 04:18:33 +00:00
|
|
|
|
2019-09-05 21:59:09 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "perkeep";
|
|
|
|
repo = "perkeep";
|
2020-04-29 01:16:20 +01:00
|
|
|
rev = "c2e31370ddefd86b6112a5d891100ea3382a4254";
|
|
|
|
sha256 = "0jf02k20ms7h60wglcq6dj3vqi9rlfww7db5iplgwznbij70c1i4";
|
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;
|
|
|
|
};
|
|
|
|
}
|