nixpkgs/pkgs/by-name/nc/ncps/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
962 B
Nix
Raw Permalink Normal View History

2025-01-01 13:20:05 -08:00
{
buildGoModule,
dbmate,
fetchFromGitHub,
lib,
}:
let
finalAttrs = {
pname = "ncps";
2025-04-30 13:22:17 +00:00
version = "0.2.0";
2025-01-01 13:20:05 -08:00
src = fetchFromGitHub {
owner = "kalbasit";
repo = "ncps";
tag = "v${finalAttrs.version}";
2025-04-30 13:22:17 +00:00
hash = "sha256-CjiPn5godd8lT3eE9e7MnZ0/2hOEq+CG0bpgRtLtwHo=";
2025-01-01 13:20:05 -08:00
};
ldflags = [
"-X github.com/kalbasit/ncps/cmd.Version=v${finalAttrs.version}"
2025-01-01 13:20:05 -08:00
];
subPackages = [ "." ];
2025-04-30 13:22:17 +00:00
vendorHash = "sha256-El3yvYYnase4ztG3u7xxcKE5ARy5Lvp/FVosBwOXzbU=";
2025-01-01 13:20:05 -08:00
doCheck = true;
nativeBuildInputs = [
dbmate # used for testing
];
postInstall = ''
mkdir -p $out/share/ncps
cp -r db $out/share/ncps/db
'';
meta = {
description = "Nix binary cache proxy service";
homepage = "https://github.com/kalbasit/ncps";
license = lib.licenses.mit;
mainProgram = "ncps";
maintainers = [ lib.maintainers.kalbasit ];
};
};
in
buildGoModule finalAttrs