Skip to content

Commit 4e9a2cc

Browse files
committed
Pin default-setup and default-setup-ghcjs to avoid full rebuild
1 parent ff0156f commit 4e9a2cc

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
pkgs: let baseurl = "https://github.com/input-output-hk/haskell.nix/releases/download/nix-tools-0.2.1/"; in {
2+
aarch64-darwin = pkgs.fetchurl {
3+
name = "aarch64-darwin-nix-tools-static";
4+
url = "${baseurl}aarch64-darwin-nix-tools-static.zip";
5+
sha256 = "sha256-/N2CiakRQHIjLtBbdYfkDyhlHFss9ezWc9WW+HIUOwc=";
6+
};
7+
x86_64-darwin = pkgs.fetchurl {
8+
name = "x86_64-darwin-nix-tools-static";
9+
url = "${baseurl}x86_64-darwin-nix-tools-static.zip";
10+
sha256 = "sha256-1Xbxhw7LR6EooiagmRrHg7+UdxddD0RaKjvM75hwsJo=";
11+
};
12+
aarch64-linux = pkgs.fetchurl {
13+
name = "aarch64-linux-nix-tools-static";
14+
url = "${baseurl}aarch64-linux-nix-tools-static.zip";
15+
sha256 = "sha256-1OarDAiwYbet6ol3q2dZdnsWMHcniK4zznbGiDPMrO4=";
16+
};
17+
x86_64-linux = pkgs.fetchurl {
18+
name = "x86_64-linux-nix-tools-static";
19+
url = "${baseurl}x86_64-linux-nix-tools-static.zip";
20+
sha256 = "sha256-7xckkH+T9uu3fhtTOzqHZ1udNvPJAgkcrvDXEF16qJQ=";
21+
};
22+
}

overlays/default.nix

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ let
2828
# pointing back to the same static-nix-tools derivation. This allows
2929
# downstram derivation to keep using `nix-tools.exes.make-install-plan`
3030
# as shown above.
31-
static-nix-tools =
31+
static-nix-tools' = pins:
3232
let
3333
# TODO replace once haskell-nix-examples nix-tools is in haskell.nix
34-
zipFile = (import ../nix-tools-static.nix final).${final.system};
34+
zipFile = (import pins final).${final.system};
3535
tarball = final.runCommand "nix-tools" {
3636
nativeBuildInputs = [ final.unzip ];
3737
} ''
@@ -44,6 +44,9 @@ let
4444
# add the missing exes attributes to the tarball derivation
4545
tarball // { exes = final.lib.genAttrs nix-tools-provided-exes (_: tarball); };
4646

47+
static-nix-tools = static-nix-tools' ../nix-tools-static.nix;
48+
static-nix-tools-for-default-setup = static-nix-tools' ../nix-tools-static-for-default-setup.nix;
49+
4750
# Version of nix-tools built with a pinned version of haskell.nix.
4851
pinned-nix-tools-lib = (import (final.haskell-nix.sources.flake-compat) {
4952
pkgs = final;
@@ -60,7 +63,11 @@ let
6063
prev.haskell-nix // {
6164
inherit (nix-tools-pkgs) nix-tools nix-tools-set;
6265
# either nix-tools from its overlay or from the tarball.
63-
nix-tools-unchecked = static-nix-tools;
66+
nix-tools-unchecked = static-nix-tools// {
67+
exes = static-nix-tools.exes // {
68+
inherit (static-nix-tools-for-default-setup.exes) default-setup default-setup-ghcjs;
69+
};
70+
};
6471
};
6572
# For use building hadrian. This way updating anything that modifies the
6673
# way hadrian is built will not cause a GHC rebuild.

0 commit comments

Comments
 (0)