Merge pull request #21519 from peterhoeg/f/nim

nim: wrap binary so it can find gcc

authored by Michael Raskin and committed by GitHub b6fbcc1d 74caf88a

+9 -3
+9 -3
pkgs/development/compilers/nim/default.nix
··· 1 - { stdenv, fetchurl, unzip }: 1 + { stdenv, lib, fetchurl, makeWrapper, gcc }: 2 2 3 3 stdenv.mkDerivation rec { 4 - name = "nim-0.15.2"; 4 + name = "nim-${version}"; 5 + version = "0.15.2"; 5 6 6 7 src = fetchurl { 7 8 url = "http://nim-lang.org/download/${name}.tar.xz"; 8 9 sha256 = "12pyzjx7x4hclzrf3zf6r1qjlp60bzsaqrz0rax2rak2c8qz4pch"; 9 10 }; 10 11 12 + buildInputs = [ makeWrapper ]; 13 + 11 14 buildPhase = "sh build.sh"; 15 + 12 16 installPhase = 13 17 '' 14 18 install -Dt "$out/bin" bin/nim 15 19 substituteInPlace install.sh --replace '$1/nim' "$out" 16 20 sh install.sh $out 21 + wrapProgram $out/bin/nim \ 22 + --suffix PATH : ${lib.makeBinPath [ gcc ]} 17 23 ''; 18 24 19 25 meta = with stdenv.lib; 20 26 { description = "Statically typed, imperative programming language"; 21 27 homepage = http://nim-lang.org/; 22 28 license = licenses.mit; 23 - maintainers = with maintainers; [ ehmry ]; 29 + maintainers = with maintainers; [ ehmry peterhoeg ]; 24 30 platforms = platforms.linux ++ platforms.darwin; # arbitrary 25 31 }; 26 32 }