tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
nim: invert nim1 to be a definition of nim2
Emery Hemingway
2 years ago
9e00db7b
3d616df2
+22
-21
2 changed files
expand all
collapse all
unified
split
pkgs
development
compilers
nim
default.nix
top-level
all-packages.nix
+19
-19
pkgs/development/compilers/nim/default.nix
···
2
2
# https://nim-lang.org/docs/nimc.html
3
3
4
4
{ lib, callPackage, buildPackages, stdenv, fetchurl, fetchgit, fetchFromGitHub
5
5
-
, makeWrapper, openssl, pcre, readline, boehmgc, sqlite, Security, nim-unwrapped
6
6
-
, nim-unwrapped-2, nim }:
5
5
+
, makeWrapper, openssl, pcre, readline, boehmgc, sqlite, Security
6
6
+
, nim-unwrapped-2, nim-unwrapped-1, nim }:
7
7
8
8
let
9
9
parseCpu = platform:
···
74
74
75
75
in {
76
76
77
77
-
nim-unwrapped = stdenv.mkDerivation (finalAttrs: {
77
77
+
nim-unwrapped-2 = stdenv.mkDerivation (finalAttrs: {
78
78
pname = "nim-unwrapped";
79
79
-
version = "1.6.14";
79
79
+
version = "2.0.0";
80
80
strictDeps = true;
81
81
82
82
src = fetchurl {
83
83
url = "https://nim-lang.org/download/nim-${finalAttrs.version}.tar.xz";
84
84
-
hash = "sha256-0HDS8oriQA33/kpJ7OufRc1TmQaxB0gYVqCveo+oLck=";
84
84
+
hash = "sha256-vWEB2EADb7eOk6ad9s8/n9DCHNdUtpX/hKO0rdjtCvc=";
85
85
};
86
86
87
87
buildInputs = [ boehmgc openssl pcre readline sqlite ]
···
96
96
97
97
./extra-mangling.patch
98
98
# Mangle store paths of modules to prevent runtime dependence.
99
99
-
] ++ lib.optional (!stdenv.hostPlatform.isWindows) ./toLocation.patch;
99
99
+
100
100
+
./openssl.patch
101
101
+
# 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.
102
102
+
];
100
103
101
104
configurePhase = let
102
105
bootstrapCompiler = stdenv.mkDerivation {
···
157
160
};
158
161
});
159
162
160
160
-
nim-unwrapped-2 = nim-unwrapped.overrideAttrs (finalAttrs: rec {
161
161
-
version = "2.0.0";
163
163
+
nim-unwrapped-1 = nim-unwrapped-2.overrideAttrs (finalAttrs: prevAttrs: {
164
164
+
version = "1.6.14";
162
165
src = fetchurl {
163
163
-
url = "https://nim-lang.org/download/nim-${version}.tar.xz";
164
164
-
hash = "sha256-vWEB2EADb7eOk6ad9s8/n9DCHNdUtpX/hKO0rdjtCvc=";
166
166
+
url = "https://nim-lang.org/download/nim-${finalAttrs.version}.tar.xz";
167
167
+
hash = "sha256-0HDS8oriQA33/kpJ7OufRc1TmQaxB0gYVqCveo+oLck=";
165
168
};
166
169
167
170
patches = [
···
173
176
174
177
./extra-mangling.patch
175
178
# Mangle store paths of modules to prevent runtime dependence.
176
176
-
177
177
-
./openssl.patch
178
178
-
# 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.
179
179
-
];
179
179
+
] ++ lib.optional (!stdenv.hostPlatform.isWindows) ./toLocation.patch;
180
180
});
181
181
182
182
} // (let
···
312
312
};
313
313
in {
314
314
315
315
-
nim = wrapNim {
316
316
-
nim' = buildPackages.nim-unwrapped;
317
317
-
patches = [ ./nim.cfg.patch ];
318
318
-
};
319
319
-
320
315
nim2 = wrapNim {
321
316
nim' = buildPackages.nim-unwrapped-2;
322
317
patches = [ ./nim2.cfg.patch ];
318
318
+
};
319
319
+
320
320
+
nim1 = wrapNim {
321
321
+
nim' = buildPackages.nim-unwrapped-1;
322
322
+
patches = [ ./nim.cfg.patch ];
323
323
};
324
324
325
325
})
+3
-2
pkgs/top-level/all-packages.nix
···
16806
16806
16807
16807
inherit (callPackages ../development/compilers/nim
16808
16808
{ inherit (darwin) Security; }
16809
16809
-
) nim-unwrapped nim-unwrapped-2 nim nim2;
16810
16810
-
nimPackages = recurseIntoAttrs nim.pkgs;
16809
16809
+
) nim-unwrapped-1 nim-unwrapped-2 nim1 nim2;
16810
16810
+
nim = nim1;
16811
16811
+
nimPackages = recurseIntoAttrs nim1.pkgs;
16811
16812
nim2Packages = recurseIntoAttrs nim2.pkgs;
16812
16813
16813
16814
nrpl = callPackage ../development/tools/nrpl { };