nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildNimPackage,
4 fetchFromGitHub,
5 nim,
6 openssl,
7 makeWrapper,
8
9 nix-update-script,
10}:
11
12buildNimPackage (
13 final: prev: {
14 pname = "nimble";
15 version = "0.20.1";
16
17 src = fetchFromGitHub {
18 owner = "nim-lang";
19 repo = "nimble";
20 rev = "v${final.version}";
21 hash = "sha256-DV/cheAoG0UviYEYqfaonhrAl4MgjDwFqbbKx7jUnKE=";
22 fetchSubmodules = true;
23 };
24
25 nativeBuildInputs = [ makeWrapper ];
26 buildInputs = [ openssl ];
27
28 nimFlags = [ "--define:git_revision_override=${final.src.rev}" ];
29
30 doCheck = false; # it works on their machine
31
32 postInstall = ''
33 wrapProgram $out/bin/nimble \
34 --suffix PATH : ${lib.makeBinPath [ nim ]}
35 '';
36
37 passthru.updateScript = nix-update-script { };
38
39 meta = {
40 description = "Package manager for the Nim programming language";
41 homepage = "https://github.com/nim-lang/nimble";
42 changelog = "https://github.com/nim-lang/nimble/releases/tag/v${final.version}";
43 license = lib.licenses.bsd3;
44 mainProgram = "nimble";
45 teams = [ lib.teams.nim ];
46 };
47 }
48)