Merge pull request #24385 from kuznero/master

fsharp: init at 4.1.7

authored by Jörg Thalheim and committed by GitHub 1d84a914 e8f2046a

+168
+87
pkgs/development/compilers/fsharp41/default.nix
···
··· 1 + # Temporaririly avoid dependency on dotnetbuildhelpers to avoid rebuilding many times while working on it 2 + 3 + { stdenv, fetchurl, pkgconfig, autoconf, automake, which, mono, dotnetbuildhelpers, dotnetPackages }: 4 + 5 + stdenv.mkDerivation rec { 6 + name = "fsharp-${version}"; 7 + version = "4.1.7"; 8 + 9 + src = fetchurl { 10 + url = "https://github.com/fsharp/fsharp/archive/${version}.tar.gz"; 11 + sha256 = "0rfkrk4mzi4w54mfqilvng9ar5swhmnwhsyjc54rx3fd0np3jiyl"; 12 + }; 13 + 14 + buildInputs = [ 15 + pkgconfig 16 + autoconf 17 + automake 18 + which 19 + mono 20 + dotnetbuildhelpers 21 + dotnetPackages.FsCheck262 22 + dotnetPackages.FSharpCompilerTools 23 + dotnetPackages.FSharpCore 24 + dotnetPackages.FSharpData225 25 + dotnetPackages.FsLexYacc704 26 + dotnetPackages.MicrosoftDiaSymReader 27 + dotnetPackages.MicrosoftDiaSymReaderPortablePdb 28 + dotnetPackages.NUnit350 29 + dotnetPackages.SystemCollectionsImmutable131 30 + dotnetPackages.SystemReflectionMetadata 31 + dotnetPackages.SystemValueTuple 32 + ]; 33 + 34 + configurePhase = '' 35 + substituteInPlace ./autogen.sh --replace "/usr/bin/env sh" "/bin/sh" 36 + ./autogen.sh --prefix $out 37 + ''; 38 + 39 + preBuild = '' 40 + substituteInPlace Makefile --replace "MONO_ENV_OPTIONS=\$(monoopts) mono .nuget/NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget/NuGet.Config" "true" 41 + substituteInPlace src/fsharp/Fsc-proto/Fsc-proto.fsproj --replace "<FSharpCoreOptSigFiles Include=\"\$(FSharpCoreLkgPath)\\FSharp.Core.dll\" />" "" 42 + substituteInPlace src/fsharp/Fsc-proto/Fsc-proto.fsproj --replace "<FSharpCoreOptSigFiles Include=\"\$(FSharpCoreLkgPath)\\FSharp.Core.optdata\" />" "" 43 + substituteInPlace src/fsharp/Fsc-proto/Fsc-proto.fsproj --replace "<FSharpCoreOptSigFiles Include=\"\$(FSharpCoreLkgPath)\\FSharp.Core.sigdata\" />" "" 44 + substituteInPlace src/fsharp/Fsc-proto/Fsc-proto.fsproj --replace "<FSharpCoreOptSigFiles Include=\"\$(FSharpCoreLkgPath)\\FSharp.Core.xml\" />" "" 45 + 46 + rm -rf packages 47 + mkdir packages 48 + 49 + ln -s ${dotnetPackages.FsCheck262}/lib/dotnet/FsCheck packages/FsCheck.2.6.2 50 + ln -s ${dotnetPackages.FSharpCompilerTools}/lib/dotnet/FSharp.Compiler.Tools packages/FSharp.Compiler.Tools.4.1.4 51 + ln -s ${dotnetPackages.FSharpCore}/lib/dotnet/FSharp.Core/ packages/FSharp.Core.4.0.0.1 52 + ln -s ${dotnetPackages.FSharpData225}/lib/dotnet/FSharp.Data/ packages/FSharp.Data.2.2.5 53 + ln -s ${dotnetPackages.FsLexYacc704}/lib/dotnet/FsLexYacc/ packages/FsLexYacc.7.0.4 54 + ln -s ${dotnetPackages.MicrosoftDiaSymReader}/lib/dotnet/Microsoft.DiaSymReader/ packages/Microsoft.DiaSymReader.1.1.0 55 + ln -s ${dotnetPackages.MicrosoftDiaSymReaderPortablePdb}/lib/dotnet/Microsoft.DiaSymReader.PortablePdb/ packages/Microsoft.DiaSymReader.PortablePdb.1.2.0 56 + ln -s ${dotnetPackages.NUnit350}/lib/dotnet/NUnit/ packages/NUnit.3.5.0 57 + ln -s ${dotnetPackages.SystemCollectionsImmutable131}/lib/dotnet/System.Collections.Immutable/ packages/System.Collections.Immutable.1.3.1 58 + ln -s ${dotnetPackages.SystemReflectionMetadata}/lib/dotnet/System.Reflection.Metadata/ packages/System.Reflection.Metadata.1.4.2 59 + ln -s ${dotnetPackages.SystemValueTuple}/lib/dotnet/System.ValueTuple/ packages/System.ValueTuple.4.3.0 60 + ''; 61 + 62 + # Make sure the executables use the right mono binary, 63 + # and set up some symlinks for backwards compatibility. 64 + postInstall = '' 65 + substituteInPlace $out/bin/fsharpc --replace " mono " " ${mono}/bin/mono " 66 + substituteInPlace $out/bin/fsharpi --replace " mono " " ${mono}/bin/mono " 67 + substituteInPlace $out/bin/fsharpiAnyCpu --replace " mono " " ${mono}/bin/mono " 68 + ln -s $out/bin/fsharpc $out/bin/fsc 69 + ln -s $out/bin/fsharpi $out/bin/fsi 70 + for dll in "$out/lib/mono/fsharp"/FSharp*.dll 71 + do 72 + create-pkg-config-for-dll.sh "$out/lib/pkgconfig" "$dll" 73 + done 74 + ''; 75 + 76 + # To fix this error when running: 77 + # The file "/nix/store/path/whatever.exe" is an not a valid CIL image 78 + dontStrip = true; 79 + 80 + meta = { 81 + description = "A functional CLI language"; 82 + homepage = "http://fsharp.org/"; 83 + license = stdenv.lib.licenses.asl20; 84 + maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin ]; 85 + platforms = with stdenv.lib.platforms; unix; 86 + }; 87 + }
+4
pkgs/top-level/all-packages.nix
··· 5261 5262 fsharp = callPackage ../development/compilers/fsharp { }; 5263 5264 fstar = callPackage ../development/compilers/fstar { 5265 ocamlPackages = ocaml-ng.ocamlPackages_4_02; 5266 };
··· 5261 5262 fsharp = callPackage ../development/compilers/fsharp { }; 5263 5264 + fsharp41 = callPackage ../development/compilers/fsharp41 { 5265 + mono = mono46; 5266 + }; 5267 + 5268 fstar = callPackage ../development/compilers/fstar { 5269 ocamlPackages = ocaml-ng.ocamlPackages_4_02; 5270 };
+77
pkgs/top-level/dotnet-packages.nix
··· 46 outputFiles = [ "lib/net40/*" ]; 47 }; 48 49 FSharpDataSQLProvider = fetchNuGet { 50 baseName = "SQLProvider"; 51 version = "0.0.9-alpha"; ··· 60 outputFiles = [ "lib/net45/*" ]; 61 }; 62 63 FsCheckNunit = fetchNuGet { 64 baseName = "FsCheck.Nunit"; 65 version = "1.0.4"; ··· 67 outputFiles = [ "lib/net45/*" ]; 68 }; 69 70 FsLexYacc = fetchNuGet { 71 baseName = "FsLexYacc"; 72 version = "6.1.0"; ··· 74 outputFiles = [ "build/*" ]; 75 }; 76 77 FsPickler = fetchNuGet { 78 baseName = "FsPickler"; 79 version = "1.2.9"; ··· 102 outputFiles = [ "lib/*" ]; 103 }; 104 105 NUnit2 = fetchNuGet { 106 baseName = "NUnit"; 107 version = "2.6.4"; ··· 151 version = "4.7.49.5"; 152 sha256 = "1hv4lfxw72aql8siyqc4n954vzdz8p6jx9f2wrgzz0jy1k98x2mr"; 153 outputFiles = [ "tools/*" ]; 154 }; 155 156 RestSharp = fetchNuGet { ··· 195 outputFiles = [ "lib/*" ]; 196 }; 197 198 NUnitRunners = fetchNuGet { 199 baseName = "NUnit.Runners"; 200 version = "2.6.4"; ··· 208 version = "1.1.36"; 209 sha256 = "0760kzf5s771pnvnxsgas446kqdh1b71w6g3k75jpzldfmsd3vyq"; 210 outputFiles = [ "lib/portable-net45+win8+wp8+wpa81/*" ]; 211 }; 212 213 Suave = fetchNuGet {
··· 46 outputFiles = [ "lib/net40/*" ]; 47 }; 48 49 + FSharpCore = fetchNuGet { 50 + baseName = "FSharp.Core"; 51 + version = "4.0.0.1"; 52 + sha256 = "01nhjcxdz8l1r5vvdzhmgy5x7z5fqppab3ki34qg14axgf8jjygn"; 53 + outputFiles = [ "*" ]; 54 + }; 55 + 56 + FSharpData225 = fetchNuGet { 57 + baseName = "FSharp.Data"; 58 + version = "2.2.5"; 59 + sha256 = "1c9l6bk0d2srccash2980y9phq3kmfm0m76k4wghnysnq94vm724"; 60 + outputFiles = [ "*" ]; 61 + }; 62 + 63 FSharpDataSQLProvider = fetchNuGet { 64 baseName = "SQLProvider"; 65 version = "0.0.9-alpha"; ··· 74 outputFiles = [ "lib/net45/*" ]; 75 }; 76 77 + FsCheck262 = fetchNuGet { 78 + baseName = "FsCheck"; 79 + version = "2.6.2"; 80 + sha256 = "0fh9yvsc4i61z31qf00d6gjv6xxd54pv1ykf5bpv95a5crc3qfvl"; 81 + outputFiles = [ "*" ]; 82 + }; 83 + 84 FsCheckNunit = fetchNuGet { 85 baseName = "FsCheck.Nunit"; 86 version = "1.0.4"; ··· 88 outputFiles = [ "lib/net45/*" ]; 89 }; 90 91 + FSharpCompilerTools = fetchNuGet { 92 + baseName = "FSharp.Compiler.Tools"; 93 + version = "4.1.4"; 94 + sha256 = "0vsp0khlnwh15ibg8s161rw6a6i8rlriclpq53paga447jllf0m8"; 95 + outputFiles = [ "*" ]; 96 + }; 97 + 98 FsLexYacc = fetchNuGet { 99 baseName = "FsLexYacc"; 100 version = "6.1.0"; ··· 102 outputFiles = [ "build/*" ]; 103 }; 104 105 + FsLexYacc704 = fetchNuGet { 106 + baseName = "FsLexYacc"; 107 + version = "7.0.4"; 108 + sha256 = "01zpdb0pybdf0by02rwd7pb1g0cmnn8jxm2pibzxjxw6f4l43ywi"; 109 + outputFiles = [ "*" ]; 110 + }; 111 + 112 FsPickler = fetchNuGet { 113 baseName = "FsPickler"; 114 version = "1.2.9"; ··· 137 outputFiles = [ "lib/*" ]; 138 }; 139 140 + NUnit350 = fetchNuGet { 141 + baseName = "NUnit"; 142 + version = "3.5.0"; 143 + sha256 = "19fxq9cf754ygda5c8rn1zqs71pfxi7mb96jwqhlichnqih6i16z"; 144 + outputFiles = [ "*" ]; 145 + }; 146 + 147 NUnit2 = fetchNuGet { 148 baseName = "NUnit"; 149 version = "2.6.4"; ··· 193 version = "4.7.49.5"; 194 sha256 = "1hv4lfxw72aql8siyqc4n954vzdz8p6jx9f2wrgzz0jy1k98x2mr"; 195 outputFiles = [ "tools/*" ]; 196 + }; 197 + 198 + SystemValueTuple = fetchNuGet { 199 + baseName = "System.ValueTuple"; 200 + version = "4.3.0"; 201 + sha256 = "00p5s753xh5417arw3k6npf1pc1k3m1s9mrlkw5vmc7pg8lm6n88"; 202 + outputFiles = [ "*" ]; 203 }; 204 205 RestSharp = fetchNuGet { ··· 244 outputFiles = [ "lib/*" ]; 245 }; 246 247 + MicrosoftDiaSymReader = fetchNuGet { 248 + baseName = "Microsoft.DiaSymReader"; 249 + version = "1.1.0"; 250 + sha256 = "04dgwy6nyxksd1nb24k5c5vz8naggg7hryadvwqnm2v3alkh6g88"; 251 + outputFiles = [ "*" ]; 252 + }; 253 + 254 + MicrosoftDiaSymReaderPortablePdb = fetchNuGet { 255 + baseName = "Microsoft.DiaSymReader.PortablePdb"; 256 + version = "1.2.0"; 257 + sha256 = "0qa8sqg0lzz9galkkfyi8rkbkali0nxm3qd5y4dlxp96ngrq5ldz"; 258 + outputFiles = [ "*" ]; 259 + }; 260 + 261 NUnitRunners = fetchNuGet { 262 baseName = "NUnit.Runners"; 263 version = "2.6.4"; ··· 271 version = "1.1.36"; 272 sha256 = "0760kzf5s771pnvnxsgas446kqdh1b71w6g3k75jpzldfmsd3vyq"; 273 outputFiles = [ "lib/portable-net45+win8+wp8+wpa81/*" ]; 274 + }; 275 + 276 + SystemCollectionsImmutable131 = fetchNuGet { 277 + baseName = "System.Collections.Immutable"; 278 + version = "1.3.1"; 279 + sha256 = "149fcp7k7r9iw24dv5hbaij0c38kcv28dyhzbkggilfh4x2hy8c2"; 280 + outputFiles = [ "*" ]; 281 + }; 282 + 283 + SystemReflectionMetadata = fetchNuGet { 284 + baseName = "System.Reflection.Metadata"; 285 + version = "1.4.2"; 286 + sha256 = "19fhdgd35yg52gyckhgwrphq07nv7v7r73hcg69ns94xfg1i6r7i"; 287 + outputFiles = [ "*" ]; 288 }; 289 290 Suave = fetchNuGet {