biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / misc / perkeep / default.nix
blobd77b99b6c6553951ea3061d3a0f9f75066652bb7
1 { buildGoModule, fetchurl, fetchFromGitHub, lib }:
3 let
4   gouiJS = fetchurl {
5     url = "https://storage.googleapis.com/perkeep-release/gopherjs/goui.js";
6     hash = "sha256-z8A5vbkAaXCw/pv9t9sFJ2xNbEOjg4vkr/YBkNptc3U=";
7   };
9   publisherJS = fetchurl {
10     url = "https://storage.googleapis.com/perkeep-release/gopherjs/publisher.js";
11     hash = "sha256-4iKMkOEKPCo6Xrq0L5IglVZpB9wyLymCgRYz3cE9DSY=";
12   };
14   packages = [
15     "perkeep.org/server/perkeepd"
16     "perkeep.org/cmd/pk"
17     "perkeep.org/cmd/pk-get"
18     "perkeep.org/cmd/pk-put"
19     "perkeep.org/cmd/pk-mount"
20   ];
23 buildGoModule rec {
24   pname = "perkeep";
25   version = "0.11";
27   src = fetchFromGitHub {
28     owner = "perkeep";
29     repo = "perkeep";
30     rev = version;
31     hash = "sha256-lGZb9tH1MrclCRkkmNB85dP/Hl+kkue/WplNMul9RR4=";
32   };
34   vendorHash = "sha256-y+AYUG15tsj5SppY2bTg/dh3LPpp+14smCo7nLJRyak=";
35   deleteVendor = true; # Vendor is out of sync with go.mod
37   buildPhase = ''
38     cd "$NIX_BUILD_TOP/source"
40     # Skip network fetches
41     cp ${publisherJS} app/publisher/publisher.js
42     cp ${gouiJS} server/perkeepd/ui/goui.js
44     go run make.go -offline=true -targets=${lib.concatStringsSep "," packages}
45   '';
47   # genfileembed gets built regardless of -targets, to embed static
48   # content into the Perkeep binaries. Remove it in post-install to
49   # avoid polluting paths.
50   postInstall = ''
51     rm -f $out/bin/genfileembed
52   '';
54   meta = with lib; {
55     description = "Way of storing, syncing, sharing, modelling and backing up content (née Camlistore)";
56     homepage = "https://perkeep.org";
57     license = licenses.asl20;
58     maintainers = with maintainers; [ kalbasit ];
59   };