git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #21519 from peterhoeg/f/nim

nim: wrap binary so it can find gcc

commitb6fbcc1dd335c3e6e6e3612e4219c118c67001ff authorMichael Raskin <7c6f434c@mail.ru> dateFri 30 Dec 2016, 09:51 (10 years ago) parent74caf88ebefef6
1 file changed+9−3
pkgs/development/compilers/nim/default.nix+9−3
pkgs/development/compilers/nim/default.nix+9−3
@@ -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}