at v192 1.6 kB view raw
1# Temporaririly avoid dependency on dotnetbuildhelpers to avoid rebuilding many times while working on it 2 3{ stdenv, fetchurl, mono, pkgconfig, dotnetbuildhelpers, autoconf, automake, which }: 4 5stdenv.mkDerivation rec { 6 name = "fsharp-${version}"; 7 version = "3.1.2.5"; 8 9 src = fetchurl { 10 url = "https://github.com/fsharp/fsharp/archive/${version}.tar.gz"; 11 sha256 = "1j6lnzvhj8fj1csb9am9xcrmmph6v3jyangkq8n1yp3dr6yxqzh1"; 12 }; 13 14 buildInputs = [ mono pkgconfig dotnetbuildhelpers autoconf automake which ]; 15 configurePhase = '' 16 substituteInPlace ./autogen.sh --replace "/usr/bin/env sh" "/bin/sh" 17 ./autogen.sh --prefix $out 18 ''; 19 20 # Make sure the executables use the right mono binary, 21 # and set up some symlinks for backwards compatibility. 22 postInstall = '' 23 substituteInPlace $out/bin/fsharpc --replace " mono " " ${mono}/bin/mono " 24 substituteInPlace $out/bin/fsharpi --replace " mono " " ${mono}/bin/mono " 25 substituteInPlace $out/bin/fsharpiAnyCpu --replace " mono " " ${mono}/bin/mono " 26 ln -s $out/bin/fsharpc $out/bin/fsc 27 ln -s $out/bin/fsharpi $out/bin/fsi 28 for dll in "$out/lib/mono/4.5"/FSharp*.dll 29 do 30 create-pkg-config-for-dll.sh "$out/lib/pkgconfig" "$dll" 31 done 32 ''; 33 34 # To fix this error when running: 35 # The file "/nix/store/path/whatever.exe" is an not a valid CIL image 36 dontStrip = true; 37 38 meta = { 39 description = "A functional CLI language"; 40 homepage = "http://fsharp.org/"; 41 license = stdenv.lib.licenses.asl20; 42 maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin ]; 43 platforms = with stdenv.lib.platforms; linux; 44 }; 45}