oizys/pkgs/nim/nimble/default.nix

41 lines
906 B
Nix
Raw Normal View History

2024-09-14 11:14:03 -05:00
{
2024-11-22 16:39:29 -06:00
lib,
2024-09-14 11:14:03 -05:00
fetchFromGitHub,
buildNimPackage,
# deps
openssl,
2024-11-22 16:39:29 -06:00
nim,
makeWrapper,
2024-09-14 11:14:03 -05:00
}:
buildNimPackage (finalAttrs: {
pname = "nimble";
2024-12-13 09:43:53 -06:00
version = "0.16.4";
2024-09-14 11:14:03 -05:00
src = fetchFromGitHub {
owner = "nim-lang";
repo = "nimble";
rev = "v${finalAttrs.version}";
2024-12-13 09:43:53 -06:00
hash = "sha256-ASodRov4rO/IhjQRRdqVnLWMG1voXWM9F6R6VJd9qkM=";
2024-11-15 09:24:51 -06:00
fetchSubmodules = true;
2024-09-14 11:14:03 -05:00
};
2024-11-22 16:39:29 -06:00
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ openssl ];
2024-11-15 09:24:51 -06:00
2024-11-22 16:39:29 -06:00
nimFlags = [ "--define:git_revision_override=${finalAttrs.src.rev}" ];
doCheck = false; # it works on their machine
postInstall = ''
wrapProgram $out/bin/nimble \
--suffix PATH : ${lib.makeBinPath [ nim ]}
'';
meta = {
description = "Package manager for the Nim programming language";
homepage = "https://github.com/nim-lang/nimble";
license = lib.licenses.bsd3;
mainProgram = "nimble";
};
}
)