diff options
Diffstat (limited to 'pkgs/development/compilers')
9 files changed, 144 insertions, 33 deletions
diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index 90355896064c1..ff1672973055c 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -200,5 +200,12 @@ in rec { binary = binaryCrystal_0_29; }; - crystal = crystal_0_29; + crystal_0_30 = generic { + version = "0.30.1"; + sha256 = "0fbk784zjflsl3hys5a1xmn8mda8kb2z7ql58wpyfavivswxanbs"; + doCheck = false; # 6 checks are failing now + binary = binaryCrystal_0_29; + }; + + crystal = crystal_0_30; } diff --git a/pkgs/development/compilers/fsharp41/default.nix b/pkgs/development/compilers/fsharp41/default.nix index b41c32be18f7f..e497deb2e873b 100644 --- a/pkgs/development/compilers/fsharp41/default.nix +++ b/pkgs/development/compilers/fsharp41/default.nix @@ -1,14 +1,14 @@ # Temporaririly avoid dependency on dotnetbuildhelpers to avoid rebuilding many times while working on it -{ stdenv, fetchurl, pkgconfig, autoconf, automake, which, mono, dotnetbuildhelpers, dotnetPackages }: +{ stdenv, fetchurl, pkgconfig, autoconf, automake, which, mono, msbuild, dotnetbuildhelpers, dotnetPackages }: stdenv.mkDerivation rec { pname = "fsharp"; - version = "4.1.7"; + version = "4.1.34"; src = fetchurl { url = "https://github.com/fsharp/fsharp/archive/${version}.tar.gz"; - sha256 = "0rfkrk4mzi4w54mfqilvng9ar5swhmnwhsyjc54rx3fd0np3jiyl"; + sha256 = "0cv6p5pin962vhbpsji40nkckkag5c96kq5qihvg60pc1z821p0i"; }; nativeBuildInputs = [ pkgconfig ]; @@ -17,12 +17,16 @@ stdenv.mkDerivation rec { automake which mono + msbuild dotnetbuildhelpers dotnetPackages.FsCheck262 dotnetPackages.FSharpCompilerTools - dotnetPackages.FSharpCore + dotnetPackages.FSharpCore302 + dotnetPackages.FSharpCore3125 + dotnetPackages.FSharpCore4001 + dotnetPackages.FSharpCore4117 dotnetPackages.FSharpData225 - dotnetPackages.FsLexYacc704 + dotnetPackages.FsLexYacc706 dotnetPackages.MicrosoftDiaSymReader dotnetPackages.MicrosoftDiaSymReaderPortablePdb dotnetPackages.NUnit350 @@ -31,6 +35,14 @@ stdenv.mkDerivation rec { dotnetPackages.SystemValueTuple ]; + # https://github.com/mono/mono/tree/fe0f311a848068ab2d17a9b9dd15326e5712d520/packaging/MacSDK/patches + # https://github.com/mono/mono/issues/7805 + patches = [ + ./fsharp-IsPathRooted-type-inference.patch + ./fsharp-string-switchName.patch + ./fsharp-path-overloads.patch + ]; + configurePhase = '' substituteInPlace ./autogen.sh --replace "/usr/bin/env sh" "${stdenv.shell}" ./autogen.sh --prefix $out @@ -47,24 +59,30 @@ stdenv.mkDerivation rec { mkdir packages ln -s ${dotnetPackages.FsCheck262}/lib/dotnet/FsCheck packages/FsCheck.2.6.2 - ln -s ${dotnetPackages.FSharpCompilerTools}/lib/dotnet/FSharp.Compiler.Tools packages/FSharp.Compiler.Tools.4.1.4 - ln -s ${dotnetPackages.FSharpCore}/lib/dotnet/FSharp.Core/ packages/FSharp.Core.4.0.0.1 + ln -s ${dotnetPackages.FSharpCompilerTools}/lib/dotnet/FSharp.Compiler.Tools packages/FSharp.Compiler.Tools.4.1.27 + ln -s ${dotnetPackages.FSharpCore302}/lib/dotnet/FSharp.Core/ packages/FSharp.Core.3.0.2 + ln -s ${dotnetPackages.FSharpCore3125}/lib/dotnet/FSharp.Core/ packages/FSharp.Core.3.1.2.5 + ln -s ${dotnetPackages.FSharpCore4001}/lib/dotnet/FSharp.Core/ packages/FSharp.Core.4.0.0.1 + ln -s ${dotnetPackages.FSharpCore4117}/lib/dotnet/FSharp.Core/ packages/FSharp.Core.4.1.17 ln -s ${dotnetPackages.FSharpData225}/lib/dotnet/FSharp.Data/ packages/FSharp.Data.2.2.5 - ln -s ${dotnetPackages.FsLexYacc704}/lib/dotnet/FsLexYacc/ packages/FsLexYacc.7.0.4 + ln -s ${dotnetPackages.FsLexYacc706}/lib/dotnet/FsLexYacc/ packages/FsLexYacc.7.0.6 ln -s ${dotnetPackages.MicrosoftDiaSymReader}/lib/dotnet/Microsoft.DiaSymReader/ packages/Microsoft.DiaSymReader.1.1.0 ln -s ${dotnetPackages.MicrosoftDiaSymReaderPortablePdb}/lib/dotnet/Microsoft.DiaSymReader.PortablePdb/ packages/Microsoft.DiaSymReader.PortablePdb.1.2.0 ln -s ${dotnetPackages.NUnit350}/lib/dotnet/NUnit/ packages/NUnit.3.5.0 ln -s ${dotnetPackages.SystemCollectionsImmutable131}/lib/dotnet/System.Collections.Immutable/ packages/System.Collections.Immutable.1.3.1 ln -s ${dotnetPackages.SystemReflectionMetadata}/lib/dotnet/System.Reflection.Metadata/ packages/System.Reflection.Metadata.1.4.2 - ln -s ${dotnetPackages.SystemValueTuple}/lib/dotnet/System.ValueTuple/ packages/System.ValueTuple.4.3.0 + ln -s ${dotnetPackages.SystemValueTuple}/lib/dotnet/System.ValueTuple/ packages/System.ValueTuple.4.3.1 ''; - # Make sure the executables use the right mono binary, - # and set up some symlinks for backwards compatibility. + # Signing /home/jdanek/nix/nixpkgs/build/fss/fsharp-4.1.34/again/fsharp-4.1.34/Release/fsharp30/net40/bin/FSharp.Core.dll with Mono key + # ERROR: Unknown error during processing: System.UnauthorizedAccessException: Access to the path + # "Release/fsharp30/net40/bin/FSharp.Core.dll" is denied. + preInstall = '' + find Release/ -name FSharp.Core.dll -exec chmod u+w {} \; + ''; + + # Set up some symlinks for backwards compatibility. postInstall = '' - substituteInPlace $out/bin/fsharpc --replace " mono " " ${mono}/bin/mono " - substituteInPlace $out/bin/fsharpi --replace " mono " " ${mono}/bin/mono " - substituteInPlace $out/bin/fsharpiAnyCpu --replace " mono " " ${mono}/bin/mono " ln -s $out/bin/fsharpc $out/bin/fsc ln -s $out/bin/fsharpi $out/bin/fsi for dll in "$out/lib/mono/fsharp"/FSharp*.dll @@ -73,6 +91,26 @@ stdenv.mkDerivation rec { done ''; + doInstallCheck = true; + installCheckPhase = '' + echo 'printf "int = %i" (6 * 7);;' > script.fsx + $out/bin/fsi --exec script.fsx | grep "int = 42" + $out/bin/fsharpi --exec script.fsx | grep "int = 42" + $out/bin/fsharpiAnyCpu --exec script.fsx | grep "int = 42" + + cat > answer.fs <<EOF +open System + +[<EntryPoint>] +let main argv = + printfn "int = %i" (6 * 7) + 0 +EOF + + $out/bin/fsc answer.fs + ${mono}/bin/mono answer.exe | grep "int = 42" + ''; + # To fix this error when running: # The file "/nix/store/path/whatever.exe" is an not a valid CIL image dontStrip = true; diff --git a/pkgs/development/compilers/fsharp41/fsharp-IsPathRooted-type-inference.patch b/pkgs/development/compilers/fsharp41/fsharp-IsPathRooted-type-inference.patch new file mode 100644 index 0000000000000..06dd3e82adc91 --- /dev/null +++ b/pkgs/development/compilers/fsharp41/fsharp-IsPathRooted-type-inference.patch @@ -0,0 +1,21 @@ +commit c37fce5b3019c7a150203fc3a484885591b194de +Author: Alexis Christoforides <alexis@thenull.net> +Date: Sun Dec 2 00:10:24 2018 -0500 + + Help Path.IsPathRooted method overload selection. + + .NET Core, and Mono after merging https://github.com/mono/mono/pull/11342, introduce ambiguity with a new overload. + +diff --git a/src/scripts/scriptlib.fsx b/src/scripts/scriptlib.fsx +index cc797e305..699c7bb93 100644 +--- a/src/scripts/scriptlib.fsx ++++ b/src/scripts/scriptlib.fsx +@@ -92,7 +92,7 @@ module Scripting = + + module Process = + +- let processExePath baseDir exe = ++ let processExePath baseDir (exe:string) = + if Path.IsPathRooted(exe) then exe + else + match Path.GetDirectoryName(exe) with diff --git a/pkgs/development/compilers/fsharp41/fsharp-path-overloads.patch b/pkgs/development/compilers/fsharp41/fsharp-path-overloads.patch new file mode 100644 index 0000000000000..f791317d0802d --- /dev/null +++ b/pkgs/development/compilers/fsharp41/fsharp-path-overloads.patch @@ -0,0 +1,22 @@ +diff --git a/src/scripts/scriptlib.fsx b/src/scripts/scriptlib.fsx +index cc797e305..ae8a6d3cc 100644 +--- a/src/scripts/scriptlib.fsx ++++ b/src/scripts/scriptlib.fsx +@@ -59,12 +59,12 @@ module Scripting = + + let (++) a b = Path.Combine(a,b) + +- let getBasename a = Path.GetFileNameWithoutExtension a +- let getFullPath a = Path.GetFullPath a +- let getFilename a = Path.GetFileName a +- let getDirectoryName a = Path.GetDirectoryName a ++ let getBasename (path: string) = Path.GetFileNameWithoutExtension path ++ let getFullPath (path: string) = Path.GetFullPath path ++ let getFilename (path: string) = Path.GetFileName path ++ let getDirectoryName (path: string) = Path.GetDirectoryName path + +- let copyFile source dir = ++ let copyFile (source: string) dir = + let dest = + if not (Directory.Exists dir) then Directory.CreateDirectory dir |>ignore + let result = Path.Combine(dir, Path.GetFileName source) diff --git a/pkgs/development/compilers/fsharp41/fsharp-string-switchName.patch b/pkgs/development/compilers/fsharp41/fsharp-string-switchName.patch new file mode 100644 index 0000000000000..4b36eaabcafc0 --- /dev/null +++ b/pkgs/development/compilers/fsharp41/fsharp-string-switchName.patch @@ -0,0 +1,13 @@ +diff --git a/src/scripts/scriptlib.fsx b/src/scripts/scriptlib.fsx +index cc797e305..5a7be7d2b 100644 +--- a/src/scripts/scriptlib.fsx ++++ b/src/scripts/scriptlib.fsx +@@ -36,7 +36,7 @@ module Scripting = + #if INTERACTIVE + let argv = Microsoft.FSharp.Compiler.Interactive.Settings.fsi.CommandLineArgs |> Seq.skip 1 |> Seq.toArray + +- let getCmdLineArgOptional switchName = ++ let getCmdLineArgOptional (switchName: string) = + argv |> Array.filter(fun t -> t.StartsWith(switchName)) |> Array.map(fun t -> t.Remove(0, switchName.Length).Trim()) |> Array.tryHead + + let getCmdLineArg switchName defaultValue = diff --git a/pkgs/development/compilers/ghc/8.8.1.nix b/pkgs/development/compilers/ghc/8.8.1.nix index 423eaf02d8c4a..95bbab3cb3e11 100644 --- a/pkgs/development/compilers/ghc/8.8.1.nix +++ b/pkgs/development/compilers/ghc/8.8.1.nix @@ -86,12 +86,12 @@ let in stdenv.mkDerivation (rec { - version = "8.8.0.20190721"; + version = "8.8.1"; name = "${targetPrefix}ghc-${version}"; src = fetchurl { - url = "https://downloads.haskell.org/ghc/8.8.1-rc1/ghc-${version}-src.tar.xz"; - sha256 = "1ih76zpxk8ay84xjyaflqc754002y8pdaainqfvb4cnhy6lpb1br"; + url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz"; + sha256 = "06kj4fhvijinjafiy4s873n60qly323rdlz9bmc79nhlp3cq72lh"; }; enableParallelBuilding = true; diff --git a/pkgs/development/compilers/mono/6.nix b/pkgs/development/compilers/mono/6.nix new file mode 100644 index 0000000000000..ec91d7e979c1a --- /dev/null +++ b/pkgs/development/compilers/mono/6.nix @@ -0,0 +1,9 @@ +{ callPackage, Foundation, libobjc }: + +callPackage ./generic.nix (rec { + inherit Foundation libobjc; + version = "6.0.0.313"; + srcArchiveSuffix = "tar.xz"; + sha256 = "0l0cd6q5xh1vdm6zr78rkfqdsmrgzanjgpxvgig0pyd3glfyjim9"; + enableParallelBuilding = true; +}) diff --git a/pkgs/development/compilers/mono/generic.nix b/pkgs/development/compilers/mono/generic.nix index ecb687e96e574..9a2f01b9f3d5f 100644 --- a/pkgs/development/compilers/mono/generic.nix +++ b/pkgs/development/compilers/mono/generic.nix @@ -1,4 +1,7 @@ -{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? false, cacert, Foundation, libobjc, python, version, sha256, autoconf, libtool, automake, cmake, which, enableParallelBuilding ? true }: +{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? false, cacert, Foundation, libobjc, python, version, sha256, autoconf, libtool, automake, cmake, which +, enableParallelBuilding ? true +, srcArchiveSuffix ? "tar.bz2" +}: let llvm = callPackage ./llvm.nix { }; @@ -9,7 +12,7 @@ stdenv.mkDerivation rec { src = fetchurl { inherit sha256; - url = "https://download.mono-project.com/sources/mono/${pname}-${version}.tar.bz2"; + url = "https://download.mono-project.com/sources/mono/${pname}-${version}.${srcArchiveSuffix}"; }; buildInputs = diff --git a/pkgs/development/compilers/owl-lisp/default.nix b/pkgs/development/compilers/owl-lisp/default.nix index 0625e2d8bbc2d..80ea9eb4c0b86 100644 --- a/pkgs/development/compilers/owl-lisp/default.nix +++ b/pkgs/development/compilers/owl-lisp/default.nix @@ -1,33 +1,31 @@ -{ stdenv, fetchFromGitHub, coreutils, which }: +{ stdenv, fetchFromGitLab, coreutils, which }: stdenv.mkDerivation rec { pname = "owl-lisp"; - version = "0.1.16"; + version = "0.1.19"; - src = fetchFromGitHub { - owner = "aoh"; - repo = "owl-lisp"; + src = fetchFromGitLab { + owner = "owl-lisp"; + repo = "owl"; rev = "v${version}"; - sha256 = "1qp6p48bmlyn83rqi6k3d098dg4cribavg5rd4x17z37i181vxvj"; + sha256 = "1bgjd2gkr5risfcc401rlr5fc82gwm4r2gpp9gzkg9h64acivkjx"; }; nativeBuildInputs = [ which ]; prePatch = '' - substituteInPlace Makefile --replace /usr $out - - for f in tests/run tests/exec.sh ; do - substituteInPlace $f --replace /bin/echo ${coreutils}/bin/echo - done + substituteInPlace Makefile \ + --replace /usr $out ''; # tests are run as part of the compilation process doCheck = false; meta = with stdenv.lib; { - description = "A functional lisp"; - homepage = https://github.com/aoh/owl-lisp; + description = "A functional Scheme for world domination"; + homepage = "https://gitlab.com/owl-lisp/owl"; license = licenses.mit; maintainers = with maintainers; [ peterhoeg ]; + platforms = platforms.linux; }; } |