about summary refs log tree commit diff
path: root/pkgs/development/compilers/nim
diff options
context:
space:
mode:
authorPeter Hoeg <peter@speartail.com>2016-12-30 15:27:28 +0800
committerPeter Hoeg <peter@speartail.com>2016-12-30 15:27:28 +0800
commitebefef6f6d4914325e99527cd7217f4bd75d864c (patch)
tree017b55c5958bcf7df4275bfa9c7dbecd0b04c12a /pkgs/development/compilers/nim
parentc311871a6d0a3f83a0cec3e6b8804a741b83dcb5 (diff)
downloadnixlib-ebefef6f6d4914325e99527cd7217f4bd75d864c.tar
nixlib-ebefef6f6d4914325e99527cd7217f4bd75d864c.tar.gz
nixlib-ebefef6f6d4914325e99527cd7217f4bd75d864c.tar.bz2
nixlib-ebefef6f6d4914325e99527cd7217f4bd75d864c.tar.lz
nixlib-ebefef6f6d4914325e99527cd7217f4bd75d864c.tar.xz
nixlib-ebefef6f6d4914325e99527cd7217f4bd75d864c.tar.zst
nixlib-ebefef6f6d4914325e99527cd7217f4bd75d864c.zip
nim: wrap gcc
Diffstat (limited to 'pkgs/development/compilers/nim')
-rw-r--r--pkgs/development/compilers/nim/default.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/development/compilers/nim/default.nix b/pkgs/development/compilers/nim/default.nix
index 0dfdea6d3d14..c3eaf7059869 100644
--- a/pkgs/development/compilers/nim/default.nix
+++ b/pkgs/development/compilers/nim/default.nix
@@ -1,26 +1,32 @@
-{ stdenv, fetchurl, unzip }:
+{ stdenv, lib, fetchurl, makeWrapper, gcc }:
 
 stdenv.mkDerivation rec {
-  name = "nim-0.15.2";
+  name = "nim-${version}";
+  version = "0.15.2";
 
   src = fetchurl {
     url = "http://nim-lang.org/download/${name}.tar.xz";
     sha256 = "12pyzjx7x4hclzrf3zf6r1qjlp60bzsaqrz0rax2rak2c8qz4pch";
   };
 
+  buildInputs  = [ makeWrapper ];
+
   buildPhase   = "sh build.sh";
+
   installPhase =
     ''
       install -Dt "$out/bin" bin/nim
       substituteInPlace install.sh --replace '$1/nim' "$out"
       sh install.sh $out
+      wrapProgram $out/bin/nim \
+        --suffix PATH : ${lib.makeBinPath [ gcc ]}
     '';
 
   meta = with stdenv.lib;
     { description = "Statically typed, imperative programming language";
       homepage = http://nim-lang.org/;
       license = licenses.mit;
-      maintainers = with maintainers; [ ehmry ];
+      maintainers = with maintainers; [ ehmry peterhoeg ];
       platforms = platforms.linux ++ platforms.darwin; # arbitrary
     };
 }