diff --git a/pkgs/nim/nimble/default.nix b/pkgs/nim/nimble/default.nix index 18fc594..42ce1d7 100644 --- a/pkgs/nim/nimble/default.nix +++ b/pkgs/nim/nimble/default.nix @@ -1,8 +1,11 @@ { + lib, fetchFromGitHub, buildNimPackage, # deps openssl, + nim, + makeWrapper, }: buildNimPackage (finalAttrs: { @@ -15,11 +18,23 @@ buildNimPackage (finalAttrs: { hash = "sha256-1tO/6sKPjmu9B6/cF00DeY/mnUHi2Y+hTEZ3WCqKoGw="; fetchSubmodules = true; }; - buildInputs = [ openssl ]; - doCheck = false; + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ openssl ]; - # localPassC needed from zippy since name mangling on nix is broken - nimFlags = [ - ''--passC:"-msse4.1 -mpclmul"'' - ]; -}) + 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"; + }; + } +)