nim: invert nim1 to be a definition of nim2

This commit is contained in:
Emery Hemingway
2023-11-28 16:48:10 +02:00
parent 3d616df2a8
commit 9e00db7b79
2 changed files with 22 additions and 21 deletions
+19 -19
View File
@@ -2,8 +2,8 @@
# https://nim-lang.org/docs/nimc.html
{ lib, callPackage, buildPackages, stdenv, fetchurl, fetchgit, fetchFromGitHub
, makeWrapper, openssl, pcre, readline, boehmgc, sqlite, Security, nim-unwrapped
, nim-unwrapped-2, nim }:
, makeWrapper, openssl, pcre, readline, boehmgc, sqlite, Security
, nim-unwrapped-2, nim-unwrapped-1, nim }:
let
parseCpu = platform:
@@ -74,14 +74,14 @@ let
in {
nim-unwrapped = stdenv.mkDerivation (finalAttrs: {
nim-unwrapped-2 = stdenv.mkDerivation (finalAttrs: {
pname = "nim-unwrapped";
version = "1.6.14";
version = "2.0.0";
strictDeps = true;
src = fetchurl {
url = "https://nim-lang.org/download/nim-${finalAttrs.version}.tar.xz";
hash = "sha256-0HDS8oriQA33/kpJ7OufRc1TmQaxB0gYVqCveo+oLck=";
hash = "sha256-vWEB2EADb7eOk6ad9s8/n9DCHNdUtpX/hKO0rdjtCvc=";
};
buildInputs = [ boehmgc openssl pcre readline sqlite ]
@@ -96,7 +96,10 @@ in {
./extra-mangling.patch
# Mangle store paths of modules to prevent runtime dependence.
] ++ lib.optional (!stdenv.hostPlatform.isWindows) ./toLocation.patch;
./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 {
@@ -157,11 +160,11 @@ in {
};
});
nim-unwrapped-2 = nim-unwrapped.overrideAttrs (finalAttrs: rec {
version = "2.0.0";
nim-unwrapped-1 = nim-unwrapped-2.overrideAttrs (finalAttrs: prevAttrs: {
version = "1.6.14";
src = fetchurl {
url = "https://nim-lang.org/download/nim-${version}.tar.xz";
hash = "sha256-vWEB2EADb7eOk6ad9s8/n9DCHNdUtpX/hKO0rdjtCvc=";
url = "https://nim-lang.org/download/nim-${finalAttrs.version}.tar.xz";
hash = "sha256-0HDS8oriQA33/kpJ7OufRc1TmQaxB0gYVqCveo+oLck=";
};
patches = [
@@ -173,10 +176,7 @@ in {
./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.
];
] ++ lib.optional (!stdenv.hostPlatform.isWindows) ./toLocation.patch;
});
} // (let
@@ -312,14 +312,14 @@ in {
};
in {
nim = wrapNim {
nim' = buildPackages.nim-unwrapped;
patches = [ ./nim.cfg.patch ];
};
nim2 = wrapNim {
nim' = buildPackages.nim-unwrapped-2;
patches = [ ./nim2.cfg.patch ];
};
nim1 = wrapNim {
nim' = buildPackages.nim-unwrapped-1;
patches = [ ./nim.cfg.patch ];
};
})
+3 -2
View File
@@ -16806,8 +16806,9 @@ with pkgs;
inherit (callPackages ../development/compilers/nim
{ inherit (darwin) Security; }
) nim-unwrapped nim-unwrapped-2 nim nim2;
nimPackages = recurseIntoAttrs nim.pkgs;
) nim-unwrapped-1 nim-unwrapped-2 nim1 nim2;
nim = nim1;
nimPackages = recurseIntoAttrs nim1.pkgs;
nim2Packages = recurseIntoAttrs nim2.pkgs;
nrpl = callPackage ../development/tools/nrpl { };