nur-packages

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

package.nix (982B)


      1 {
      2   lib,
      3   stdenv,
      4   buildGoModule,
      5   fetchFromSourcehut,
      6   scdoc,
      7   installShellFiles,
      8 }:
      9 
     10 buildGoModule (finalAttrs: {
     11   pname = "astronaut";
     12   version = "0.1.3";
     13 
     14   __structuredAttrs = true;
     15 
     16   src = fetchFromSourcehut {
     17     owner = "~adnano";
     18     repo = "astronaut";
     19     rev = finalAttrs.version;
     20     hash = "sha256-YkaeJMabEHGcyYeEyiYXR2K8YKX7Qqo5mb1XzvKT2+U=";
     21   };
     22 
     23   nativeBuildInputs = [
     24     scdoc
     25     installShellFiles
     26   ];
     27 
     28   vendorHash = "sha256-4obhPl3Yvlrsf+C0vFpS/EOPEK7Kwm3GgbZ/ociihD8=";
     29 
     30   ldflags = [ "-X main.ShareDir=${placeholder "out"}/share/astronaut" ];
     31 
     32   postBuild = ''
     33     scdoc < docs/astronaut.1.scd > docs/astronaut.1
     34   '';
     35 
     36   postInstall = ''
     37     installManPage docs/astronaut.1
     38     install -Dm644 config/*.conf -t $out/share/astronaut
     39   '';
     40 
     41   meta = {
     42     description = "A Gemini browser for the terminal";
     43     homepage = "https://sr.ht/~adnano/astronaut";
     44     license = lib.licenses.gpl3Only;
     45     maintainers = [ lib.maintainers.sikmir ];
     46   };
     47 })