nur-packages

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

default.nix (1069B)


      1 { lib, stdenv, rustPlatform, fetchFromSourcehut, Security, scdoc }:
      2 
      3 rustPlatform.buildRustPackage rec {
      4   pname = "stargazer";
      5   version = "1.0.5";
      6 
      7   src = fetchFromSourcehut {
      8     owner = "~zethra";
      9     repo = "stargazer";
     10     rev = version;
     11     hash = "sha256-n88X3RJD7PqOcVRK/bp/gMNLVrbwnJ2iwi2rCpsfp+o=";
     12   };
     13 
     14   cargoHash = "sha256-Yqh3AQIOahKz2mLeVNm58Yr6vhjU4aQwN62y3Z5/EJc=";
     15 
     16   nativeBuildInputs = [ scdoc ];
     17 
     18   buildInputs = lib.optional stdenv.isDarwin Security;
     19 
     20   postBuild = ''
     21     scdoc < doc/stargazer.scd > stargazer.1
     22     scdoc < doc/stargazer-ini.scd > stargazer.ini.5
     23   '';
     24 
     25   postInstall = ''
     26     sh scripts/install \
     27       --prefix=$out \
     28       --bashdir=$out/share/bash-completion/completions \
     29       --zshdir=$out/share/zsh/site-functions \
     30       --fishdir=$out/share/fish/vendor_completions.d
     31   '';
     32 
     33   meta = with lib; {
     34     description = "stargazer is a concurrent Gemini server using async io with no runtime dependencies";
     35     inherit (src.meta) homepage;
     36     license = licenses.agpl3Plus;
     37     maintainers = [ maintainers.sikmir ];
     38   };
     39 }