Update nixpkgs unstable. (#1196)

* Update nixpkgs unstable.

Plutus needs NixOS/nixpkgs#127239.

* Don't include stack tests that use ghc 8.6.5 when testing ghc 8.10.5

Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
This commit is contained in:
Shea Levy 2021-08-17 08:44:03 -04:00 committed by GitHub
parent ee4b28b051
commit 8aa77fdbd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 41 additions and 30 deletions

View File

@ -212,11 +212,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1623862044,
"narHash": "sha256-mY7nldu9Wl/Yb0qMPihZrWw0bRWXNsk6iyYztw/6F6Y=",
"lastModified": 1628785280,
"narHash": "sha256-2B5eMrEr6O8ff2aQNeVxTB+9WrGE80OB4+oM6T7fOcc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0747387223edf1aa5beaedf48983471315d95e16",
"rev": "6525bbc06a39f26750ad8ee0d40000ddfdc24acb",
"type": "github"
},
"original": {

View File

@ -1,4 +1,4 @@
{ stdenv, lib, mkStackPkgSet, callStackToNix, importAndFilterProject, recurseIntoAttrs, haskellLib, testSrc }:
{ stdenv, lib, mkStackPkgSet, callStackToNix, importAndFilterProject, recurseIntoAttrs, haskellLib, testSrc, compiler-nix-name }:
with lib;
@ -14,6 +14,7 @@ let
packages = pkgSet.config.hsPkgs;
in recurseIntoAttrs {
meta.disabled = compiler-nix-name != "ghc865";
ifdInputs = {
stack-nix = callProjectResults.projectNix;
};

View File

@ -88,7 +88,7 @@ in recurseIntoAttrs ({
dirExistsEmpty "$pkga_basedir/mix/pkga-0.1.0.0"
dirExistsEmpty "$pkga_basedir/tix/pkga-0.1.0.0"
dirExistsEmpty "$project_basedir/tix/all"
'') [ stackProj ])}
'') (optional (compiler-nix-name == "ghc865") stackProj))}
touch $out
'';

View File

@ -117,7 +117,7 @@ in recurseIntoAttrs ({
fileExistsNonEmpty "$project_basedir/tix/pkgb-0.1.0.0/pkgb-0.1.0.0.tix"
dirExists "$project_basedir/tix/pkgb-0.1.0.0/tests${exeExt}"
fileExistsNonEmpty "$project_basedir/tix/pkgb-0.1.0.0/tests${exeExt}/tests${exeExt}.tix"
'') [ stackProj ])}
'') (optional (compiler-nix-name == "ghc865") stackProj))}
touch $out
'';

View File

