summary refs log tree commit diff
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2017-01-01 07:51:45 -0500
committerGitHub <noreply@github.com>2017-01-01 07:51:45 -0500
commitc58b4cf69394c406b963c9b141b45886d68e9593 (patch)
tree6be576a130c7b0512d22c808ae00cb150acfa596
parent11fe837758d87cea8865159486cb0dcd34870436 (diff)
parent7a720abc03c5340cc84b6d053d07e66eb9e407ad (diff)
downloadnixpkgs-c58b4cf69394c406b963c9b141b45886d68e9593.tar
nixpkgs-c58b4cf69394c406b963c9b141b45886d68e9593.tar.gz
nixpkgs-c58b4cf69394c406b963c9b141b45886d68e9593.tar.bz2
nixpkgs-c58b4cf69394c406b963c9b141b45886d68e9593.tar.lz
nixpkgs-c58b4cf69394c406b963c9b141b45886d68e9593.tar.xz
nixpkgs-c58b4cf69394c406b963c9b141b45886d68e9593.tar.zst
nixpkgs-c58b4cf69394c406b963c9b141b45886d68e9593.zip
Merge pull request #21520 from peterhoeg/p/nrpl
nrpl: init at 20150521
-rw-r--r--pkgs/development/tools/nrpl/default.nix44
-rw-r--r--pkgs/top-level/all-packages.nix1
2 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/development/tools/nrpl/default.nix b/pkgs/development/tools/nrpl/default.nix
new file mode 100644
index 00000000000..d6a35723590
--- /dev/null
+++ b/pkgs/development/tools/nrpl/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, lib, fetchFromGitHub, fetchpatch, makeWrapper, nim, pcre, tinycc }:
+
+stdenv.mkDerivation rec {
+  name = "nrpl-${version}";
+  version = "20150522";
+
+  src = fetchFromGitHub {
+    owner  = "wheineman";
+    repo   = "nrpl";
+    rev    = "6d6c189ab7d1c905cc29dc678d66e9e132026f69";
+    sha256 = "1cly9lhrawnc42r31b7r0p0i6hcx8r00aa17gv7w9pcpj8ngb4v2";
+  };
+
+  buildInputs = [ makeWrapper nim pcre ];
+
+  patches = [
+    (fetchpatch {
+      url    = https://patch-diff.githubusercontent.com/raw/wheineman/nrpl/pull/12.patch;
+      name   = "update_for_new_nim.patch";
+      sha256 = "1zff7inhn3l1jnxcnidy705lzi3wqib1chf4rayh1g9i23an7wg1";
+    })
+  ];
+
+  NIX_LDFLAGS = [
+    "-lpcre"
+  ];
+
+  buildPhase = "nim c -d:release nrpl.nim";
+
+  installPhase = "install -Dt $out/bin nrpl";
+
+  postFixup = ''
+    wrapProgram $out/bin/nrpl \
+      --prefix PATH : ${lib.makeBinPath [ nim tinycc ]}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "REPL for the Nim programming language";
+    homepage = https://github.com/wheineman/nrpl;
+    license = licenses.mit;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index be7d441047f..72101e97c72 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -5231,6 +5231,7 @@ in
 
   nim = callPackage ../development/compilers/nim { };
   nimble = callPackage ../development/tools/nimble { };
+  nrpl = callPackage ../development/tools/nrpl { };
 
   neko = callPackage ../development/compilers/neko { };