2023-04-15 05:06:40 +00:00
|
|
|
{ lib
|
2023-05-21 06:58:16 +00:00
|
|
|
, stdenv
|
2023-04-15 05:06:40 +00:00
|
|
|
, fetchFromSourcehut
|
|
|
|
, rustPlatform
|
|
|
|
, installShellFiles
|
|
|
|
, scdoc
|
2023-05-21 06:58:16 +00:00
|
|
|
, Security
|
2023-11-26 16:02:02 +00:00
|
|
|
, nixosTests
|
2024-08-17 00:43:14 +00:00
|
|
|
, nix-update-script
|
2023-04-15 05:06:40 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "stargazer";
|
2024-08-17 00:43:14 +00:00
|
|
|
version = "1.3.0";
|
2023-04-15 05:06:40 +00:00
|
|
|
|
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~zethra";
|
|
|
|
repo = "stargazer";
|
|
|
|
rev = version;
|
2024-08-17 00:43:14 +00:00
|
|
|
hash = "sha256-Qzg9sCdD29FghHMY6obeVHMD0SRvzi9J6MhEUvcQgbE=";
|
2023-04-15 05:06:40 +00:00
|
|
|
};
|
|
|
|
|
2024-08-17 00:43:14 +00:00
|
|
|
cargoHash = "sha256-SQzYEFdSUC1znukot3G3WoOsQGlYP7ICXpoy/w9eO8A=";
|
2023-04-15 05:06:40 +00:00
|
|
|
|
2024-08-17 00:43:14 +00:00
|
|
|
passthru = {
|
|
|
|
tests.basic-functionality = nixosTests.stargazer;
|
|
|
|
updateScript = nix-update-script { };
|
2023-11-26 16:02:02 +00:00
|
|
|
};
|
|
|
|
|
2023-04-15 05:06:40 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles scdoc ];
|
|
|
|
|
2023-05-21 06:58:16 +00:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin Security;
|
|
|
|
|
2023-04-15 05:06:40 +00:00
|
|
|
postInstall = ''
|
|
|
|
scdoc < doc/stargazer.scd > stargazer.1
|
|
|
|
scdoc < doc/stargazer-ini.scd > stargazer.ini.5
|
|
|
|
installManPage stargazer.1
|
|
|
|
installManPage stargazer.ini.5
|
|
|
|
installShellCompletion completions/stargazer.{bash,zsh,fish}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Fast and easy to use Gemini server";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "stargazer";
|
2023-04-15 05:06:40 +00:00
|
|
|
homepage = "https://sr.ht/~zethra/stargazer/";
|
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
changelog = "https://git.sr.ht/~zethra/stargazer/refs/${version}";
|
|
|
|
maintainers = with maintainers; [ gaykitty ];
|
|
|
|
};
|
|
|
|
}
|