2023-11-16 04:20:00 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, nixosTests, git, bash }:
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "soft-serve";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.7.6";
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "charmbracelet";
|
|
|
|
repo = "soft-serve";
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-Ga1RpBkEzuPTu0j+dGg2WX6E3y9hcUJTRPx6XPz4bfk=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
vendorHash = "sha256-eri/GAsJgsmT73orTawCMS6o/FYCBv33yVb1qA+/LqY=";
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" "-X=main.Version=${version}" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2023-11-16 04:20:00 +00:00
|
|
|
# Soft-serve generates git-hooks at run-time.
|
|
|
|
# The scripts require git and bash inside the path.
|
2021-12-19 01:06:50 +00:00
|
|
|
wrapProgram $out/bin/soft \
|
2023-11-16 04:20:00 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ git bash ]}"
|
2021-12-19 01:06:50 +00:00
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.tests = nixosTests.soft-serve;
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tasty, self-hosted Git server for the command line";
|
2021-12-19 01:06:50 +00:00
|
|
|
homepage = "https://github.com/charmbracelet/soft-serve";
|
2022-06-16 17:23:12 +00:00
|
|
|
changelog = "https://github.com/charmbracelet/soft-serve/releases/tag/v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
mainProgram = "soft";
|
2021-12-19 01:06:50 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ penguwin ];
|
|
|
|
};
|
|
|
|
}
|