diff --git a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
index 099fd803ee24..d9a418ffb16a 100644
--- a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
+++ b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
@@ -71,6 +71,12 @@
fetchConfigured = false;.
+
+
+ fsharp41 has been removed in preference to use the latest
+ dotnet-sdk
+
+
diff --git a/nixos/doc/manual/release-notes/rl-2111.section.md b/nixos/doc/manual/release-notes/rl-2111.section.md
index cd942d2f7309..809c17e3f6c8 100644
--- a/nixos/doc/manual/release-notes/rl-2111.section.md
+++ b/nixos/doc/manual/release-notes/rl-2111.section.md
@@ -31,4 +31,6 @@ In addition to numerous new and upgraded packages, this release has the followin
* Those making use of `buildBazelPackage` will need to regenerate the fetch
hashes (preferred), or set `fetchConfigured = false;`.
+* fsharp41 has been removed in preference to use the latest dotnet-sdk
+
## Other Notable Changes
diff --git a/pkgs/development/compilers/fsharp41/default.nix b/pkgs/development/compilers/fsharp41/default.nix
deleted file mode 100644
index e9f9088df3a6..000000000000
--- a/pkgs/development/compilers/fsharp41/default.nix
+++ /dev/null
@@ -1,126 +0,0 @@
-# Temporaririly avoid dependency on dotnetbuildhelpers to avoid rebuilding many times while working on it
-
-{ lib, stdenv, fetchurl, pkg-config, autoconf, automake, which, mono, msbuild, dotnetbuildhelpers, dotnetPackages }:
-
-stdenv.mkDerivation rec {
- pname = "fsharp";
- version = "4.1.34";
-
- src = fetchurl {
- url = "https://github.com/fsharp/fsharp/archive/${version}.tar.gz";
- sha256 = "0cv6p5pin962vhbpsji40nkckkag5c96kq5qihvg60pc1z821p0i";
- };
-
- nativeBuildInputs = [ pkg-config ];
- buildInputs = [
- autoconf
- automake
- which
- mono
- msbuild
- dotnetbuildhelpers
- dotnetPackages.FsCheck262
- dotnetPackages.FSharpCompilerTools
- dotnetPackages.FSharpCore302
- dotnetPackages.FSharpCore3125
- dotnetPackages.FSharpCore4001
- dotnetPackages.FSharpCore4117
- dotnetPackages.FSharpData225
- dotnetPackages.FsLexYacc706
- dotnetPackages.MicrosoftDiaSymReader
- dotnetPackages.MicrosoftDiaSymReaderPortablePdb
- dotnetPackages.NUnit350
- dotnetPackages.SystemCollectionsImmutable131
- dotnetPackages.SystemReflectionMetadata
- 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
- ./fsharp-GetFileNameWithoutExtension-type-inference.patch
- ];
-
- configurePhase = ''
- substituteInPlace ./autogen.sh --replace "/usr/bin/env sh" "${stdenv.shell}"
- ./autogen.sh --prefix $out
- '';
-
- preBuild = ''
- substituteInPlace Makefile --replace "MONO_ENV_OPTIONS=\$(monoopts) mono .nuget/NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget/NuGet.Config" "true"
- substituteInPlace src/fsharp/Fsc-proto/Fsc-proto.fsproj --replace "" ""
- substituteInPlace src/fsharp/Fsc-proto/Fsc-proto.fsproj --replace "" ""
- substituteInPlace src/fsharp/Fsc-proto/Fsc-proto.fsproj --replace "" ""
- substituteInPlace src/fsharp/Fsc-proto/Fsc-proto.fsproj --replace "" ""
-
- rm -rf packages
- 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.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.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.1
- '';
-
- # 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 = ''
- 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
- do
- create-pkg-config-for-dll.sh "$out/lib/pkgconfig" "$dll"
- 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 <]
-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;
-
- meta = {
- description = "A functional CLI language";
- homepage = "https://fsharp.org/";
- license = lib.licenses.asl20;
- maintainers = with lib.maintainers; [ thoughtpolice raskin ];
- platforms = with lib.platforms; unix;
- };
-}
diff --git a/pkgs/development/compilers/fsharp41/fsharp-GetFileNameWithoutExtension-type-inference.patch b/pkgs/development/compilers/fsharp41/fsharp-GetFileNameWithoutExtension-type-inference.patch
deleted file mode 100644
index 14e9444b1de3..000000000000
--- a/pkgs/development/compilers/fsharp41/fsharp-GetFileNameWithoutExtension-type-inference.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/scripts/fssrgen.fsx b/src/scripts/fssrgen.fsx
-index 0bee9b79e..e6ceda11e 100644
---- a/src/scripts/fssrgen.fsx
-+++ b/src/scripts/fssrgen.fsx
-@@ -329,7 +329,7 @@ let StringBoilerPlate filename =
- // END BOILERPLATE
- "
-
--let RunMain(filename, outFilename, outXmlFilenameOpt, projectNameOpt) =
-+let RunMain(filename:string, outFilename, outXmlFilenameOpt, projectNameOpt) =
- try
- let justfilename = System.IO.Path.GetFileNameWithoutExtension(filename)
- if justfilename |> Seq.exists (fun c -> not(System.Char.IsLetterOrDigit(c))) then
diff --git a/pkgs/development/compilers/fsharp41/fsharp-IsPathRooted-type-inference.patch b/pkgs/development/compilers/fsharp41/fsharp-IsPathRooted-type-inference.patch
deleted file mode 100644
index 06dd3e82adc9..000000000000
--- a/pkgs/development/compilers/fsharp41/fsharp-IsPathRooted-type-inference.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-commit c37fce5b3019c7a150203fc3a484885591b194de
-Author: Alexis Christoforides
-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
deleted file mode 100644
index f791317d0802..000000000000
--- a/pkgs/development/compilers/fsharp41/fsharp-path-overloads.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-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
deleted file mode 100644
index 4b36eaabcafc..000000000000
--- a/pkgs/development/compilers/fsharp41/fsharp-string-switchName.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-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/top-level/aliases.nix b/pkgs/top-level/aliases.nix
index 9415b6e24ae4..08d8ed9494f3 100644
--- a/pkgs/top-level/aliases.nix
+++ b/pkgs/top-level/aliases.nix
@@ -237,6 +237,7 @@ mapAliases ({
'';
font-droid = throw "font-droid has been deprecated by noto-fonts"; # 2019-04-12
foomatic_filters = foomatic-filters; # 2016-08
+ fsharp41 = throw "fsharp41 has been removed, please use dotnet-sdk_5 or later";
fuse_exfat = exfat; # 2015-09-11
fuseki = apache-jena-fuseki; # added 2018-04-25
fusesmb = throw "fusesmb is abandoned by upstream"; # added 2019-10-15
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 453c4758ae4e..070b89ce953e 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -11103,8 +11103,6 @@ in
fsharp = callPackage ../development/compilers/fsharp { };
- fsharp41 = callPackage ../development/compilers/fsharp41 { };
-
fstar = callPackage ../development/compilers/fstar {
ocamlPackages = ocaml-ng.ocamlPackages_4_07;
};