Skip to content

Commit f366596

Browse files
authored
Merge pull request #93 from elland/spring-cleaning
Updated nix to latest version.
2 parents 0a87aee + 748f25c commit f366596

File tree

5 files changed

+34
-34
lines changed

5 files changed

+34
-34
lines changed

default.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ compiler ? "ghc884"
1+
{ compiler ? "ghc8104"
22
, system ? builtins.currentSystem
33
, pkgs ? import ./dep/nixpkgs { inherit system; }
44
}:
@@ -7,7 +7,7 @@ let
77
inherit (pkgs) lib;
88
inherit (pkgs.lib.trivial) flip pipe;
99
inherit (pkgs.haskell.lib) appendPatch appendConfigureFlags overrideCabal;
10-
nodePkgs = (pkgs.callPackage ./dep/node { inherit pkgs; nodejs = pkgs.nodejs-12_x; }).shell.nodeDependencies;
10+
nodePkgs = (pkgs.callPackage ./dep/node { inherit pkgs; nodejs = pkgs.nodejs; }).shell.nodeDependencies;
1111

1212
haskellPackages = pkgs.haskell.packages.${compiler}.override {
1313
overrides = hpNew: hpOld: {
@@ -17,7 +17,7 @@ let
1717
[ (flip appendConfigureFlags [ "-f" "watchServer" "-f" "previewServer" ])
1818
];
1919

20-
haskell-foundation = hpNew.callCabal2nix "haskell-foundation" (pkgs.stdenv.lib.cleanSource ./haskell) { };
20+
haskell-foundation = hpNew.callCabal2nix "haskell-foundation" (pkgs.lib.cleanSource ./haskell) { };
2121
};
2222
};
2323

dep/nixpkgs/github.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"owner": "NixOS",
33
"repo": "nixpkgs",
4-
"branch": "nixos-20.09",
4+
"branch": "master",
55
"private": false,
6-
"rev": "9b8530e3721fc008bacac61b6c50a29712ee2f2f",
7-
"sha256": "1f584ms40nv0s4wc1jl2nq05wn8a85426jdk6iiszaifn07d82jq"
6+
"rev": "1e41d06dd78940e8a292ef42b74d7dab2ef01ac4",
7+
"sha256": "1hd6pg97sd4icqlmxk1bvadz0wbk18wdnh1z8129f31sx0dxizmj"
88
}

dep/node/default.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
{pkgs ? import <nixpkgs> {
44
inherit system;
5-
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-12_x"}:
5+
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs"}:
66

77
let
88
nodeEnv = import ./node-env.nix {
9-
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
9+
inherit (pkgs) lib stdenv python3 utillinux runCommand writeTextFile;
1010
inherit nodejs;
1111
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
1212
};
1313
in
1414
import ./node-packages.nix {
1515
inherit (pkgs) fetchurl fetchgit;
1616
inherit nodeEnv;
17-
}
17+
}

dep/node/node-env.nix

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# This file originates from node2nix
22

3-
{stdenv, nodejs, python2, utillinux, libtool, runCommand, writeTextFile}:
3+
{stdenv, lib, nodejs, python3, utillinux, libtool, runCommand, writeTextFile}:
44

55
let
6-
python = if nodejs ? python then nodejs.python else python2;
6+
python = if nodejs ? python then nodejs.python else python3;
77

88
# Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise
99
tarWrapper = runCommand "tarWrapper" {} ''
@@ -38,8 +38,8 @@ let
3838
};
3939

