nixpkgs-suyu/pkgs/servers/soft-serve/default.nix
Infinidoge 0d562a22d2
soft-serve: set meta.mainProgram to "soft"
This allows `nix run nixpkgs#soft-serve` to function, as ordinarily it would attempt to run `soft-serve`, which isn't present in the `bin` of the output.
2022-02-01 13:18:26 -05:00

34 lines
872 B
Nix

{ lib, buildGoModule, fetchFromGitHub, makeWrapper, git }:
buildGoModule rec {
pname = "soft-serve";
version = "0.1.2";
src = fetchFromGitHub {
owner = "charmbracelet";
repo = "soft-serve";
rev = "v${version}";
sha256 = "sha256-sRlEF1ee+oBnYOGSN6rDOvNr3OnfAqV+1Wx5XOyIylw=";
};
vendorSha256 = "sha256-txC85Y5t880XGgJb7tumDgqWTdTRCXXgATAtlWXF7n8=";
doCheck = false;
ldflags = [ "-s" "-w" "-X=main.Version=${version}" ];
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/soft \
--prefix PATH : "${lib.makeBinPath [ git ]}"
'';
meta = with lib; {
description = "A tasty, self-hosted Git server for the command line";
homepage = "https://github.com/charmbracelet/soft-serve";
mainProgram = "soft";
license = licenses.mit;
maintainers = with maintainers; [ penguwin ];
};
}