Skip to content

Commit

Permalink
ncps: init at 0.1.1 (NixOS#370149)
Browse files Browse the repository at this point in the history
  • Loading branch information
kalbasit authored Jan 2, 2025
2 parents af5da25 + 737defd commit 94b3591
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions pkgs/by-name/nc/ncps/package.nix
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 94b3591

Please sign in to comment.