depot/third_party/nixpkgs/pkgs/by-name/ni/nim_lk/package.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

52 lines
1 KiB
Nix

{
lib,
buildNimPackage,
fetchFromSourcehut,
nim,
nix-prefetch,
nix-prefetch-git,
openssl,
makeWrapper,
}:
let
nim' = nim.passthru.nim;
in
buildNimPackage (finalAttrs: {
pname = "nim_lk";
version = "20240510";
src = fetchFromSourcehut {
owner = "~ehmry";
repo = "nim_lk";
rev = finalAttrs.version;
hash = "sha256-fwoGyYkbGstWG0qw15dOq1gmr3GyIn6ZEBeBmEivHlA=";
};
lockFile = ./lock.json;
buildInputs = [ openssl ];
nativeBuildInputs = [ makeWrapper ];
nimFlags = [ "--path:${nim'}/nim" ];
postFixup = ''
wrapProgram $out/bin/nim_lk \
--suffix PATH : ${
lib.makeBinPath [
nim'
nix-prefetch
nix-prefetch-git
]
}
'';
meta = finalAttrs.src.meta // {
description = "Generate Nix specific lock files for Nim packages";
homepage = "https://git.sr.ht/~ehmry/nim_lk";
mainProgram = "nim_lk";
license = lib.licenses.bsd3;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ ehmry ];
};
})