perkeep: unstable-2020-03-23 -> 0.11 (#111262)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

authored by

Dave Anderson
Sandro
and committed by
GitHub
ab5c0974 9e81867a

+23 -15
+23 -15
pkgs/applications/misc/perkeep/default.nix
··· 1 - { buildGoPackage, fetchurl, fetchFromGitHub, lib }: 1 + { buildGoModule, fetchurl, fetchFromGitHub, lib }: 2 2 3 3 let 4 4 gouiJS = fetchurl { ··· 11 11 sha256 = "09hd7p0xscqnh612jbrjvh3njmlm4292zd5sbqx2lg0aw688q8p2"; 12 12 }; 13 13 14 - in buildGoPackage rec { 15 - name = "perkeep-${version}"; 16 - version = "unstable-2020-03-23"; 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 + ]; 21 + 22 + in buildGoModule rec { 23 + pname = "perkeep"; 24 + version = "0.11"; 17 25 18 26 src = fetchFromGitHub { 19 27 owner = "perkeep"; 20 28 repo = "perkeep"; 21 - rev = "c2e31370ddefd86b6112a5d891100ea3382a4254"; 22 - sha256 = "0jf02k20ms7h60wglcq6dj3vqi9rlfww7db5iplgwznbij70c1i4"; 29 + rev = version; 30 + sha256 = "07j5gplk4kcrbazyg4m4bwggzlz5gk89h90r14jvfcpms7v5nrll"; 23 31 }; 24 32 25 - goPackagePath = "perkeep.org"; 33 + vendorSha256 = "1af9a6r9qfrak0n5xyv9z8n7gn7xw2sdjn4s9bwwidkrdm81iq6b"; 34 + deleteVendor = true; # Vendor is out of sync with go.mod 26 35 27 36 buildPhase = '' 28 - cd "$NIX_BUILD_TOP/go/src/$goPackagePath" 37 + cd "$NIX_BUILD_TOP/source" 29 38 30 39 # Skip network fetches 31 - sed -i '/fetchAllJS/a if true { return nil }' make.go 32 40 cp ${publisherJS} app/publisher/publisher.js 33 41 cp ${gouiJS} server/perkeepd/ui/goui.js 34 42 35 - go run make.go 43 + go run make.go -offline=true -targets=${lib.concatStringsSep "," packages} 36 44 ''; 37 45 38 - # devcam is only useful when developing perkeep, we should not install it as 39 - # part of this derivation. 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. 40 49 postInstall = '' 41 - rm -f $out/bin/devcam 50 + rm -f $out/bin/genfileembed 42 51 ''; 43 52 44 53 meta = with lib; { 45 54 description = "A way of storing, syncing, sharing, modelling and backing up content (née Camlistore)"; 46 55 homepage = "https://perkeep.org"; 47 56 license = licenses.asl20; 48 - maintainers = with maintainers; [ cstrahan kalbasit ]; 49 - platforms = platforms.unix; 57 + maintainers = with maintainers; [ cstrahan danderson kalbasit ]; 50 58 }; 51 59 }