@@ -1,26 +1,32 @@
1−{ stdenv, fetchurl, unzip }:
1+{ stdenv, lib, fetchurl, makeWrapper, gcc }:
22
33stdenv.mkDerivation rec {
4− name = "nim-0.15.2";
4+ name = "nim-${version}";
5+ version = "0.15.2";
56
67 src = fetchurl {
78 url = "http://nim-lang.org/download/${name}.tar.xz";
89 sha256 = "12pyzjx7x4hclzrf3zf6r1qjlp60bzsaqrz0rax2rak2c8qz4pch";
910 };
1011
12+ buildInputs = [ makeWrapper ];
13+
1114 buildPhase = "sh build.sh";
15+
1216 installPhase =
1317 ''
1418 install -Dt "$out/bin" bin/nim
1519 substituteInPlace install.sh --replace '$1/nim' "$out"
1620 sh install.sh $out
21+ wrapProgram $out/bin/nim \
22+ --suffix PATH : ${lib.makeBinPath [ gcc ]}
1723 '';
1824
1925 meta = with stdenv.lib;
2026 { description = "Statically typed, imperative programming language";
2127 homepage = http://nim-lang.org/;
2228 license = licenses.mit;
23− maintainers = with maintainers; [ ehmry ];
29+ maintainers = with maintainers; [ ehmry peterhoeg ];
2430 platforms = platforms.linux ++ platforms.darwin; # arbitrary
2531 };
2632}