python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / applications / misc / perkeep / default.nix
blob2b14079ae609f6e45cc2e2b7f5564121c49f1fed
1 { buildGoModule, fetchurl, fetchFromGitHub, lib }:
3 let
4   gouiJS = fetchurl {
5     url = "https://storage.googleapis.com/perkeep-release/gopherjs/goui.js";
6     sha256 = "0xbkdpd900gnmzj8p0x38dn4sv170pdvgzcvzsq70s80p6ykkh6g";
7   };
9   publisherJS = fetchurl {
10     url = "https://storage.googleapis.com/perkeep-release/gopherjs/publisher.js";
11     sha256 = "09hd7p0xscqnh612jbrjvh3njmlm4292zd5sbqx2lg0aw688q8p2";
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   ];
22 in buildGoModule rec {
23   pname = "perkeep";
24   version = "0.11";
26   src = fetchFromGitHub {
27     owner = "perkeep";
28     repo = "perkeep";
29     rev = version;
30     sha256 = "07j5gplk4kcrbazyg4m4bwggzlz5gk89h90r14jvfcpms7v5nrll";
31   };
33   vendorSha256 = "1af9a6r9qfrak0n5xyv9z8n7gn7xw2sdjn4s9bwwidkrdm81iq6b";
34   deleteVendor = true; # Vendor is out of sync with go.mod
36   buildPhase = ''
37     cd "$NIX_BUILD_TOP/source"
39     # Skip network fetches
40     cp ${publisherJS} app/publisher/publisher.js
41     cp ${gouiJS} server/perkeepd/ui/goui.js
43     go run make.go -offline=true -targets=${lib.concatStringsSep "," packages}
44   '';
46   # genfileembed gets built regardless of -targets, to embed static
47   # content into the Perkeep binaries. Remove it in post-install to
48   # avoid polluting paths.
49   postInstall = ''
50     rm -f $out/bin/genfileembed
51   '';
53   meta = with lib; {
54     description = "A way of storing, syncing, sharing, modelling and backing up content (née Camlistore)";
55     homepage = "https://perkeep.org";
56     license = licenses.asl20;
57     maintainers = with maintainers; [ cstrahan danderson kalbasit ];
58   };