@ -165,25 +165,25 @@ let
cabal-simple-debug = callTest ./cabal-simple-debug { inherit util compiler-nix-name; };
cabal-simple-prof = callTest ./cabal-simple-prof { inherit util compiler-nix-name; };
cabal-sublib = callTest ./cabal-sublib { inherit util compiler-nix-name; };
with-packages = callTest ./with-packages { inherit util; };
with-packages = callTest ./with-packages { inherit util compiler-nix-name; };
builder-haddock = callTest ./builder-haddock {};
stack-simple = callTest ./stack-simple {};
stack-local-resolver = callTest ./stack-local-resolver {};
stack-local-resolver-subdir = callTest ./stack-local-resolver-subdir {};
stack-remote-resolver = callTest ./stack-remote-resolver {};
stack-simple = callTest ./stack-simple { inherit compiler-nix-name; };
stack-local-resolver = callTest ./stack-local-resolver { inherit compiler-nix-name; };
stack-local-resolver-subdir = callTest ./stack-local-resolver-subdir { inherit compiler-nix-name; };
stack-remote-resolver = callTest ./stack-remote-resolver { inherit compiler-nix-name; };
shell-for-setup-deps = callTest ./shell-for-setup-deps { inherit compiler-nix-name; };
setup-deps = import ./setup-deps { inherit pkgs compiler-nix-name; };
callStackToNix = callTest ./call-stack-to-nix {};
callStackToNix = callTest ./call-stack-to-nix { inherit compiler-nix-name; };
callCabalProjectToNix = callTest ./call-cabal-project-to-nix { inherit compiler-nix-name; };
cabal-source-repo = callTest ./cabal-source-repo { inherit compiler-nix-name; };
cabal-source-repo-comments = callTest ./cabal-source-repo-comments { inherit compiler-nix-name; };
buildable = callTest ./buildable { inherit compiler-nix-name; };
project-flags-cabal = callTest ./project-flags/cabal.nix { inherit compiler-nix-name; };
project-flags-stack = callTest ./project-flags/stack.nix {};
project-flags-stack = callTest ./project-flags/stack.nix { inherit compiler-nix-name; };
ghc-options-cabal = callTest ./ghc-options/cabal.nix { inherit compiler-nix-name; };
ghc-options-stack = callTest ./ghc-options/stack.nix {};
ghc-options-stack = callTest ./ghc-options/stack.nix { inherit compiler-nix-name; };
exe-only = callTest ./exe-only { inherit util compiler-nix-name; };
stack-source-repo = callTest ./stack-source-repo {};
stack-source-repo = callTest ./stack-source-repo { inherit compiler-nix-name; };
cabal-doctests = callTest ./cabal-doctests { inherit util compiler-nix-name; };
extra-hackage = callTest ./extra-hackage { inherit compiler-nix-name; };
hls-cabal = callTest ./haskell-language-server/cabal.nix { inherit compiler-nix-name; };
@ -197,7 +197,7 @@ let
coverage = callTest ./coverage { inherit compiler-nix-name; };
coverage-golden = callTest ./coverage-golden { inherit compiler-nix-name;};
coverage-no-libs = callTest ./coverage-no-libs { inherit compiler-nix-name; };
snapshots = callTest ./snapshots {};
snapshots = callTest ./snapshots { inherit compiler-nix-name; };
sublib-docs = callTest ./sublib-docs { inherit util compiler-nix-name; };
githash = haskell-nix.callPackage ./githash { inherit compiler-nix-name; testSrc = testSrcWithGitDir; };

View File