4040
includeDependencies = {dependencies}:
41-
stdenv.lib.optionalString (dependencies != [])
42-
(stdenv.lib.concatMapStrings (dependency:
41+
lib.optionalString (dependencies != [])
42+
(lib.concatMapStrings (dependency:
4343
''
4444
# Bundle the dependencies of the package
4545
mkdir -p node_modules
@@ -100,7 +100,7 @@ let
100100
cd "$DIR/${packageName}"
101101
${includeDependencies { inherit dependencies; }}
102102
cd ..
103-
${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
103+
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
104104
'';
105105

106106
pinpointDependencies = {dependencies, production}:
@@ -161,12 +161,12 @@ let
161161
''
162162
node ${pinpointDependenciesFromPackageJSON} ${if production then "production" else "development"}
163163
164-
${stdenv.lib.optionalString (dependencies != [])
164+
${lib.optionalString (dependencies != [])
165165
''
166166
if [ -d node_modules ]
167167
then
168168
cd node_modules
169-
${stdenv.lib.concatMapStrings (dependency: pinpointDependenciesOfPackage dependency) dependencies}
169+
${lib.concatMapStrings (dependency: pinpointDependenciesOfPackage dependency) dependencies}
170170
cd ..
171171
fi
172172
''}
@@ -183,7 +183,7 @@ let
183183
cd "${packageName}"
184184
${pinpointDependencies { inherit dependencies production; }}
185185
cd ..
186-
${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
186+
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
187187
fi
188188
'';
189189

@@ -344,8 +344,8 @@ let
344344
cd "${packageName}"
345345
runHook preRebuild
346346
347-
${stdenv.lib.optionalString bypassCache ''
348-
${stdenv.lib.optionalString reconstructLock ''
347+
${lib.optionalString bypassCache ''
348+
${lib.optionalString reconstructLock ''
349349
if [ -f package-lock.json ]
350350
then
351351
echo "WARNING: Reconstruct lock option enabled, but a lock file already exists!"
@@ -361,14 +361,14 @@ let
361361
node ${addIntegrityFieldsScript}
362362
''}
363363
364-
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild
364+
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} rebuild
365365
366366
if [ "''${dontNpmInstall-}" != "1" ]
367367
then
368368
# NPM tries to download packages even when they already exist if npm-shrinkwrap is used.
369369
rm -f npm-shrinkwrap.json
370370
371-
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install
371+
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} install
372372
fi
373373
'';
374374

@@ -396,8 +396,8 @@ let
396396
stdenv.mkDerivation ({
397397
name = "node_${name}-${version}";
398398
buildInputs = [ tarWrapper python nodejs ]
399-
++ stdenv.lib.optional (stdenv.isLinux) utillinux
400-
++ stdenv.lib.optional (stdenv.isDarwin) libtool
399+
++ lib.optional (stdenv.isLinux) utillinux
400+
++ lib.optional (stdenv.isDarwin) libtool
401401
++ buildInputs;
402402

403403
inherit nodejs;
@@ -470,8 +470,8 @@ let
470470
name = "node-dependencies-${name}-${version}";
471471

472472
buildInputs = [ tarWrapper python nodejs ]
473-
++ stdenv.lib.optional (stdenv.isLinux) utillinux
474-
++ stdenv.lib.optional (stdenv.isDarwin) libtool
473+
++ lib.optional (stdenv.isLinux) utillinux
474+
++ lib.optional (stdenv.isDarwin) libtool
475475
++ buildInputs;
476476

477477
inherit dontStrip; # Stripping may fail a build for some package deployments
@@ -491,7 +491,7 @@ let
491491
# Create fake package.json to make the npm commands work properly
492492
cp ${src}/package.json .
493493
chmod 644 package.json
494-
${stdenv.lib.optionalString bypassCache ''
494+
${lib.optionalString bypassCache ''
495495
if [ -f ${src}/package-lock.json ]
496496
then
497497
cp ${src}/package-lock.json .
@@ -500,13 +500,13 @@ let
500500
501501
# Go to the parent folder to make sure that all packages are pinpointed
502502
cd ..
503-
${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
503+
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
504504
505505
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
506506
507507
# Expose the executables that were installed
508508
cd ..
509-
${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
509+
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
510510
511511
mv ${packageName} lib
512512
ln -s $out/lib/node_modules/.bin $out/bin
@@ -516,7 +516,7 @@ let
516516
stdenv.mkDerivation {
517517
name = "node-shell-${name}-${version}";
518518

519-
buildInputs = [ python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ buildInputs;
519+
buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) utillinux ++ buildInputs;
520520
buildCommand = ''
521521
mkdir -p $out/bin
522522
cat > $out/bin/shell <<EOF
@@ -529,14 +529,14 @@ let
529529

530530
# Provide the dependencies in a development shell through the NODE_PATH environment variable
531531
inherit nodeDependencies;
532-
shellHook = stdenv.lib.optionalString (dependencies != []) ''
532+
shellHook = lib.optionalString (dependencies != []) ''
533533
export NODE_PATH=${nodeDependencies}/lib/node_modules
534534
export PATH="${nodeDependencies}/bin:$PATH"
535535
'';
536536
};
537537
in
538538
{
539-
buildNodeSourceDist = stdenv.lib.makeOverridable buildNodeSourceDist;
540-
buildNodePackage = stdenv.lib.makeOverridable buildNodePackage;
541-
buildNodeShell = stdenv.lib.makeOverridable buildNodeShell;
539+
buildNodeSourceDist = lib.makeOverridable buildNodeSourceDist;
540+
buildNodePackage = lib.makeOverridable buildNodePackage;
541+
buildNodeShell = lib.makeOverridable buildNodeShell;
542542
}

haskell/haskell-foundation.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ executable site
1212
, containers
1313
, directory
1414
, filepath
15-
, hakyll == 4.13.*
15+
, hakyll == 4.14.*
1616
, text
1717
, unordered-containers
1818
ghc-options: -threaded

0 commit comments

Comments
 (0)