ncps: init at 0.1.1 (#370149)

This commit is contained in:
Wael Nasreddine
2025-01-01 23:55:12 -08:00
committed by GitHub

View File

@@ -0,0 +1,47 @@
{
buildGoModule,
dbmate,
fetchFromGitHub,
lib,
}:
let
finalAttrs = {
pname = "ncps";
version = "v0.1.1";
src = fetchFromGitHub {
owner = "kalbasit";
repo = "ncps";
rev = finalAttrs.version;
hash = "sha256-Vr/thppCABdZDl1LEc7l7c7Ih55U/EFwJInWSUWoLJA";
};
ldflags = [
"-X github.com/kalbasit/ncps/cmd.Version=${finalAttrs.version}"
];
subPackages = [ "." ];
vendorHash = "sha256-xPrWofNyDFrUPQ42AYDs2x2gGoQ2w3tRrMIsu3SVyHA=";
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