about summary refs log tree commit diff
path: root/pkgs/development/compilers/nim
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/nim')
-rw-r--r--pkgs/development/compilers/nim/NIM_CONFIG_DIR.patch23
-rw-r--r--pkgs/development/compilers/nim/build-nim-package.nix136
-rw-r--r--pkgs/development/compilers/nim/default.nix321
-rw-r--r--pkgs/development/compilers/nim/extra-mangling.patch48
-rw-r--r--pkgs/development/compilers/nim/nim.cfg.patch31
-rw-r--r--pkgs/development/compilers/nim/nim2.cfg.patch41
-rw-r--r--pkgs/development/compilers/nim/nixbuild.patch40
-rw-r--r--pkgs/development/compilers/nim/openssl.patch458
-rw-r--r--pkgs/development/compilers/nim/toLocation.patch16
9 files changed, 0 insertions, 1114 deletions
diff --git a/pkgs/development/compilers/nim/NIM_CONFIG_DIR.patch b/pkgs/development/compilers/nim/NIM_CONFIG_DIR.patch
deleted file mode 100644
index 61e05b791cf8..000000000000
--- a/pkgs/development/compilers/nim/NIM_CONFIG_DIR.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/compiler/nimconf.nim b/compiler/nimconf.nim
-index a470179bd..73cfa1a23 100644
---- a/compiler/nimconf.nim
-+++ b/compiler/nimconf.nim
-@@ -225,10 +225,15 @@ proc getUserConfigPath*(filename: RelativeFile): AbsoluteFile =
- proc getSystemConfigPath*(conf: ConfigRef; filename: RelativeFile): AbsoluteFile =
-   # try standard configuration file (installation did not distribute files
-   # the UNIX way)
--  let p = getPrefixDir(conf)
--  result = p / RelativeDir"config" / filename
-+  let
-+    prefix = getPrefixDir(conf)
-+    env = getEnv("NIM_CONFIG_PATH")
-+  if env != "":
-+    result = env.toAbsoluteDir / filename
-+  else:
-+    result = prefix / RelativeDir"config" / filename
-   when defined(unix):
--    if not fileExists(result): result = p / RelativeDir"etc/nim" / filename
-+    if not fileExists(result): result = prefix / RelativeDir"etc/nim" / filename
-     if not fileExists(result): result = AbsoluteDir"/etc/nim" / filename
-
- proc loadConfigs*(cfg: RelativeFile; cache: IdentCache; conf: ConfigRef) =
diff --git a/pkgs/development/compilers/nim/build-nim-package.nix b/pkgs/development/compilers/nim/build-nim-package.nix
deleted file mode 100644
index 2bff3bf8cc85..000000000000
--- a/pkgs/development/compilers/nim/build-nim-package.nix
+++ /dev/null
@@ -1,136 +0,0 @@
-{ lib
-, buildPackages
-, callPackage
-, stdenv
-, nim1
-, nim2
-, nim_builder
-, defaultNimVersion ? 2
-, nimOverrides
-, buildNimPackage
-}:
-
-let
-  baseAttrs = {
-    strictDeps = true;
-    enableParallelBuilding = true;
-    doCheck = true;
-    configurePhase = ''
-      runHook preConfigure
-      export NIX_NIM_BUILD_INPUTS=''${pkgsHostTarget[@]} $NIX_NIM_BUILD_INPUTS
-      nim_builder --phase:configure
-      runHook postConfigure
-    '';
-    buildPhase = ''
-      runHook preBuild
-      nim_builder --phase:build
-      runHook postBuild
-    '';
-    checkPhase = ''
-      runHook preCheck
-      nim_builder --phase:check
-      runHook postCheck
-    '';
-    installPhase = ''
-      runHook preInstall
-      nim_builder --phase:install
-      runHook postInstall
-    '';
-    meta = { inherit (nim2.meta) maintainers platforms; };
-  };
-
-  fodFromLockEntry =
-    let
-      methods = {
-        fetchzip = { url, sha256, ... }:
-          buildPackages.fetchzip {
-            name = "source";
-            inherit url sha256;
-          };
-        git = { fetchSubmodules, leaveDotGit, rev, sha256, url, ... }:
-          buildPackages.fetchgit {
-            inherit fetchSubmodules leaveDotGit rev sha256 url;
-          };
-      };
-    in
-    attrs@{ method, ... }:
-    let fod = methods.${method} attrs;
-    in ''--path:"${fod.outPath}/${attrs.srcDir}"'';
-
-  asFunc = x: if builtins.isFunction x then x else (_: x);
-
-in
-buildNimPackageArgs:
-let
-  composition = finalAttrs:
-    let
-      postPkg = baseAttrs
-        // (asFunc ((asFunc buildNimPackageArgs) finalAttrs)) baseAttrs;
-
-      lockAttrs =
-        lib.attrsets.optionalAttrs (builtins.hasAttr "lockFile" postPkg)
-          (builtins.fromJSON (builtins.readFile postPkg.lockFile));
-
-      lockDepends = lockAttrs.depends or [ ];
-
-      lockFileNimFlags = map fodFromLockEntry lockDepends;
-
-      postNimOverrides = builtins.foldl' (
-        prevAttrs:
-        { packages, ... }@lockAttrs:
-        builtins.foldl' (
-          prevAttrs: name:
-          if (builtins.hasAttr name nimOverrides) then
-            (prevAttrs // (nimOverrides.${name} lockAttrs prevAttrs))
-          else
-            prevAttrs
-        ) prevAttrs packages
-      ) postPkg lockDepends;
-
-      finalOverride =
-        { depsBuildBuild ? [ ]
-        , nativeBuildInputs ? [ ]
-        , nimFlags ? [ ]
-        , requiredNimVersion ? defaultNimVersion
-        , passthru ? { }
-        , ...
-        }:
-        (if requiredNimVersion == 1 then {
-          depsBuildBuild = [ nim_builder ] ++ depsBuildBuild;
-          nativeBuildInputs = [ nim1 ] ++ nativeBuildInputs;
-        } else if requiredNimVersion == 2 then {
-          depsBuildBuild = [ nim_builder ] ++ depsBuildBuild;
-          nativeBuildInputs = [ nim2 ] ++ nativeBuildInputs;
-        } else
-          throw
-            "requiredNimVersion ${toString requiredNimVersion} is not valid") // {
-          nimFlags = lockFileNimFlags ++ nimFlags;
-          passthru = passthru // {
-            # allow overriding the result of buildNimPackageArgs before this composition is applied
-            # this allows overriding the lockFile for packages built using buildNimPackage
-            # this is adapted from mkDerivationExtensible in stdenv.mkDerivation
-            overrideNimAttrs = f0:
-              let
-                f = self: super:
-                  let x = f0 super;
-                  in
-                    if builtins.isFunction x
-                    then f0 self super
-                    else x;
-              in
-              buildNimPackage
-                (self:
-                  let super = (asFunc ((asFunc buildNimPackageArgs) self)) baseAttrs;
-                  in
-                    super // (if builtins.isFunction f0 || f0?__functor then f self super else f0));
-          };
-        };
-
-      attrs = postNimOverrides // finalOverride postNimOverrides;
-    in
-    lib.trivial.warnIf (builtins.hasAttr "nimBinOnly" attrs)
-      "the nimBinOnly attribute is deprecated for buildNimPackage"
-      attrs;
-
-in
-stdenv.mkDerivation composition
diff --git a/pkgs/development/compilers/nim/default.nix b/pkgs/development/compilers/nim/default.nix
deleted file mode 100644
index 0ac32994b00d..000000000000
--- a/pkgs/development/compilers/nim/default.nix
+++ /dev/null
@@ -1,321 +0,0 @@
-# https://nim-lang.github.io/Nim/packaging.html
-# https://nim-lang.org/docs/nimc.html
-
-{ lib, callPackage, buildPackages, stdenv, fetchurl, fetchgit
-, makeWrapper, openssl, pcre, readline, boehmgc, sqlite, Security
-, nim-unwrapped-2, nim-unwrapped-1, nim }:
-
-let
-  parseCpu = platform:
-    with platform;
-    # Derive a Nim CPU identifier
-    if isAarch32 then
-      "arm"
-    else if isAarch64 then
-      "arm64"
-    else if isAlpha then
-      "alpha"
-    else if isAvr then
-      "avr"
-    else if isMips && is32bit then
-      "mips"
-    else if isMips && is64bit then
-      "mips64"
-    else if isMsp430 then
-      "msp430"
-    else if isPower && is32bit then
-      "powerpc"
-    else if isPower && is64bit then
-      "powerpc64"
-    else if isRiscV && is64bit then
-      "riscv64"
-    else if isSparc then
-      "sparc"
-    else if isx86_32 then
-      "i386"
-    else if isx86_64 then
-      "amd64"
-    else
-      abort "no Nim CPU support known for ${config}";
-
-  parseOs = platform:
-    with platform;
-    # Derive a Nim OS identifier
-    if isAndroid then
-      "Android"
-    else if isDarwin then
-      "MacOSX"
-    else if isFreeBSD then
-      "FreeBSD"
-    else if isGenode then
-      "Genode"
-    else if isLinux then
-      "Linux"
-    else if isNetBSD then
-      "NetBSD"
-    else if isNone then
-      "Standalone"
-    else if isOpenBSD then
-      "OpenBSD"
-    else if isWindows then
-      "Windows"
-    else if isiOS then
-      "iOS"
-    else
-      abort "no Nim OS support known for ${config}";
-
-  parsePlatform = p: {
-    cpu = parseCpu p;
-    os = parseOs p;
-  };
-
-  nimHost = parsePlatform stdenv.hostPlatform;
-  nimTarget = parsePlatform stdenv.targetPlatform;
-
-in {
-
-  nim-unwrapped-2 = stdenv.mkDerivation (finalAttrs: {
-    pname = "nim-unwrapped";
-    version = "2.0.4";
-    strictDeps = true;
-
-    src = fetchurl {
-      url = "https://nim-lang.org/download/nim-${finalAttrs.version}.tar.xz";
-      hash = "sha256-cVJr0HQ53I43j6Gm60B+2hKY8fPU30R23KDjyjy+Pwk=";
-    };
-
-    buildInputs = [ boehmgc openssl pcre readline sqlite ]
-      ++ lib.optional stdenv.isDarwin Security;
-
-    patches = [
-      ./NIM_CONFIG_DIR.patch
-      # Override compiler configuration via an environmental variable
-
-      ./nixbuild.patch
-      # Load libraries at runtime by absolute path
-
-      ./extra-mangling.patch
-      # Mangle store paths of modules to prevent runtime dependence.
-
-      ./openssl.patch
-      # dlopen is widely used by Python, Ruby, Perl, ... what you're really telling me here is that your OS is fundamentally broken. That might be news for you, but it isn't for me.
-    ];
-
-    configurePhase = let
-      bootstrapCompiler = stdenv.mkDerivation {
-        pname = "nim-bootstrap";
-        inherit (finalAttrs) version src preBuild;
-        enableParallelBuilding = true;
-        installPhase = ''
-          runHook preInstall
-          install -Dt $out/bin bin/nim
-          runHook postInstall
-        '';
-      };
-    in ''
-      runHook preConfigure
-      cp ${bootstrapCompiler}/bin/nim bin/
-      echo 'define:nixbuild' >> config/nim.cfg
-      runHook postConfigure
-    '';
-
-    kochArgs = [
-      "--cpu:${nimHost.cpu}"
-      "--os:${nimHost.os}"
-      "-d:release"
-      "-d:useGnuReadline"
-    ] ++ lib.optional (stdenv.isDarwin || stdenv.isLinux) "-d:nativeStacktrace";
-
-    preBuild = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
-      substituteInPlace makefile \
-        --replace "aarch64" "arm64"
-    '';
-
-    buildPhase = ''
-      runHook preBuild
-      local HOME=$TMPDIR
-      ./bin/nim c --parallelBuild:$NIX_BUILD_CORES koch
-      ./koch boot $kochArgs --parallelBuild:$NIX_BUILD_CORES
-      ./koch toolsNoExternal $kochArgs --parallelBuild:$NIX_BUILD_CORES
-      ./bin/nim js -d:release tools/dochack/dochack.nim
-      runHook postBuild
-    '';
-
-    installPhase = ''
-      runHook preInstall
-      install -Dt $out/bin bin/*
-      ln -sf $out/nim/bin/nim $out/bin/nim
-      ln -sf $out/nim/lib $out/lib
-      ./install.sh $out
-      cp -a tools dist $out/nim/
-      runHook postInstall
-    '';
-
-    meta = with lib; {
-      description = "Statically typed, imperative programming language";
-      homepage = "https://nim-lang.org/";
-      license = licenses.mit;
-      mainProgram = "nim";
-      maintainers = with maintainers; [ ehmry ];
-    };
-  });
-
-  nim-unwrapped-1 = nim-unwrapped-2.overrideAttrs (finalAttrs: prevAttrs: {
-    version = "1.6.20";
-    src = fetchurl {
-      url = "https://nim-lang.org/download/nim-${finalAttrs.version}.tar.xz";
-      hash = "sha256-/+0EdQTR/K9hDw3Xzz4Ce+kaKSsMnFEWFQTC87mE/7k=";
-    };
-
-    patches = [
-      ./NIM_CONFIG_DIR.patch
-      # Override compiler configuration via an environmental variable
-
-      ./nixbuild.patch
-      # Load libraries at runtime by absolute path
-
-      ./extra-mangling.patch
-      # Mangle store paths of modules to prevent runtime dependence.
-    ] ++ lib.optional (!stdenv.hostPlatform.isWindows) ./toLocation.patch;
-  });
-
-} // (let
-  wrapNim = { nim', patches }:
-    let targetPlatformConfig = stdenv.targetPlatform.config;
-    in stdenv.mkDerivation (finalAttrs: {
-        name = "${targetPlatformConfig}-nim-wrapper-${nim'.version}";
-        inherit (nim') version;
-        preferLocalBuild = true;
-        strictDeps = true;
-
-        nativeBuildInputs = [ makeWrapper ];
-
-        # Needed for any nim package that uses the standard library's
-        # 'std/sysrand' module.
-        depsTargetTargetPropagated = lib.optional stdenv.isDarwin Security;
-
-        inherit patches;
-
-        unpackPhase = ''
-          runHook preUnpack
-          tar xf ${nim'.src} nim-$version/config
-          cd nim-$version
-          runHook postUnpack
-        '';
-
-        dontConfigure = true;
-
-        buildPhase =
-          # Configure the Nim compiler to use $CC and $CXX as backends
-          # The compiler is configured by two configuration files, each with
-          # a different DSL. The order of evaluation matters and that order
-          # is not documented, so duplicate the configuration across both files.
-          ''
-            runHook preBuild
-            cat >> config/config.nims << WTF
-
-            switch("os", "${nimTarget.os}")
-            switch("cpu", "${nimTarget.cpu}")
-            switch("define", "nixbuild")
-
-            # Configure the compiler using the $CC set by Nix at build time
-            import strutils
-            let cc = getEnv"CC"
-            if cc.contains("gcc"):
-              switch("cc", "gcc")
-            elif cc.contains("clang"):
-              switch("cc", "clang")
-            WTF
-
-            mv config/nim.cfg config/nim.cfg.old
-            cat > config/nim.cfg << WTF
-            os = "${nimTarget.os}"
-            cpu =  "${nimTarget.cpu}"
-            define:"nixbuild"
-            WTF
-
-            cat >> config/nim.cfg < config/nim.cfg.old
-            rm config/nim.cfg.old
-
-            cat >> config/nim.cfg << WTF
-
-            clang.cpp.exe %= "\$CXX"
-            clang.cpp.linkerexe %= "\$CXX"
-            clang.exe %= "\$CC"
-            clang.linkerexe %= "\$CC"
-            gcc.cpp.exe %= "\$CXX"
-            gcc.cpp.linkerexe %= "\$CXX"
-            gcc.exe %= "\$CC"
-            gcc.linkerexe %= "\$CC"
-            WTF
-
-            runHook postBuild
-          '';
-
-        wrapperArgs = lib.optionals (!(stdenv.isDarwin && stdenv.isAarch64)) [
-          "--prefix PATH : ${lib.makeBinPath [ buildPackages.gdb ]}:${
-            placeholder "out"
-          }/bin"
-          # Used by nim-gdb
-
-          "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ openssl pcre ]}"
-          # These libraries may be referred to by the standard library.
-          # This is broken for cross-compilation because the package
-          # set will be shifted back by nativeBuildInputs.
-
-          "--set NIM_CONFIG_PATH ${placeholder "out"}/etc/nim"
-          # Use the custom configuration
-        ];
-
-        installPhase = ''
-          runHook preInstall
-
-          mkdir -p $out/bin $out/etc
-
-          cp -r config $out/etc/nim
-
-          for binpath in ${nim'}/bin/nim?*; do
-            local binname=`basename $binpath`
-            makeWrapper \
-              $binpath $out/bin/${targetPlatformConfig}-$binname \
-              $wrapperArgs
-            ln -s $out/bin/${targetPlatformConfig}-$binname $out/bin/$binname
-          done
-
-          makeWrapper \
-            ${nim'}/nim/bin/nim $out/bin/${targetPlatformConfig}-nim \
-            --set-default CC $(command -v $CC) \
-            --set-default CXX $(command -v $CXX) \
-            $wrapperArgs
-          ln -s $out/bin/${targetPlatformConfig}-nim $out/bin/nim
-
-          makeWrapper \
-            ${nim'}/bin/testament $out/bin/${targetPlatformConfig}-testament \
-            $wrapperArgs
-          ln -s $out/bin/${targetPlatformConfig}-testament $out/bin/testament
-
-        '' + ''
-          runHook postInstall
-        '';
-
-        passthru = { nim = nim'; };
-
-        meta = nim'.meta // {
-          description = nim'.meta.description
-            + " (${targetPlatformConfig} wrapper)";
-          platforms = with lib.platforms; unix ++ genode;
-        };
-      });
-in {
-
-  nim2 = wrapNim {
-    nim' = buildPackages.nim-unwrapped-2;
-    patches = [ ./nim2.cfg.patch ];
-  };
-
-  nim1 = wrapNim {
-    nim' = buildPackages.nim-unwrapped-1;
-    patches = [ ./nim.cfg.patch ];
-  };
-
-})
diff --git a/pkgs/development/compilers/nim/extra-mangling.patch b/pkgs/development/compilers/nim/extra-mangling.patch
deleted file mode 100644
index b68f7033994d..000000000000
--- a/pkgs/development/compilers/nim/extra-mangling.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-diff --git a/compiler/modulepaths.nim b/compiler/modulepaths.nim
-index e80ea3fa6..8ecf27a85 100644
---- a/compiler/modulepaths.nim
-+++ b/compiler/modulepaths.nim
-@@ -70,6 +70,13 @@ proc checkModuleName*(conf: ConfigRef; n: PNode; doLocalError=true): FileIndex =
-   else:
-     result = fileInfoIdx(conf, fullPath)
- 
-+proc rot13(result: var string) =
-+  for i, c in result:
-+    case c
-+    of 'a'..'m', 'A'..'M': result[i] = char(c.uint8 + 13)
-+    of 'n'..'z', 'N'..'Z': result[i] = char(c.uint8 - 13)
-+    else: discard
-+
- proc mangleModuleName*(conf: ConfigRef; path: AbsoluteFile): string =
-   ## Mangle a relative module path to avoid path and symbol collisions.
-   ##
-@@ -78,9 +85,11 @@ proc mangleModuleName*(conf: ConfigRef; path: AbsoluteFile): string =
-   ##
-   ## Example:
-   ## `foo-#head/../bar` becomes `@foo-@hhead@s..@sbar`
--  "@m" & relativeTo(path, conf.projectPath).string.multiReplace(
-+  result = "@m" & relativeTo(path, conf.projectPath).string.multiReplace(
-     {$os.DirSep: "@s", $os.AltSep: "@s", "#": "@h", "@": "@@", ":": "@c"})
-+  rot13(result)
- 
- proc demangleModuleName*(path: string): string =
-   ## Demangle a relative module path.
-   result = path.multiReplace({"@@": "@", "@h": "#", "@s": "/", "@m": "", "@c": ":"})
-+  rot13(result)
-diff --git a/compiler/msgs.nim b/compiler/msgs.nim
-index 3f386cc61..054f7f647 100644
---- a/compiler/msgs.nim
-+++ b/compiler/msgs.nim
-@@ -659,8 +659,10 @@ proc uniqueModuleName*(conf: ConfigRef; fid: FileIndex): string =
-   for i in 0..<trunc:
-     let c = rel[i]
-     case c
--    of 'a'..'z':
--      result.add c
-+    of 'a'..'m':
-+      result.add char(c.uint8 + 13)
-+    of 'n'..'z':
-+      result.add char(c.uint8 - 13)
-     of {os.DirSep, os.AltSep}:
-       result.add 'Z' # because it looks a bit like '/'
-     of '.':
diff --git a/pkgs/development/compilers/nim/nim.cfg.patch b/pkgs/development/compilers/nim/nim.cfg.patch
deleted file mode 100644
index 7195132e52f6..000000000000
--- a/pkgs/development/compilers/nim/nim.cfg.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/config/nim.cfg b/config/nim.cfg
-index 3b964d124..850ed0ed9 100644
---- a/config/nim.cfg
-+++ b/config/nim.cfg
-@@ -8,26 +8,12 @@
- # Environment variables can be accessed like so:
- #  gcc.path %= "$CC_PATH"
- 
--cc = gcc
--
- # additional options always passed to the compiler:
- --parallel_build: "0" # 0 to auto-detect number of processors
- 
- hint[LineTooLong]=off
- #hint[XDeclaredButNotUsed]=off
- 
--# Examples of how to setup a cross-compiler:
--
--# Cross-compiling for Raspberry Pi.
--# (This compiler is available in gcc-arm-linux-gnueabihf package on Ubuntu)
--arm.linux.gcc.exe = "arm-linux-gnueabihf-gcc"
--arm.linux.gcc.linkerexe = "arm-linux-gnueabihf-gcc"
--
--# For OpenWRT, you will also need to adjust PATH to point to your toolchain.
--mips.linux.gcc.exe = "mips-openwrt-linux-gcc"
--mips.linux.gcc.linkerexe = "mips-openwrt-linux-gcc"
--
--
- path="$lib/deprecated/core"
- path="$lib/deprecated/pure"
- path="$lib/pure/collections"
diff --git a/pkgs/development/compilers/nim/nim2.cfg.patch b/pkgs/development/compilers/nim/nim2.cfg.patch
deleted file mode 100644
index ef23d3a84623..000000000000
--- a/pkgs/development/compilers/nim/nim2.cfg.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-diff --git a/config/nim.cfg b/config/nim.cfg
-index 1470de780..8a12f741a 100644
---- a/config/nim.cfg
-+++ b/config/nim.cfg
-@@ -9,8 +9,6 @@
- # Environment variables can be accessed like so:
- #  gcc.path %= "$CC_PATH"
-
--cc = gcc
--
- # additional options always passed to the compiler:
- --parallel_build: "0" # 0 to auto-detect number of processors
-
-@@ -22,27 +20,6 @@ cc = gcc
-
- threads:on
-
--# Examples of how to setup a cross-compiler:
--# Nim can target architectures and OSes different than the local host
--# Syntax: <arch>.<os>.gcc.exe = "<compiler executable>"
--#         <arch>.<os>.gcc.linkerexe = "<linker executable>"
--
--# ARM e.g. Raspberry Pi 2: gcc-arm-linux-gnueabihf package on Debian/Ubuntu
--arm.linux.gcc.exe = "arm-linux-gnueabihf-gcc"
--arm.linux.gcc.linkerexe = "arm-linux-gnueabihf-gcc"
--# ARM64/aarch64 e.g. Raspberry Pi 3: gcc-aarch64-linux-gnu package on Debian/Ubuntu
--arm64.linux.gcc.exe = "aarch64-linux-gnu-gcc"
--arm64.linux.gcc.linkerexe = "aarch64-linux-gnu-gcc"
--# RISC-V: gcc-riscv64-linux-gnu package on Debian/Ubuntu
--riscv32.linux.gcc.exe = "riscv64-linux-gnu-gcc"
--riscv32.linux.gcc.linkerexe = "riscv64-linux-gnu-gcc"
--riscv64.linux.gcc.exe = "riscv64-linux-gnu-gcc"
--riscv64.linux.gcc.linkerexe = "riscv64-linux-gnu-gcc"
--
--# For OpenWRT, you will also need to adjust PATH to point to your toolchain.
--mips.linux.gcc.exe = "mips-openwrt-linux-gcc"
--mips.linux.gcc.linkerexe = "mips-openwrt-linux-gcc"
--
-
- path="$lib/deprecated/core"
- path="$lib/deprecated/pure"
diff --git a/pkgs/development/compilers/nim/nixbuild.patch b/pkgs/development/compilers/nim/nixbuild.patch
deleted file mode 100644
index afadd16602bd..000000000000
--- a/pkgs/development/compilers/nim/nixbuild.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/lib/pure/dynlib.nim b/lib/pure/dynlib.nim
-index f31ae94dd..debed9c07 100644
---- a/lib/pure/dynlib.nim
-+++ b/lib/pure/dynlib.nim
-@@ -56,6 +56,9 @@
- 
- import strutils
- 
-+when defined(nixbuild):
-+  import os
-+
- type
-   LibHandle* = pointer ## a handle to a dynamically loaded library
- 
-@@ -95,6 +98,25 @@ proc libCandidates*(s: string, dest: var seq[string]) =
-       libCandidates(prefix & middle & suffix, dest)
-   else:
-     add(dest, s)
-+  when defined(nixbuild):
-+    # Nix doesn't have a global library directory so
-+    # load libraries using an absolute path if one
-+    # can be derived from NIX_LDFLAGS.
-+    #
-+    # During Nix/NixOS packaging the line "define:nixbuild"
-+    # should be appended to the ../../config/nim.cfg file
-+    # to enable this behavior by default.
-+    #
-+    var libDirs = split(getEnv("LD_LIBRARY_PATH"), ':')
-+    for flag in split(replace(getEnv("NIX_LDFLAGS"), "\\ ", " ")):
-+      if flag.startsWith("-L"):
-+        libDirs.add(flag[2..flag.high])
-+    for lib in dest:
-+      for dir in libDirs:
-+        let abs = dir / lib
-+        if existsFile(abs):
-+          dest = @[abs]
-+          return
- 
- proc loadLibPattern*(pattern: string, globalSymbols = false): LibHandle =
-   ## loads a library with name matching `pattern`, similar to what `dlimport`
diff --git a/pkgs/development/compilers/nim/openssl.patch b/pkgs/development/compilers/nim/openssl.patch
deleted file mode 100644
index 8cbc2a4cf26e..000000000000
--- a/pkgs/development/compilers/nim/openssl.patch
+++ /dev/null
@@ -1,458 +0,0 @@
-commit 9d7d15533d52971601b738335c40a4f01353c369
-Author: Emery Hemingway <ehmry@posteo.net>
-Date:   2023-09-30 11:11:05 +0100
-
-    Do not load openssl with dlopen
-
-diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim
-index e659746ee..dfb2d3cf2 100644
---- a/lib/wrappers/openssl.nim
-+++ b/lib/wrappers/openssl.nim
-@@ -105,8 +105,11 @@ else:
- 
- import dynlib
- 
--{.pragma: lcrypto, cdecl, dynlib: DLLUtilName, importc.}
--{.pragma: lssl, cdecl, dynlib: DLLSSLName, importc.}
-+{.passL: "-lcrypto".}
-+{.passL: "-lssl".}
-+
-+{.pragma: lcrypto, cdecl, importc.}
-+{.pragma: lssl, cdecl, importc.}
- 
- type
-   SslStruct {.final, pure.} = object
-@@ -274,7 +277,7 @@ const
-   BIO_C_DO_STATE_MACHINE = 101
-   BIO_C_GET_SSL = 110
- 
--proc TLSv1_method*(): PSSL_METHOD{.cdecl, dynlib: DLLSSLName, importc.}
-+proc TLSv1_method*(): PSSL_METHOD{.cdecl, importc.}
- 
- # TLS_method(), TLS_server_method(), TLS_client_method() are introduced in 1.1.0
- # and support SSLv3, TLSv1, TLSv1.1 and TLSv1.2
-@@ -286,26 +289,26 @@ when useStaticLink:
-   # Static linking
- 
-   when defined(openssl10):
--    proc SSL_library_init*(): cint {.cdecl, dynlib: DLLSSLName, importc, discardable.}
--    proc SSL_load_error_strings*() {.cdecl, dynlib: DLLSSLName, importc.}
--    proc SSLv23_method*(): PSSL_METHOD {.cdecl, dynlib: DLLSSLName, importc.}
--    proc SSLeay(): culong {.cdecl, dynlib: DLLUtilName, importc.}
-+    proc SSL_library_init*(): cint {.cdecl, importc, discardable.}
-+    proc SSL_load_error_strings*() {.cdecl, importc.}
-+    proc SSLv23_method*(): PSSL_METHOD {.cdecl, importc.}
-+    proc SSLeay(): culong {.cdecl, importc.}
- 
-     proc getOpenSSLVersion*(): culong =
-       SSLeay()
- 
--    proc ERR_load_BIO_strings*() {.cdecl, dynlib: DLLUtilName, importc.}
-+    proc ERR_load_BIO_strings*() {.cdecl, gimportc.}
-   else:
--    proc OPENSSL_init_ssl*(opts: uint64, settings: uint8): cint {.cdecl, dynlib: DLLSSLName, importc, discardable.}
-+    proc OPENSSL_init_ssl*(opts: uint64, settings: uint8): cint {.cdecl, gimportc, discardable.}
-     proc SSL_library_init*(): cint {.discardable.} =
-       ## Initialize SSL using OPENSSL_init_ssl for OpenSSL >= 1.1.0
-       return OPENSSL_init_ssl(0.uint64, 0.uint8)
- 
--    proc TLS_method*(): PSSL_METHOD {.cdecl, dynlib: DLLSSLName, importc.}
-+    proc TLS_method*(): PSSL_METHOD {.cdecl, gimportc.}
-     proc SSLv23_method*(): PSSL_METHOD =
-       TLS_method()
- 
--    proc OpenSSL_version_num(): culong {.cdecl, dynlib: DLLUtilName, importc.}
-+    proc OpenSSL_version_num(): culong {.cdecl, gimportc.}
- 
-     proc getOpenSSLVersion*(): culong =
-       ## Return OpenSSL version as unsigned long
-@@ -321,19 +324,19 @@ when useStaticLink:
-       discard
- 
-   when defined(libressl) or defined(openssl10):
--    proc SSL_state(ssl: SslPtr): cint {.cdecl, dynlib: DLLSSLName, importc.}
-+    proc SSL_state(ssl: SslPtr): cint {.cdecl, gimportc.}
-     proc SSL_in_init*(ssl: SslPtr): cint {.inline.} =
-       SSL_state(ssl) and SSL_ST_INIT
-   else:
--    proc SSL_in_init*(ssl: SslPtr): cint {.cdecl, dynlib: DLLSSLName, importc.}
--    proc SSL_CTX_set_ciphersuites*(ctx: SslCtx, str: cstring): cint {.cdecl, dynlib: DLLSSLName, importc.}
-+    proc SSL_in_init*(ssl: SslPtr): cint {.cdecl, gimportc.}
-+    proc SSL_CTX_set_ciphersuites*(ctx: SslCtx, str: cstring): cint {.cdecl, importc.}
- 
-   template OpenSSL_add_all_algorithms*() = discard
- 
--  proc SSLv23_client_method*(): PSSL_METHOD {.cdecl, dynlib: DLLSSLName, importc.}
--  proc SSLv2_method*(): PSSL_METHOD {.cdecl, dynlib: DLLSSLName, importc.}
--  proc SSLv3_method*(): PSSL_METHOD {.cdecl, dynlib: DLLSSLName, importc.}
--  proc CRYPTO_set_mem_functions(a,b,c: pointer){.cdecl, dynlib: DLLUtilName, importc.}
-+  proc SSLv23_client_method*(): PSSL_METHOD {.cdecl, importc.}
-+  proc SSLv2_method*(): PSSL_METHOD {.cdecl, importc.}
-+  proc SSLv3_method*(): PSSL_METHOD {.cdecl, importc.}
-+  proc CRYPTO_set_mem_functions(a,b,c: pointer){.cdecl, gimportc.}
- 
- else:
-   # Here we're trying to stay compatible between openssl versions. Some
-@@ -472,54 +475,52 @@ else:
-       theProc = cast[typeof(theProc)](sslSymThrows("SSL_CTX_set_ciphersuites"))
-     result = theProc(ctx, str)
- 
--proc SSL_new*(context: SslCtx): SslPtr{.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_free*(ssl: SslPtr){.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_get_SSL_CTX*(ssl: SslPtr): SslCtx {.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_set_SSL_CTX*(ssl: SslPtr, ctx: SslCtx): SslCtx {.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_CTX_set_session_id_context*(context: SslCtx, sid_ctx: string, sid_ctx_len: int){.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_get0_verified_chain*(ssl: SslPtr): PSTACK {.cdecl, dynlib: DLLSSLName,
-+proc SSL_new*(context: SslCtx): SslPtr{.cdecl, importc.}
-+proc SSL_free*(ssl: SslPtr){.cdecl, importc.}
-+proc SSL_get_SSL_CTX*(ssl: SslPtr): SslCtx {.cdecl, importc.}
-+proc SSL_set_SSL_CTX*(ssl: SslPtr, ctx: SslCtx): SslCtx {.cdecl, importc.}
-+proc SSL_CTX_set_session_id_context*(context: SslCtx, sid_ctx: string, sid_ctx_len: int){.cdecl, importc.}
-+proc SSL_get0_verified_chain*(ssl: SslPtr): PSTACK {.cdecl,
-     importc.}
- proc SSL_CTX_new*(meth: PSSL_METHOD): SslCtx{.cdecl,
--    dynlib: DLLSSLName, importc.}
-+    importc.}
- proc SSL_CTX_load_verify_locations*(ctx: SslCtx, CAfile: cstring,
--    CApath: cstring): cint{.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_CTX_free*(arg0: SslCtx){.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_CTX_set_verify*(s: SslCtx, mode: int, cb: proc (a: int, b: pointer): int {.cdecl.}){.cdecl, dynlib: DLLSSLName, importc.}
-+    CApath: cstring): cint{.cdecl, importc.}
-+proc SSL_CTX_free*(arg0: SslCtx){.cdecl, importc.}
-+proc SSL_CTX_set_verify*(s: SslCtx, mode: int, cb: proc (a: int, b: pointer): int {.cdecl.}){.cdecl, importc.}
- proc SSL_get_verify_result*(ssl: SslPtr): int{.cdecl,
--    dynlib: DLLSSLName, importc.}
-+    importc.}
- 
--proc SSL_CTX_set_cipher_list*(s: SslCtx, ciphers: cstring): cint{.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_CTX_use_certificate_file*(ctx: SslCtx, filename: cstring, typ: cint): cint{.
--    stdcall, dynlib: DLLSSLName, importc.}
--proc SSL_CTX_use_certificate_chain_file*(ctx: SslCtx, filename: cstring): cint{.
--    stdcall, dynlib: DLLSSLName, importc.}
-+proc SSL_CTX_set_cipher_list*(s: SslCtx, ciphers: cstring): cint{.cdecl, importc.}
-+proc SSL_CTX_use_certificate_file*(ctx: SslCtx, filename: cstring, typ: cint): cint{.stdcall, importc.}
-+proc SSL_CTX_use_certificate_chain_file*(ctx: SslCtx, filename: cstring): cint{.stdcall, importc.}
- proc SSL_CTX_use_PrivateKey_file*(ctx: SslCtx,
--    filename: cstring, typ: cint): cint{.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_CTX_check_private_key*(ctx: SslCtx): cint{.cdecl, dynlib: DLLSSLName,
-+    filename: cstring, typ: cint): cint{.cdecl, importc.}
-+proc SSL_CTX_check_private_key*(ctx: SslCtx): cint{.cdecl,
-     importc.}
- 
--proc SSL_CTX_get_ex_new_index*(argl: clong, argp: pointer, new_func: pointer, dup_func: pointer, free_func: pointer): cint {.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_CTX_set_ex_data*(ssl: SslCtx, idx: cint, arg: pointer): cint {.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_CTX_get_ex_data*(ssl: SslCtx, idx: cint): pointer {.cdecl, dynlib: DLLSSLName, importc.}
-+proc SSL_CTX_get_ex_new_index*(argl: clong, argp: pointer, new_func: pointer, dup_func: pointer, free_func: pointer): cint {.cdecl, importc.}
-+proc SSL_CTX_set_ex_data*(ssl: SslCtx, idx: cint, arg: pointer): cint {.cdecl, importc.}
-+proc SSL_CTX_get_ex_data*(ssl: SslCtx, idx: cint): pointer {.cdecl, importc.}
- 
--proc SSL_set_fd*(ssl: SslPtr, fd: SocketHandle): cint{.cdecl, dynlib: DLLSSLName, importc.}
-+proc SSL_set_fd*(ssl: SslPtr, fd: SocketHandle): cint{.cdecl, importc.}
- 
--proc SSL_shutdown*(ssl: SslPtr): cint{.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_set_shutdown*(ssl: SslPtr, mode: cint) {.cdecl, dynlib: DLLSSLName, importc: "SSL_set_shutdown".}
--proc SSL_get_shutdown*(ssl: SslPtr): cint {.cdecl, dynlib: DLLSSLName, importc: "SSL_get_shutdown".}
--proc SSL_connect*(ssl: SslPtr): cint{.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_read*(ssl: SslPtr, buf: pointer, num: int): cint{.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_write*(ssl: SslPtr, buf: cstring, num: int): cint{.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_get_error*(s: SslPtr, ret_code: cint): cint{.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_accept*(ssl: SslPtr): cint{.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_pending*(ssl: SslPtr): cint{.cdecl, dynlib: DLLSSLName, importc.}
-+proc SSL_shutdown*(ssl: SslPtr): cint{.cdecl, importc.}
-+proc SSL_set_shutdown*(ssl: SslPtr, mode: cint) {.cdecl, importc: "SSL_set_shutdown".}
-+proc SSL_get_shutdown*(ssl: SslPtr): cint {.cdecl, importc: "SSL_get_shutdown".}
-+proc SSL_connect*(ssl: SslPtr): cint{.cdecl, importc.}
-+proc SSL_read*(ssl: SslPtr, buf: pointer, num: int): cint{.cdecl, importc.}
-+proc SSL_write*(ssl: SslPtr, buf: cstring, num: int): cint{.cdecl, importc.}
-+proc SSL_get_error*(s: SslPtr, ret_code: cint): cint{.cdecl, importc.}
-+proc SSL_accept*(ssl: SslPtr): cint{.cdecl, importc.}
-+proc SSL_pending*(ssl: SslPtr): cint{.cdecl, importc.}
- 
- proc BIO_new_mem_buf*(data: pointer, len: cint): BIO{.cdecl,
--    dynlib: DLLUtilName, importc.}
-+    importc.}
- proc BIO_new_ssl_connect*(ctx: SslCtx): BIO{.cdecl,
--    dynlib: DLLSSLName, importc.}
-+    importc.}
- proc BIO_ctrl*(bio: BIO, cmd: cint, larg: int, arg: cstring): int{.cdecl,
--    dynlib: DLLUtilName, importc.}
-+    importc.}
- proc BIO_get_ssl*(bio: BIO, ssl: ptr SslPtr): int =
-   return BIO_ctrl(bio, BIO_C_GET_SSL, 0, cast[cstring](ssl))
- proc BIO_set_conn_hostname*(bio: BIO, name: cstring): int =
-@@ -529,30 +530,30 @@ proc BIO_do_handshake*(bio: BIO): int =
- proc BIO_do_connect*(bio: BIO): int =
-   return BIO_do_handshake(bio)
- 
--proc BIO_read*(b: BIO, data: cstring, length: cint): cint{.cdecl, dynlib: DLLUtilName, importc.}
--proc BIO_write*(b: BIO, data: cstring, length: cint): cint{.cdecl, dynlib: DLLUtilName, importc.}
-+proc BIO_read*(b: BIO, data: cstring, length: cint): cint{.cdecl, importc.}
-+proc BIO_write*(b: BIO, data: cstring, length: cint): cint{.cdecl, importc.}
- 
--proc BIO_free*(b: BIO): cint{.cdecl, dynlib: DLLUtilName, importc.}
-+proc BIO_free*(b: BIO): cint{.cdecl, importc.}
- 
--proc ERR_print_errors_fp*(fp: File){.cdecl, dynlib: DLLUtilName, importc.}
-+proc ERR_print_errors_fp*(fp: File){.cdecl, importc.}
- 
- proc ERR_error_string*(e: culong, buf: cstring): cstring{.cdecl,
--    dynlib: DLLUtilName, importc.}
--proc ERR_get_error*(): culong{.cdecl, dynlib: DLLUtilName, importc.}
--proc ERR_peek_last_error*(): culong{.cdecl, dynlib: DLLUtilName, importc.}
-+    importc.}
-+proc ERR_get_error*(): culong{.cdecl, importc.}
-+proc ERR_peek_last_error*(): culong{.cdecl, importc.}
- 
--proc OPENSSL_config*(configName: cstring){.cdecl, dynlib: DLLUtilName, importc.}
-+proc OPENSSL_config*(configName: cstring){.cdecl, importc.}
- 
--proc OPENSSL_sk_num*(stack: PSTACK): int {.cdecl, dynlib: DLLSSLName, importc.}
-+proc OPENSSL_sk_num*(stack: PSTACK): int {.cdecl, importc.}
- 
- proc OPENSSL_sk_value*(stack: PSTACK, index: int): pointer {.cdecl,
--    dynlib: DLLSSLName, importc.}
-+    importc.}
- 
- proc d2i_X509*(px: ptr PX509, i: ptr ptr uint8, len: cint): PX509 {.cdecl,
--    dynlib: DLLUtilName, importc.}
-+    importc.}
- 
- proc i2d_X509*(cert: PX509; o: ptr ptr uint8): cint {.cdecl,
--    dynlib: DLLUtilName, importc.}
-+    importc.}
- 
- proc d2i_X509*(b: string): PX509 =
-   ## decode DER/BER bytestring into X.509 certificate struct
-@@ -591,24 +592,21 @@ else:
-   proc CRYPTO_malloc_init*() =
-     discard
- 
--proc SSL_CTX_ctrl*(ctx: SslCtx, cmd: cint, larg: clong, parg: pointer): clong{.
--  cdecl, dynlib: DLLSSLName, importc.}
-+proc SSL_CTX_ctrl*(ctx: SslCtx, cmd: cint, larg: clong, parg: pointer): clong{.cdecl, importc.}
- 
--proc SSL_CTX_callback_ctrl(ctx: SslCtx, typ: cint, fp: PFunction): int{.
--  cdecl, dynlib: DLLSSLName, importc.}
-+proc SSL_CTX_callback_ctrl(ctx: SslCtx, typ: cint, fp: PFunction): int{.cdecl, importc.}
- 
- proc SSLCTXSetMode*(ctx: SslCtx, mode: int): int =
-   result = SSL_CTX_ctrl(ctx, SSL_CTRL_MODE, clong mode, nil)
- 
--proc SSL_ctrl*(ssl: SslPtr, cmd: cint, larg: int, parg: pointer): int{.
--  cdecl, dynlib: DLLSSLName, importc.}
-+proc SSL_ctrl*(ssl: SslPtr, cmd: cint, larg: int, parg: pointer): int{.cdecl, importc.}
- 
- proc SSL_set_tlsext_host_name*(ssl: SslPtr, name: cstring): int =
-   ## Set the SNI server name extension to be used in a client hello.
-   ## Returns 1 if SNI was set, 0 if current SSL configuration doesn't support SNI.
-   result = SSL_ctrl(ssl, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, name)
- 
--proc SSL_get_servername*(ssl: SslPtr, typ: cint = TLSEXT_NAMETYPE_host_name): cstring {.cdecl, dynlib: DLLSSLName, importc.}
-+proc SSL_get_servername*(ssl: SslPtr, typ: cint = TLSEXT_NAMETYPE_host_name): cstring {.cdecl, importc.}
-   ## Retrieve the server name requested in the client hello. This can be used
-   ## in the callback set in `SSL_CTX_set_tlsext_servername_callback` to
-   ## implement virtual hosting. May return `nil`.
-@@ -635,16 +633,16 @@ type
-   PskServerCallback* = proc (ssl: SslPtr;
-     identity: cstring; psk: ptr uint8; max_psk_len: cint): cuint {.cdecl.}
- 
--proc SSL_CTX_set_psk_client_callback*(ctx: SslCtx; callback: PskClientCallback) {.cdecl, dynlib: DLLSSLName, importc.}
-+proc SSL_CTX_set_psk_client_callback*(ctx: SslCtx; callback: PskClientCallback) {.cdecl, importc.}
-   ## Set callback called when OpenSSL needs PSK (for client).
- 
--proc SSL_CTX_set_psk_server_callback*(ctx: SslCtx; callback: PskServerCallback) {.cdecl, dynlib: DLLSSLName, importc.}
-+proc SSL_CTX_set_psk_server_callback*(ctx: SslCtx; callback: PskServerCallback) {.cdecl, importc.}
-   ## Set callback called when OpenSSL needs PSK (for server).
- 
--proc SSL_CTX_use_psk_identity_hint*(ctx: SslCtx; hint: cstring): cint {.cdecl, dynlib: DLLSSLName, importc.}
-+proc SSL_CTX_use_psk_identity_hint*(ctx: SslCtx; hint: cstring): cint {.cdecl, importc.}
-   ## Set PSK identity hint to use.
- 
--proc SSL_get_psk_identity*(ssl: SslPtr): cstring {.cdecl, dynlib: DLLSSLName, importc.}
-+proc SSL_get_psk_identity*(ssl: SslPtr): cstring {.cdecl, importc.}
-   ## Get PSK identity.
- 
- proc SSL_CTX_set_ecdh_auto*(ctx: SslCtx, onoff: cint): cint {.inline.} =
-@@ -656,62 +654,62 @@ proc SSL_CTX_set_ecdh_auto*(ctx: SslCtx, onoff: cint): cint {.inline.} =
-   else:
-     result = 1
- 
--proc bioNew*(b: PBIO_METHOD): BIO{.cdecl, dynlib: DLLUtilName, importc: "BIO_new".}
--proc bioFreeAll*(b: BIO){.cdecl, dynlib: DLLUtilName, importc: "BIO_free_all".}
--proc bioSMem*(): PBIO_METHOD{.cdecl, dynlib: DLLUtilName, importc: "BIO_s_mem".}
--proc bioCtrlPending*(b: BIO): cint{.cdecl, dynlib: DLLUtilName, importc: "BIO_ctrl_pending".}
-+proc bioNew*(b: PBIO_METHOD): BIO{.cdecl, importc: "BIO_new".}
-+proc bioFreeAll*(b: BIO){.cdecl, importc: "BIO_free_all".}
-+proc bioSMem*(): PBIO_METHOD{.cdecl, importc: "BIO_s_mem".}
-+proc bioCtrlPending*(b: BIO): cint{.cdecl, importc: "BIO_ctrl_pending".}
- proc bioRead*(b: BIO, Buf: cstring, length: cint): cint{.cdecl,
--    dynlib: DLLUtilName, importc: "BIO_read".}
-+    importc: "BIO_read".}
- proc bioWrite*(b: BIO, Buf: cstring, length: cint): cint{.cdecl,
--    dynlib: DLLUtilName, importc: "BIO_write".}
-+    importc: "BIO_write".}
- 
- proc sslSetConnectState*(s: SslPtr) {.cdecl,
--    dynlib: DLLSSLName, importc: "SSL_set_connect_state".}
-+    importc: "SSL_set_connect_state".}
- proc sslSetAcceptState*(s: SslPtr) {.cdecl,
--    dynlib: DLLSSLName, importc: "SSL_set_accept_state".}
-+    importc: "SSL_set_accept_state".}
- 
- proc sslRead*(ssl: SslPtr, buf: cstring, num: cint): cint{.cdecl,
--      dynlib: DLLSSLName, importc: "SSL_read".}
-+      importc: "SSL_read".}
- proc sslPeek*(ssl: SslPtr, buf: cstring, num: cint): cint{.cdecl,
--    dynlib: DLLSSLName, importc: "SSL_peek".}
-+    importc: "SSL_peek".}
- proc sslWrite*(ssl: SslPtr, buf: cstring, num: cint): cint{.cdecl,
--    dynlib: DLLSSLName, importc: "SSL_write".}
-+    importc: "SSL_write".}
- 
- proc sslSetBio*(ssl: SslPtr, rbio, wbio: BIO) {.cdecl,
--    dynlib: DLLSSLName, importc: "SSL_set_bio".}
-+    importc: "SSL_set_bio".}
- 
- proc sslDoHandshake*(ssl: SslPtr): cint {.cdecl,
--    dynlib: DLLSSLName, importc: "SSL_do_handshake".}
-+    importc: "SSL_do_handshake".}
- 
- 
--proc ErrClearError*(){.cdecl, dynlib: DLLUtilName, importc: "ERR_clear_error".}
--proc ErrFreeStrings*(){.cdecl, dynlib: DLLUtilName, importc: "ERR_free_strings".}
--proc ErrRemoveState*(pid: cint){.cdecl, dynlib: DLLUtilName, importc: "ERR_remove_state".}
-+proc ErrClearError*(){.cdecl, importc: "ERR_clear_error".}
-+proc ErrFreeStrings*(){.cdecl, importc: "ERR_free_strings".}
-+proc ErrRemoveState*(pid: cint){.cdecl, importc: "ERR_remove_state".}
- 
- proc PEM_read_bio_RSA_PUBKEY*(bp: BIO, x: ptr PRSA, pw: pem_password_cb, u: pointer): PRSA {.cdecl,
--    dynlib: DLLUtilName, importc.}
-+    importc.}
- proc PEM_read_RSA_PUBKEY*(fp: pointer; x: ptr PRSA; cb: pem_password_cb, u: pointer): PRSA {.cdecl,
--    dynlib: DLLUtilName, importc.}
-+    importc.}
- proc RSA_verify*(kind: cint, origMsg: pointer, origMsgLen: cuint, signature: pointer,
--    signatureLen: cuint, rsa: PRSA): cint {.cdecl, dynlib: DLLUtilName, importc.}
-+    signatureLen: cuint, rsa: PRSA): cint {.cdecl, importc.}
- proc PEM_read_RSAPrivateKey*(fp: pointer; x: ptr PRSA; cb: pem_password_cb, u: pointer): PRSA {.cdecl,
--    dynlib: DLLUtilName, importc.}
-+    importc.}
- proc PEM_read_RSAPublicKey*(fp: pointer; x: ptr PRSA; cb: pem_password_cb, u: pointer): PRSA {.cdecl,
--    dynlib: DLLUtilName, importc.}
-+    importc.}
- proc PEM_read_bio_RSAPublicKey*(bp: BIO, x: ptr PRSA, cb: pem_password_cb, u: pointer): PRSA {.cdecl,
--    dynlib: DLLUtilName, importc.}
-+    importc.}
- proc PEM_read_bio_RSAPrivateKey*(bp: BIO, x: ptr PRSA, cb: pem_password_cb, u: pointer): PRSA {.cdecl,
--    dynlib: DLLUtilName, importc.}
-+    importc.}
- proc RSA_private_encrypt*(flen: cint, fr: ptr uint8, to: ptr uint8, rsa: PRSA, padding: PaddingType): cint {.cdecl,
--    dynlib: DLLUtilName, importc.}
-+    importc.}
- proc RSA_public_encrypt*(flen: cint, fr: ptr uint8, to: ptr uint8, rsa: PRSA, padding: PaddingType): cint {.cdecl,
--    dynlib: DLLUtilName, importc.}
-+    importc.}
- proc RSA_private_decrypt*(flen: cint, fr: ptr uint8, to: ptr uint8, rsa: PRSA, padding: PaddingType): cint {.cdecl,
--    dynlib: DLLUtilName, importc.}
-+    importc.}
- proc RSA_public_decrypt*(flen: cint, fr: ptr uint8, to: ptr uint8, rsa: PRSA, padding: PaddingType): cint {.cdecl,
--    dynlib: DLLUtilName, importc.}
--proc RSA_free*(rsa: PRSA) {.cdecl, dynlib: DLLUtilName, importc.}
--proc RSA_size*(rsa: PRSA): cint {.cdecl, dynlib: DLLUtilName, importc.}
-+    importc.}
-+proc RSA_free*(rsa: PRSA) {.cdecl, importc.}
-+proc RSA_size*(rsa: PRSA): cint {.cdecl, importc.}
- 
- # sha types
- proc EVP_md_null*(): EVP_MD   {.lcrypto.}
-@@ -753,9 +751,9 @@ when defined(macosx) or defined(windows):
-   proc EVP_MD_CTX_cleanup*(ctx: EVP_MD_CTX): cint {.lcrypto.}
- else:
-   # some times you will need this instead:
--  proc EVP_MD_CTX_create*(): EVP_MD_CTX {.cdecl, importc: "EVP_MD_CTX_new", dynlib: DLLUtilName.}
--  proc EVP_MD_CTX_destroy*(ctx: EVP_MD_CTX) {.cdecl, importc: "EVP_MD_CTX_free", dynlib: DLLUtilName.}
--  proc EVP_MD_CTX_cleanup*(ctx: EVP_MD_CTX): cint {.cdecl, importc: "EVP_MD_CTX_cleanup", dynlib: DLLUtilName.}
-+  proc EVP_MD_CTX_create*(): EVP_MD_CTX {.cdecl, importc: "EVP_MD_CTX_new".}
-+  proc EVP_MD_CTX_destroy*(ctx: EVP_MD_CTX) {.cdecl, importc: "EVP_MD_CTX_free".}
-+  proc EVP_MD_CTX_cleanup*(ctx: EVP_MD_CTX): cint {.cdecl, importc: "EVP_MD_CTX_cleanup".}
- 
- # <openssl/md5.h>
- type
-@@ -770,7 +768,7 @@ type
-     data: array[MD5_LBLOCK, MD5_LONG]
-     num: cuint
- 
--{.push callconv:cdecl, dynlib:DLLUtilName.}
-+{.push callconv:cdecl.}
- proc md5_Init*(c: var MD5_CTX): cint{.importc: "MD5_Init".}
- proc md5_Update*(c: var MD5_CTX; data: pointer; len: csize_t): cint{.importc: "MD5_Update".}
- proc md5_Final*(md: cstring; c: var MD5_CTX): cint{.importc: "MD5_Final".}
-@@ -835,11 +833,11 @@ when not defined(nimDisableCertificateValidation) and not defined(windows):
-   # SSL_get_peer_certificate removed in 3.0
-   # SSL_get1_peer_certificate added in 3.0
-   when useOpenssl3:
--    proc SSL_get1_peer_certificate*(ssl: SslCtx): PX509 {.cdecl, dynlib: DLLSSLName, importc.}
-+    proc SSL_get1_peer_certificate*(ssl: SslCtx): PX509 {.cdecl, importc.}
-     proc SSL_get_peer_certificate*(ssl: SslCtx): PX509 =
-       SSL_get1_peer_certificate(ssl)
-   elif useStaticLink:
--    proc SSL_get_peer_certificate*(ssl: SslCtx): PX509 {.cdecl, dynlib: DLLSSLName, importc.}
-+    proc SSL_get_peer_certificate*(ssl: SslCtx): PX509 {.cdecl, importc.}
-   else:
-     proc SSL_get_peer_certificate*(ssl: SslCtx): PX509 =
-       let methodSym = sslSymNullable("SSL_get_peer_certificate", "SSL_get1_peer_certificate")
-@@ -848,26 +846,24 @@ when not defined(nimDisableCertificateValidation) and not defined(windows):
-       let method2Proc = cast[proc(ssl: SslCtx): PX509 {.cdecl, gcsafe, raises: [].}](methodSym)
-       return method2Proc(ssl)
- 
--  proc X509_get_subject_name*(a: PX509): PX509_NAME{.cdecl, dynlib: DLLSSLName, importc.}
-+  proc X509_get_subject_name*(a: PX509): PX509_NAME{.cdecl, importc.}
- 
--  proc X509_get_issuer_name*(a: PX509): PX509_NAME{.cdecl, dynlib: DLLUtilName, importc.}
-+  proc X509_get_issuer_name*(a: PX509): PX509_NAME{.cdecl, importc.}
- 
--  proc X509_NAME_oneline*(a: PX509_NAME, buf: cstring, size: cint): cstring {.
--    cdecl, dynlib:DLLSSLName, importc.}
-+  proc X509_NAME_oneline*(a: PX509_NAME, buf: cstring, size: cint): cstring {.cdecl, importc.}
- 
--  proc X509_NAME_get_text_by_NID*(subject:cstring, NID: cint, buf: cstring, size: cint): cint{.
--    cdecl, dynlib:DLLSSLName, importc.}
-+  proc X509_NAME_get_text_by_NID*(subject:cstring, NID: cint, buf: cstring, size: cint): cint{.cdecl, importc.}
- 
--  proc X509_check_host*(cert: PX509, name: cstring, namelen: cint, flags:cuint, peername: cstring): cint {.cdecl, dynlib: DLLSSLName, importc.}
-+  proc X509_check_host*(cert: PX509, name: cstring, namelen: cint, flags:cuint, peername: cstring): cint {.cdecl, importc.}
- 
--  proc X509_free*(cert: PX509) {.cdecl, dynlib: DLLSSLName, importc.}
-+  proc X509_free*(cert: PX509) {.cdecl, importc.}
- 
-   # Certificates store
- 
-   type PX509_STORE* = SslPtr
-   type PX509_OBJECT* = SslPtr
- 
--  {.push callconv:cdecl, dynlib:DLLUtilName, importc.}
-+  {.push callconv:cdecl, importc.}
- 
-   proc X509_OBJECT_new*(): PX509_OBJECT
-   proc X509_OBJECT_free*(a: PX509_OBJECT)
-@@ -897,12 +893,12 @@ when not defined(nimDisableCertificateValidation) and not defined(windows):
- # Available in at least OpenSSL 1.1.1 and later, not sure if earlier
- # --Iced Quinn
- 
--proc SSL_CTX_set_alpn_protos*(ctx: SslCtx; protos: cstring; protos_len: cuint): cint {.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_set_alpn_protos*(ssl: SslPtr; protos: cstring; protos_len: cuint): cint {.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_CTX_set_alpn_select_cb*(ctx: SslCtx; cb: proc(ssl: SslPtr; out_proto: ptr cstring; outlen: cstring; in_proto: cstring; inlen: cuint; arg: pointer): cint {.cdecl.}; arg: pointer): cint {.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_get0_alpn_selected*(ssl: SslPtr; data: ptr cstring; len: ptr cuint) {.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_CTX_set_next_protos_advertised_cb*(ctx: SslCtx; cb: proc(ssl: SslPtr; out_proto: ptr cstring; outlen: ptr cuint; arg: pointer): cint {.cdecl.}; arg: pointer) {.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_CTX_set_next_proto_select_cb*(ctx: SslCtx; cb: proc(s: SslPtr; out_proto: cstring; outlen: cstring; in_proto: cstring; inlen: cuint; arg: pointer): cint {.cdecl.}; arg: pointer) {.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_select_next_proto*(out_proto: ptr cstring; outlen: cstring; server: cstring; server_len: cuint; client: cstring; client_len: cuint): cint {.cdecl, dynlib: DLLSSLName, importc.}
--proc SSL_get0_next_proto_negotiated*(s: SslPtr; data: ptr cstring; len: ptr cuint) {.cdecl, dynlib: DLLSSLName, importc.}
-+proc SSL_CTX_set_alpn_protos*(ctx: SslCtx; protos: cstring; protos_len: cuint): cint {.cdecl, importc.}
-+proc SSL_set_alpn_protos*(ssl: SslPtr; protos: cstring; protos_len: cuint): cint {.cdecl, importc.}
-+proc SSL_CTX_set_alpn_select_cb*(ctx: SslCtx; cb: proc(ssl: SslPtr; out_proto: ptr cstring; outlen: cstring; in_proto: cstring; inlen: cuint; arg: pointer): cint {.cdecl.}; arg: pointer): cint {.cdecl, importc.}
-+proc SSL_get0_alpn_selected*(ssl: SslPtr; data: ptr cstring; len: ptr cuint) {.cdecl, importc.}
-+proc SSL_CTX_set_next_protos_advertised_cb*(ctx: SslCtx; cb: proc(ssl: SslPtr; out_proto: ptr cstring; outlen: ptr cuint; arg: pointer): cint {.cdecl.}; arg: pointer) {.cdecl, importc.}
-+proc SSL_CTX_set_next_proto_select_cb*(ctx: SslCtx; cb: proc(s: SslPtr; out_proto: cstring; outlen: cstring; in_proto: cstring; inlen: cuint; arg: pointer): cint {.cdecl.}; arg: pointer) {.cdecl, importc.}
-+proc SSL_select_next_proto*(out_proto: ptr cstring; outlen: cstring; server: cstring; server_len: cuint; client: cstring; client_len: cuint): cint {.cdecl, importc.}
-+proc SSL_get0_next_proto_negotiated*(s: SslPtr; data: ptr cstring; len: ptr cuint) {.cdecl, importc.}
- 
diff --git a/pkgs/development/compilers/nim/toLocation.patch b/pkgs/development/compilers/nim/toLocation.patch
deleted file mode 100644
index a3db46044049..000000000000
--- a/pkgs/development/compilers/nim/toLocation.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/lib/std/private/miscdollars.nim b/lib/std/private/miscdollars.nim
-index 840fedf54..6c3436308 100644
---- a/lib/std/private/miscdollars.nim
-+++ b/lib/std/private/miscdollars.nim
-@@ -6,9 +6,8 @@ template toLocation*(result: var string, file: string | cstring, line: int, col:
-   # it can be done in a single place.
-   result.add file
-   if line > 0:
--    result.add "("
-+    result.add ":"
-     addInt(result, line)
-     if col > 0:
--      result.add ", "
-+      result.add ":"
-       addInt(result, col)
--    result.add ")"