3
0
Fork 0
forked from mirrors/nixpkgs

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

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Dave Anderson 2021-01-31 10:14:26 -08:00 committed by GitHub
parent 9e81867a53
commit ab5c09745f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ buildGoPackage, fetchurl, fetchFromGitHub, lib }:
{ buildGoModule, fetchurl, fetchFromGitHub, lib }:
let
gouiJS = fetchurl {
@ -11,41 +11,49 @@ let
sha256 = "09hd7p0xscqnh612jbrjvh3njmlm4292zd5sbqx2lg0aw688q8p2";
};
in buildGoPackage rec {
name = "perkeep-${version}";
version = "unstable-2020-03-23";
packages = [
"perkeep.org/server/perkeepd"
"perkeep.org/cmd/pk"
"perkeep.org/cmd/pk-get"
"perkeep.org/cmd/pk-put"
"perkeep.org/cmd/pk-mount"
];
in buildGoModule rec {
pname = "perkeep";
version = "0.11";
src = fetchFromGitHub {
owner = "perkeep";
repo = "perkeep";
rev = "c2e31370ddefd86b6112a5d891100ea3382a4254";
sha256 = "0jf02k20ms7h60wglcq6dj3vqi9rlfww7db5iplgwznbij70c1i4";
rev = version;
sha256 = "07j5gplk4kcrbazyg4m4bwggzlz5gk89h90r14jvfcpms7v5nrll";
};
goPackagePath = "perkeep.org";
vendorSha256 = "1af9a6r9qfrak0n5xyv9z8n7gn7xw2sdjn4s9bwwidkrdm81iq6b";
deleteVendor = true; # Vendor is out of sync with go.mod
buildPhase = ''
cd "$NIX_BUILD_TOP/go/src/$goPackagePath"
cd "$NIX_BUILD_TOP/source"
# 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
go run make.go
go run make.go -offline=true -targets=${lib.concatStringsSep "," packages}
'';
# devcam is only useful when developing perkeep, we should not install it as
# part of this derivation.
# genfileembed gets built regardless of -targets, to embed static
# content into the Perkeep binaries. Remove it in post-install to
# avoid polluting paths.
postInstall = ''
rm -f $out/bin/devcam
rm -f $out/bin/genfileembed
'';
meta = with lib; {
description = "A way of storing, syncing, sharing, modelling and backing up content (née Camlistore)";
homepage = "https://perkeep.org";
license = licenses.asl20;
maintainers = with maintainers; [ cstrahan kalbasit ];
platforms = platforms.unix;
maintainers = with maintainers; [ cstrahan danderson kalbasit ];
};
}