2016-12-30 07:27:28 +00:00
|
|
|
{ stdenv, lib, fetchurl, makeWrapper, gcc }:
|
2015-02-10 14:48:41 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-12-30 07:27:28 +00:00
|
|
|
name = "nim-${version}";
|
2017-01-09 12:06:04 +00:00
|
|
|
version = "0.16.0";
|
2015-02-10 14:48:41 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-01-20 16:47:43 +00:00
|
|
|
url = "http://nim-lang.org/download/${name}.tar.xz";
|
2017-01-09 12:06:04 +00:00
|
|
|
sha256 = "0rsibhkc5n548bn9yyb9ycrdgaph5kq84sfxc9gabjs7pqirh6cy";
|
2015-02-10 14:48:41 +00:00
|
|
|
};
|
|
|
|
|
2016-12-30 07:27:28 +00:00
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
2015-02-10 14:48:41 +00:00
|
|
|
buildPhase = "sh build.sh";
|
2016-12-30 07:27:28 +00:00
|
|
|
|
2015-02-10 14:48:41 +00:00
|
|
|
installPhase =
|
|
|
|
''
|
2015-12-05 12:59:05 +00:00
|
|
|
install -Dt "$out/bin" bin/nim
|
2015-02-10 14:48:41 +00:00
|
|
|
substituteInPlace install.sh --replace '$1/nim' "$out"
|
|
|
|
sh install.sh $out
|
2016-12-30 07:27:28 +00:00
|
|
|
wrapProgram $out/bin/nim \
|
|
|
|
--suffix PATH : ${lib.makeBinPath [ gcc ]}
|
2015-02-10 14:48:41 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib;
|
|
|
|
{ description = "Statically typed, imperative programming language";
|
|
|
|
homepage = http://nim-lang.org/;
|
|
|
|
license = licenses.mit;
|
2016-12-30 07:27:28 +00:00
|
|
|
maintainers = with maintainers; [ ehmry peterhoeg ];
|
2015-11-16 22:50:40 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin; # arbitrary
|
2015-02-10 14:48:41 +00:00
|
|
|
};
|
|
|
|
}
|