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-01-13 08:15:51 +00:00
|
|
|
version = "0.7.4";
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "charmbracelet";
|
|
|
|
repo = "soft-serve";
|
|
|
|
rev = "v${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-sPsyZpmk0DJoM2Qn+hvv/FZZkogyi1fa7eEW68Vwf+g=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
vendorHash = "sha256-1Fy/DwCnWg8VNonRSAnm4M9EHwMUBhBxcWBoMqHPuHQ=";
|
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; {
|
|
|
|
description = "A tasty, self-hosted Git server for the command line";
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|