default.nix (956B)
1 { lib, stdenv, buildGoModule, fetchFromSourcehut, scdoc, installShellFiles }: 2 3 buildGoModule rec { 4 pname = "astronaut"; 5 version = "0.1.1"; 6 7 src = fetchFromSourcehut { 8 owner = "~adnano"; 9 repo = "astronaut"; 10 rev = version; 11 hash = "sha256-eiUStCM9rJB4O+LVWxih6untjTPynj9cHX2b8Gz9/nQ="; 12 }; 13 14 nativeBuildInputs = [ scdoc installShellFiles ]; 15 16 vendorHash = "sha256-7SyawlfJ9toNVuFehGr5GQF6mNmS9E4kkNcqWllp8No="; 17 18 ldflags = [ "-X main.ShareDir=${placeholder "out"}/share/astronaut" ]; 19 20 postBuild = '' 21 scdoc < docs/astronaut.1.scd > docs/astronaut.1 22 ''; 23 24 postInstall = '' 25 installManPage docs/astronaut.1 26 install -Dm644 config/*.conf -t $out/share/astronaut 27 ''; 28 29 meta = with lib; { 30 description = "A Gemini browser for the terminal"; 31 inherit (src.meta) homepage; 32 license = licenses.gpl3Only; 33 maintainers = [ maintainers.sikmir ]; 34 platforms = platforms.unix; 35 broken = stdenv.isDarwin; 36 }; 37 }