2019-09-05 22:59:09 +02:00
|
|
|
{ buildGoPackage, fetchurl, fetchFromGitHub, lib }:
|
2017-12-15 05:18:33 +01:00
|
|
|
|
2019-09-05 22:59:09 +02: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 05:18:33 +01:00
|
|
|
name = "perkeep-${version}";
|
2020-04-29 02:16:20 +02:00
|
|
|
version = "unstable-2020-03-23";
|
2017-12-15 05:18:33 +01:00
|
|
|
|
2019-09-05 22:59:09 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "perkeep";
|
|
|
|
repo = "perkeep";
|
2020-04-29 02:16:20 +02:00
|
|
|
rev = "c2e31370ddefd86b6112a5d891100ea3382a4254";
|
|
|
|
sha256 = "0jf02k20ms7h60wglcq6dj3vqi9rlfww7db5iplgwznbij70c1i4";
|
2017-12-15 05:18:33 +01:00
|
|
|
};
|
|
|
|
|
2018-07-20 08:28:24 +02:00
|
|
|
goPackagePath = "perkeep.org";
|
2017-12-15 05:18:33 +01:00
|
|
|
|
|
|
|
buildPhase = ''
|
2018-07-20 08:28:24 +02:00
|
|
|
cd "$NIX_BUILD_TOP/go/src/$goPackagePath"
|
2019-09-05 22:59:09 +02: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 05:18:33 +01:00
|
|
|
go run make.go
|
|
|
|
'';
|
|
|
|
|
2018-07-20 08:28:24 +02: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 05:18:33 +01:00
|
|
|
'';
|
|
|
|
|
2018-07-20 08:28:24 +02:00
|
|
|
meta = with lib; {
|
2017-12-15 05:18:33 +01:00
|
|
|
description = "A way of storing, syncing, sharing, modelling and backing up content (née Camlistore)";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://perkeep.org";
|
2017-12-15 05:18:33 +01:00
|
|
|
license = licenses.asl20;
|
2018-07-20 08:28:24 +02:00
|
|
|
maintainers = with maintainers; [ cstrahan kalbasit ];
|
2017-12-15 05:18:33 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|