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