@ -1,4 +1,4 @@
{ stdenv, lib, stackProject', recurseIntoAttrs, haskellLib, testSrc }:
{ stdenv, lib, stackProject', recurseIntoAttrs, haskellLib, testSrc, compiler-nix-name }:
with lib;
@ -15,7 +15,7 @@ let
in recurseIntoAttrs {
# This test is somehow broken for ghcjs
meta.disabled = stdenv.hostPlatform.isGhcjs;
meta.disabled = stdenv.hostPlatform.isGhcjs || compiler-nix-name != "ghc865";
ifdInputs = {
inherit (project) stack-nix;

View File

@ -1,4 +1,4 @@
{ stdenv, lib, stackProject', recurseIntoAttrs, haskellLib, testSrc }:
{ stdenv, lib, stackProject', recurseIntoAttrs, haskellLib, testSrc, compiler-nix-name }:
with lib;
@ -9,6 +9,7 @@ let
packages = project.hsPkgs;
in recurseIntoAttrs {
meta.disabled = compiler-nix-name != "ghc865";
ifdInputs = {
inherit (project) stack-nix;
};

View File

@ -1,4 +1,4 @@
{ stdenv, lib, haskellPackages, snapshots, recurseIntoAttrs, runCommand, testSrc }:
{ stdenv, lib, haskellPackages, snapshots, recurseIntoAttrs, runCommand, testSrc, compiler-nix-name }:
with lib;
@ -8,7 +8,7 @@ let
in recurseIntoAttrs {
# Does not work on ghcjs because it needs zlib.
meta.disabled = stdenv.hostPlatform.isGhcjs;
meta.disabled = stdenv.hostPlatform.isGhcjs || compiler-nix-name != "ghc865";
inherit env;
run = stdenv.mkDerivation {
name = "shell-for-test";

View File

@ -1,4 +1,4 @@
{ project', recurseIntoAttrs, testSrc }:
{ project', recurseIntoAttrs, testSrc, compiler-nix-name }:
let
project = project' {
@ -7,6 +7,7 @@ let
packages = project.hsPkgs;
in recurseIntoAttrs {
meta.disabled = compiler-nix-name != "ghc865";
ifdInputs = {
inherit (project) stack-nix;
};

View File

@ -1,4 +1,4 @@
{ project', recurseIntoAttrs, testSrc }:
{ project', recurseIntoAttrs, testSrc, compiler-nix-name }:
let
project = project' {
@ -7,6 +7,7 @@ let
packages = project.hsPkgs;
in recurseIntoAttrs {
meta.disabled = compiler-nix-name != "ghc865";
ifdInputs = {
inherit (project) stack-nix;
};

View File

@ -1,4 +1,4 @@
{ project', recurseIntoAttrs, testSrc }:
{ project', recurseIntoAttrs, testSrc, compiler-nix-name }:
let
project = project' {
@ -8,6 +8,7 @@ let
packages = project.hsPkgs;
in recurseIntoAttrs {
meta.disabled = compiler-nix-name != "ghc865";
ifdInputs = {
inherit (project) stack-nix;
};

View File

@ -1,4 +1,4 @@
{ stdenv, lib, pkgs, mkStackPkgSet, haskellLib, testSrc }:
{ stdenv, lib, pkgs, mkStackPkgSet, haskellLib, testSrc, compiler-nix-name }:
with lib;
@ -14,6 +14,7 @@ let
packages = pkgSet.config.hsPkgs;
in pkgs.recurseIntoAttrs {
meta.disabled = compiler-nix-name != "ghc865";
stack-simple-exe = (haskellLib.check packages.stack-simple.components.exes.stack-simple-exe) // {
# Attributes used for debugging with nix repl
inherit pkgSet packages;

View File

@ -1,4 +1,4 @@
{ stackProject', recurseIntoAttrs, testSrc }:
{ stackProject', recurseIntoAttrs, testSrc, compiler-nix-name }:
let
project = stackProject' {
@ -7,6 +7,7 @@ let
packages = project.hsPkgs;
in recurseIntoAttrs {
meta.disabled = compiler-nix-name != "ghc865";
ifdInputs = {
inherit (project) stack-nix;
};

View File

@ -39,25 +39,28 @@ else
fi
printf "*** Checking that a nix-shell works for runghc...\n" >& 2
# This has to use ghc865 for now
nix-shell $NIX_BUILD_ARGS \
--pure ./default.nix \
--argstr compiler-nix-name $GHC \
--argstr compiler-nix-name ghc865 \
-A with-packages.test-shell \
--run 'runghc with-packages/Point.hs'
echo >& 2
printf "*** Checking that a nix-shell works for cabal...\n" >& 2
# This has to use ghc865 for now
nix-shell $NIX_BUILD_ARGS \
--pure ./default.nix \
--argstr compiler-nix-name $GHC \
--argstr compiler-nix-name ghc865 \
-A with-packages.test-shell \
--run 'echo CABAL_CONFIG=$CABAL_CONFIG && type -p ghc && cd with-packages && cabal new-build'
echo >& 2
printf "*** Checking that a nix-shell works for cabal (doExactConfig component)...\n" >& 2
# This has to use ghc865 for now
nix-shell $NIX_BUILD_ARGS \
--pure ./default.nix \
--argstr compiler-nix-name $GHC \
--argstr compiler-nix-name ghc865 \
-A with-packages.test-shell-dec \
--run 'echo CABAL_CONFIG=$CABAL_CONFIG && echo GHC_ENVIRONMENT=$GHC_ENVIRONMENT && cd with-packages && cabal new-build'
echo >& 2

View File

@ -1,4 +1,4 @@
{ stdenv, lib, numactl, util, mkPkgSet, recurseIntoAttrs, testSrc }:
{ stdenv, lib, numactl, util, mkPkgSet, recurseIntoAttrs, testSrc, compiler-nix-name }:
with lib;
with util;
@ -36,6 +36,7 @@ let
extraFlags = if stdenv.isLinux then "-L${numactl}/lib" else "";
in recurseIntoAttrs {
meta.disabled = compiler-nix-name != "ghc865";
# Used for testing externally with nix-shell (../tests.sh).
# This just adds cabal-install to the existing shells.
test-shell = addCabalInstall library;