nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit ffa65f7c2773aa2eef6b8f696e00da7e9ecc84a3
parent b95ecaf18b27933bc6f7f967a983379fabaf85f0
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Wed, 11 Aug 2021 20:27:31 +0300

Add stargazer

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/gemini/stargazer/default.nix | 41+++++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -187,6 +187,7 @@ lib.makeScope newScope ( kineto = callPackage ./gemini/kineto { }; satellite = callPackage ./gemini/satellite { }; shavit = callPackage ./gemini/shavit { }; + stargazer = callPackage ./gemini/stargazer { }; telescope = callPackage ./gemini/telescope { }; ### GIS diff --git a/pkgs/gemini/stargazer/default.nix b/pkgs/gemini/stargazer/default.nix @@ -0,0 +1,41 @@ +{ lib, rustPlatform, fetchFromSourcehut, scdoc, installShellFiles }: + +rustPlatform.buildRustPackage rec { + pname = "stargazer"; + version = "0.5.0"; + + src = fetchFromSourcehut { + owner = "~zethra"; + repo = pname; + rev = version; + hash = "sha256-sjo+4bppFD0Jq+CxyE7+NuDAYknNTAj84YWf3e2tMp4="; + }; + + cargoHash = "sha256-teUElOK28MlvsYCEGp3xCxRvKSoXVE69IioGiF/A1ZI="; + + nativeBuildInputs = [ scdoc installShellFiles ]; + + postBuild = '' + scdoc < doc/stargazer.scd > stargazer.1 + scdoc < doc/stargazer-ini.scd > stargazer.ini.5 + ''; + + postInstall = '' + installManPage stargazer.1 + installManPage stargazer.ini.5 + + install -Dm644 config.ini -t $out/share/stargazer + + installShellCompletion --bash target/**/completions/stargazer.bash + installShellCompletion --fish target/**/completions/stargazer.fish + installShellCompletion --zsh target/**/completions/_stargazer + ''; + + meta = with lib; { + description = "stargazer is a concurrent Gemini server using async io with no runtime dependencies"; + inherit (src.meta) homepage; + license = licenses.agpl3Plus; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.unix; + }; +}