2021-02-05 17:12:51 +00:00
|
|
|
{ buildGoModule, fetchurl, fetchFromGitHub, lib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
gouiJS = fetchurl {
|
|
|
|
url = "https://storage.googleapis.com/perkeep-release/gopherjs/goui.js";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-z8A5vbkAaXCw/pv9t9sFJ2xNbEOjg4vkr/YBkNptc3U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
publisherJS = fetchurl {
|
|
|
|
url = "https://storage.googleapis.com/perkeep-release/gopherjs/publisher.js";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-4iKMkOEKPCo6Xrq0L5IglVZpB9wyLymCgRYz3cE9DSY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
packages = [
|
|
|
|
"perkeep.org/server/perkeepd"
|
|
|
|
"perkeep.org/cmd/pk"
|
|
|
|
"perkeep.org/cmd/pk-get"
|
|
|
|
"perkeep.org/cmd/pk-put"
|
|
|
|
"perkeep.org/cmd/pk-mount"
|
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
in
|
|
|
|
buildGoModule rec {
|
2021-02-05 17:12:51 +00:00
|
|
|
pname = "perkeep";
|
|
|
|
version = "0.11";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "perkeep";
|
|
|
|
repo = "perkeep";
|
2021-02-05 17:12:51 +00:00
|
|
|
rev = version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-lGZb9tH1MrclCRkkmNB85dP/Hl+kkue/WplNMul9RR4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
vendorHash = "sha256-y+AYUG15tsj5SppY2bTg/dh3LPpp+14smCo7nLJRyak=";
|
2021-02-05 17:12:51 +00:00
|
|
|
deleteVendor = true; # Vendor is out of sync with go.mod
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
2021-02-05 17:12:51 +00:00
|
|
|
cd "$NIX_BUILD_TOP/source"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Skip network fetches
|
|
|
|
cp ${publisherJS} app/publisher/publisher.js
|
|
|
|
cp ${gouiJS} server/perkeepd/ui/goui.js
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
go run make.go -offline=true -targets=${lib.concatStringsSep "," packages}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
# genfileembed gets built regardless of -targets, to embed static
|
|
|
|
# content into the Perkeep binaries. Remove it in post-install to
|
|
|
|
# avoid polluting paths.
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
2021-02-05 17:12:51 +00:00
|
|
|
rm -f $out/bin/genfileembed
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Way of storing, syncing, sharing, modelling and backing up content (née Camlistore)";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://perkeep.org";
|
|
|
|
license = licenses.asl20;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ kalbasit ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|