Skip to content

Commit a85d6dd

Browse files
committed
chore: bump nixpkgs
1 parent ec9c836 commit a85d6dd

File tree

8 files changed

+31
-1684
lines changed

8 files changed

+31
-1684
lines changed

default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ let
5151
gitMinimal nodePackages.sass nodejs
5252

5353
# For building diagrams:
54-
poppler_utils our-texlive
54+
poppler-utils our-texlive
5555
] ++ (if interactive then [
5656
sort-imports
5757
] else [

support/nix/build-shake.nix

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{ pkgs
2+
, lib
23
, nix-gitignore
34
, our-ghc
45
, makeWrapper
@@ -9,25 +10,27 @@
910
, gmp
1011
, name
1112
, main
13+
, importNpmLock
1214
}:
1315
let
14-
nodeEnv = import ./node/node-env.nix {
15-
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript nodejs;
16-
inherit pkgs;
17-
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
18-
};
16+
nodeModules = importNpmLock.buildNodeModules {
17+
npmRoot = ../..;
18+
inherit (pkgs) nodejs;
1919

20-
# To cut down on the image size we maim all references to Python and bash here.
21-
nodeDependencies = (import ./node/node-dependencies.nix {
22-
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
23-
inherit nodeEnv;
24-
}).nodeDependencies.overrideDerivation (old: {
25-
installPhase = ''
26-
${old.installPhase}
27-
find $out -print0 | xargs -0 ${pkgs.removeReferencesTo}/bin/remove-references-to -t ${pkgs.python3}
28-
find $out -print0 | xargs -0 ${pkgs.removeReferencesTo}/bin/remove-references-to -t ${pkgs.bash}
29-
'';
30-
});
20+
# To cut down on the image size we maim some references here.
21+
derivationArgs = let
22+
forbiddenRefs = [
23+
pkgs.python3
24+
pkgs.bashNonInteractive
25+
];
26+
in {
27+
nativeBuildInputs = [ removeReferencesTo ];
28+
postInstall = ''
29+
find "$out" -exec remove-references-to ${lib.concatMapStringsSep " " (x: "-t ${lib.escapeShellArg x}") forbiddenRefs} '{}' +
30+
'';
31+
disallowedReferences = forbiddenRefs;
32+
};
33+
};
3134
in
3235
stdenv.mkDerivation {
3336
inherit name;
@@ -36,7 +39,8 @@ stdenv.mkDerivation {
3639
propagatedBuildInputs = [ lua5_3 gmp ];
3740

3841
buildPhase = ''
39-
ghc -o ${main} app/${main} -threaded -with-rtsopts "-A128M -N -I0" -rtsopts -iapp -O2 -split-sections -DNODE_LIB_PATH="\"${nodeDependencies}/lib/node_modules\"" -DNODE_BIN_PATH="\"${nodeDependencies}/bin\""
42+
ghc -o ${main} app/${main} -threaded -with-rtsopts "-A128M -N -I0" -rtsopts -iapp -O2 -split-sections \
43+
-DNODE_BIN_PATH="\"${nodeModules}/node_modules/.bin\"" # see Utils.hs
4044
'';
4145

4246
installPhase = ''
@@ -52,8 +56,7 @@ stdenv.mkDerivation {
5256
remove-references-to -t ${labHaskellPackages.js-dgtable} ${main}
5357
cp ${main} $out/bin/${name}
5458
wrapProgram $out/bin/${name} \
55-
--prefix PATH : ${nodeDependencies}/bin \
56-
--prefix NODE_PATH : ${nodeDependencies}/lib/node_modules
59+
--prefix NODE_PATH : ${nodeModules}/node_modules
5760
'';
5861

5962
disallowedReferences = with labHaskellPackages; [

support/nix/nixpkgs.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
args: import (builtins.fetchTarball {
22
name = "1lab-nixpkgs";
3-
url = "https://github.com/nixos/nixpkgs/archive/45f4a9dfc86f0628270e35fb3bcdec035d6205df.tar.gz";
4-
sha256 = "sha256:1z6ssk35am53pgf5h907302mx47kvgqnp4qm2z3xfy3vyly19xn8";
3+
url = "https://github.com/nixos/nixpkgs/archive/e99366c665bdd53b7b500ccdc5226675cfc51f45.tar.gz";
4+
sha256 = "sha256-EiED5k6gXTWoAIS8yQqi5mAX6ojnzpHwAQTS3ykeYMg=";
55
}) ({
66
overlays = [ (import ./haskell-packages.nix) ];
77
} // args)

0 commit comments

Comments
 (0)