mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 03:25:02 +00:00
perkeep: unstable-2020-03-23 -> 0.11 (#111262)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
9e81867a53
commit
ab5c09745f
|
@ -1,4 +1,4 @@
|
||||||
{ buildGoPackage, fetchurl, fetchFromGitHub, lib }:
|
{ buildGoModule, fetchurl, fetchFromGitHub, lib }:
|
||||||
|
|
||||||
let
|
let
|
||||||
gouiJS = fetchurl {
|
gouiJS = fetchurl {
|
||||||
|
@ -11,41 +11,49 @@ let
|
||||||
sha256 = "09hd7p0xscqnh612jbrjvh3njmlm4292zd5sbqx2lg0aw688q8p2";
|
sha256 = "09hd7p0xscqnh612jbrjvh3njmlm4292zd5sbqx2lg0aw688q8p2";
|
||||||
};
|
};
|
||||||
|
|
||||||
in buildGoPackage rec {
|
packages = [
|
||||||
name = "perkeep-${version}";
|
"perkeep.org/server/perkeepd"
|
||||||
version = "unstable-2020-03-23";
|
"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 {
|
src = fetchFromGitHub {
|
||||||
owner = "perkeep";
|
owner = "perkeep";
|
||||||
repo = "perkeep";
|
repo = "perkeep";
|
||||||
rev = "c2e31370ddefd86b6112a5d891100ea3382a4254";
|
rev = version;
|
||||||
sha256 = "0jf02k20ms7h60wglcq6dj3vqi9rlfww7db5iplgwznbij70c1i4";
|
sha256 = "07j5gplk4kcrbazyg4m4bwggzlz5gk89h90r14jvfcpms7v5nrll";
|
||||||
};
|
};
|
||||||
|
|
||||||
goPackagePath = "perkeep.org";
|
vendorSha256 = "1af9a6r9qfrak0n5xyv9z8n7gn7xw2sdjn4s9bwwidkrdm81iq6b";
|
||||||
|
deleteVendor = true; # Vendor is out of sync with go.mod
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
cd "$NIX_BUILD_TOP/go/src/$goPackagePath"
|
cd "$NIX_BUILD_TOP/source"
|
||||||
|
|
||||||
# Skip network fetches
|
# Skip network fetches
|
||||||
sed -i '/fetchAllJS/a if true { return nil }' make.go
|
|
||||||
cp ${publisherJS} app/publisher/publisher.js
|
cp ${publisherJS} app/publisher/publisher.js
|
||||||
cp ${gouiJS} server/perkeepd/ui/goui.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
|
# genfileembed gets built regardless of -targets, to embed static
|
||||||
# part of this derivation.
|
# content into the Perkeep binaries. Remove it in post-install to
|
||||||
|
# avoid polluting paths.
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
rm -f $out/bin/devcam
|
rm -f $out/bin/genfileembed
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A way of storing, syncing, sharing, modelling and backing up content (née Camlistore)";
|
description = "A way of storing, syncing, sharing, modelling and backing up content (née Camlistore)";
|
||||||
homepage = "https://perkeep.org";
|
homepage = "https://perkeep.org";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = with maintainers; [ cstrahan kalbasit ];
|
maintainers = with maintainers; [ cstrahan danderson kalbasit ];
|
||||||
platforms = platforms.unix;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue