-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perkeep: 0.11 -> 0-unstable-2024-04-23
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
- Loading branch information
Showing
1 changed file
with
17 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,42 @@ | ||
{ | ||
buildGoModule, | ||
fetchurl, | ||
fetchFromGitHub, | ||
lib, | ||
}: | ||
|
||
let | ||
gouiJS = fetchurl { | ||
url = "https://storage.googleapis.com/perkeep-release/gopherjs/goui.js"; | ||
hash = "sha256-z8A5vbkAaXCw/pv9t9sFJ2xNbEOjg4vkr/YBkNptc3U="; | ||
}; | ||
|
||
publisherJS = fetchurl { | ||
url = "https://storage.googleapis.com/perkeep-release/gopherjs/publisher.js"; | ||
hash = "sha256-4iKMkOEKPCo6Xrq0L5IglVZpB9wyLymCgRYz3cE9DSY="; | ||
}; | ||
|
||
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 { | ||
buildGoModule { | ||
pname = "perkeep"; | ||
version = "0.11"; | ||
# no release or tag since 2020 | ||
version = "0-unstable-2024-04-23"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "perkeep"; | ||
repo = "perkeep"; | ||
rev = version; | ||
hash = "sha256-lGZb9tH1MrclCRkkmNB85dP/Hl+kkue/WplNMul9RR4="; | ||
rev = "bb15e6eb48bc9d614673f3af9432c70a76707c22"; | ||
hash = "sha256-FUr+OgxYHVUzaahrG/3Adn5KNYHb0S/SKKFddskuvZA="; | ||
}; | ||
|
||
vendorHash = "sha256-y+AYUG15tsj5SppY2bTg/dh3LPpp+14smCo7nLJRyak="; | ||
deleteVendor = true; # Vendor is out of sync with go.mod | ||
|
||
buildPhase = '' | ||
cd "$NIX_BUILD_TOP/source" | ||
# Skip network fetches | ||
cp ${publisherJS} app/publisher/publisher.js | ||
cp ${gouiJS} server/perkeepd/ui/goui.js | ||
vendorHash = "sha256-+l1QV7/P0sS1S26xdyQygRZQGKqwbLUhgVtm/yHL6Cc="; | ||
|
||
go run make.go -offline=true -targets=${lib.concatStringsSep "," packages} | ||
''; | ||
subPackages = [ | ||
"server/perkeepd" | ||
"cmd/pk" | ||
"cmd/pk-get" | ||
"cmd/pk-put" | ||
"cmd/pk-mount" | ||
]; | ||
|
||
# genfileembed gets built regardless of -targets, to embed static | ||
# genfileembed gets built regardless of subPackages, to embed static | ||
# content into the Perkeep binaries. Remove it in post-install to | ||
# avoid polluting paths. | ||
postInstall = '' | ||
rm -f $out/bin/genfileembed | ||
''; | ||
|
||
meta = with lib; { | ||
meta = { | ||
description = "Way of storing, syncing, sharing, modelling and backing up content (née Camlistore)"; | ||
homepage = "https://perkeep.org"; | ||
license = licenses.asl20; | ||
maintainers = with maintainers; [ kalbasit ]; | ||
license = lib.licenses.asl20; | ||
maintainers = with lib.maintainers; [ kalbasit ]; | ||
}; | ||
} |