Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / tools / nrpl / default.nix
blob84147faf74e5ac75e748e5d36f6d43a2e131b543
1 { lib, nimPackages, fetchFromGitHub, fetchpatch, makeWrapper, pcre, tinycc }:
3 nimPackages.buildNimPackage {
4   pname = "nrpl";
5   version = "20150522";
6   nimBinOnly = true;
8   src = fetchFromGitHub {
9     owner  = "wheineman";
10     repo   = "nrpl";
11     rev    = "6d6c189ab7d1c905cc29dc678d66e9e132026f69";
12     sha256 = "1cly9lhrawnc42r31b7r0p0i6hcx8r00aa17gv7w9pcpj8ngb4v2";
13   };
15   nativeBuildInputs = [ makeWrapper ];
16   buildInputs = [ pcre ];
18   patches = [
19     (fetchpatch {
20       url    = "https://patch-diff.githubusercontent.com/raw/wheineman/nrpl/pull/12.patch";
21       name   = "update_for_new_nim.patch";
22       sha256 = "1zff7inhn3l1jnxcnidy705lzi3wqib1chf4rayh1g9i23an7wg1";
23     })
24   ];
26   NIX_LDFLAGS = "-lpcre";
28   postFixup = ''
29     wrapProgram $out/bin/nrpl \
30       --prefix PATH : ${lib.makeBinPath [ nimPackages.nim tinycc ]}
31   '';
33   meta = with lib; {
34     description = "REPL for the Nim programming language";
35     homepage = "https://github.com/wheineman/nrpl";
36     license = licenses.mit;
37     maintainers = with maintainers; [ peterhoeg ];
38     platforms = with platforms; linux ++ darwin;
39   };