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