diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-03-30 13:30:47 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-03-31 10:13:20 +0000 |
commit | f2e61678de300336b3666afd19af7565efb0c4cf (patch) | |
tree | 49f6906c9d557f7fdd58257ff85ec17fc4495f31 /nixpkgs/pkgs/test | |
parent | f920d5e07c29a9aa1b77d9b88bd604cf1a1f3664 (diff) | |
parent | 00e27c78d3d2de6964096ceee8d70e5b487365e3 (diff) | |
download | nixlib-f2e61678de300336b3666afd19af7565efb0c4cf.tar nixlib-f2e61678de300336b3666afd19af7565efb0c4cf.tar.gz nixlib-f2e61678de300336b3666afd19af7565efb0c4cf.tar.bz2 nixlib-f2e61678de300336b3666afd19af7565efb0c4cf.tar.lz nixlib-f2e61678de300336b3666afd19af7565efb0c4cf.tar.xz nixlib-f2e61678de300336b3666afd19af7565efb0c4cf.tar.zst nixlib-f2e61678de300336b3666afd19af7565efb0c4cf.zip |
Merge commit '00e27c78d3d2de6964096ceee8d70e5b487365e3'
Conflicts: nixpkgs/nixos/modules/system/boot/systemd.nix nixpkgs/pkgs/applications/networking/browsers/firefox/common.nix nixpkgs/pkgs/applications/version-management/git-and-tools/cgit/common.nix nixpkgs/pkgs/applications/version-management/git-and-tools/cgit/default.nix nixpkgs/pkgs/applications/version-management/git-and-tools/cgit/pink.nix nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/test')
-rw-r--r-- | nixpkgs/pkgs/test/haskell/shellFor/default.nix | 11 | ||||
-rw-r--r-- | nixpkgs/pkgs/test/mkOption/declare.nix | 53 | ||||
-rw-r--r-- | nixpkgs/pkgs/test/mkOption/keep.nix | 11 | ||||
-rw-r--r-- | nixpkgs/pkgs/test/mkOption/keep.ref | 57 | ||||
-rw-r--r-- | nixpkgs/pkgs/test/mkOption/merge.nix | 15 | ||||
-rw-r--r-- | nixpkgs/pkgs/test/mkOption/merge.ref | 20 | ||||
-rwxr-xr-x | nixpkgs/pkgs/test/mkOption/test.sh | 9 | ||||
-rw-r--r-- | nixpkgs/pkgs/test/nixos-functions/default.nix | 6 |
8 files changed, 14 insertions, 168 deletions
diff --git a/nixpkgs/pkgs/test/haskell/shellFor/default.nix b/nixpkgs/pkgs/test/haskell/shellFor/default.nix index 04f5e0453619..aa06ff6e52f8 100644 --- a/nixpkgs/pkgs/test/haskell/shellFor/default.nix +++ b/nixpkgs/pkgs/test/haskell/shellFor/default.nix @@ -2,6 +2,7 @@ (haskellPackages.shellFor { packages = p: [ p.constraints p.linear ]; + extraDependencies = p: { libraryHaskellDepends = [ p.releaser ]; }; nativeBuildInputs = [ cabal-install ]; phases = [ "unpackPhase" "buildPhase" "installPhase" ]; unpackPhase = '' @@ -16,6 +17,16 @@ export HOME=$(mktemp -d) mkdir -p $HOME/.cabal touch $HOME/.cabal/config + + # Check extraDependencies.libraryHaskellDepends arg + ghci <<EOF + :m + Releaser.Primitives + :m + System.IO + writeFile "done" "done" + EOF + [[ done == $(cat done) ]] + + # Check packages arg cabal v2-build --offline --verbose constraints linear --ghc-options="-O0 -j$NIX_BUILD_CORES" ''; installPhase = '' diff --git a/nixpkgs/pkgs/test/mkOption/declare.nix b/nixpkgs/pkgs/test/mkOption/declare.nix deleted file mode 100644 index 9e89a1c096da..000000000000 --- a/nixpkgs/pkgs/test/mkOption/declare.nix +++ /dev/null @@ -1,53 +0,0 @@ -# sets of small configurations: -# Each configuration -rec { - # has 2 arguments pkgs and this. - configA = pkgs: this: { - # Can depends on other configuration - require = configB; - - # Defines new options - optionA = pkgs.lib.mkOption { - # With default values - default = false; - # And merging functions. - merge = pkgs.lib.mergeEnableOption; - }; - - # Add a new definition to other options. - optionB = this.optionA; - }; - - # Can be used for option header. - configB = pkgs: this: { - # Can depends on more than one configuration. - require = [ configC configD ]; - - optionB = pkgs.lib.mkOption { - default = false; - }; - - # Is not obliged to define other options. - }; - - configC = pkgs: this: { - require = [ configA ]; - - optionC = pkgs.lib.mkOption { - default = false; - }; - - # Use the default value if it is not overwritten. - optionA = this.optionC; - }; - - # Can also be used as option configuration only. - # without any arguments (backward compatibility) - configD = { - # Is not forced to specify the require attribute. - - # Is not force to make new options. - optionA = true; - optionD = false; - }; -} diff --git a/nixpkgs/pkgs/test/mkOption/keep.nix b/nixpkgs/pkgs/test/mkOption/keep.nix deleted file mode 100644 index 26fb8c28dd59..000000000000 --- a/nixpkgs/pkgs/test/mkOption/keep.nix +++ /dev/null @@ -1,11 +0,0 @@ -let - pkgs = import ../../.. {}; - config = import ./declare.nix; -in - with (pkgs.lib); - - finalReferenceOptionSets - filterOptionSets - pkgs - # List of main configurations. - [ config.configB config.configC ] diff --git a/nixpkgs/pkgs/test/mkOption/keep.ref b/nixpkgs/pkgs/test/mkOption/keep.ref deleted file mode 100644 index a3a051eb48c4..000000000000 --- a/nixpkgs/pkgs/test/mkOption/keep.ref +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version='1.0' encoding='utf-8'?> -<expr> - <attrs> - <attr name="optionA"> - <list> - <attrs> - <attr name="_type"> - <string value="option" /> - </attr> - <attr name="default"> - <bool value="false" /> - </attr> - <attr name="merge"> - <unevaluated /> - </attr> - <attr name="name"> - <string value="optionA" /> - </attr> - </attrs> - </list> - </attr> - <attr name="optionB"> - <list> - <attrs> - <attr name="_type"> - <string value="option" /> - </attr> - <attr name="default"> - <bool value="false" /> - </attr> - <attr name="name"> - <string value="optionB" /> - </attr> - </attrs> - </list> - </attr> - <attr name="optionC"> - <list> - <attrs> - <attr name="_type"> - <string value="option" /> - </attr> - <attr name="default"> - <bool value="false" /> - </attr> - <attr name="name"> - <string value="optionC" /> - </attr> - </attrs> - </list> - </attr> - <attr name="optionD"> - <attrs> - </attrs> - </attr> - </attrs> -</expr> diff --git a/nixpkgs/pkgs/test/mkOption/merge.nix b/nixpkgs/pkgs/test/mkOption/merge.nix deleted file mode 100644 index bbf68218aa09..000000000000 --- a/nixpkgs/pkgs/test/mkOption/merge.nix +++ /dev/null @@ -1,15 +0,0 @@ -let - pkgs = import ../../.. {}; - config = import ./declare.nix; - - # Define the handler of unbound options. - noOption = name: values: - builtins.trace "Attribute named '${name}' does not match any option declaration." values; -in - with (pkgs.lib); - - finalReferenceOptionSets - (mergeOptionSets noOption) - pkgs - # List of main configurations. - [ config.configB config.configC ] diff --git a/nixpkgs/pkgs/test/mkOption/merge.ref b/nixpkgs/pkgs/test/mkOption/merge.ref deleted file mode 100644 index 6956f65dbbcc..000000000000 --- a/nixpkgs/pkgs/test/mkOption/merge.ref +++ /dev/null @@ -1,20 +0,0 @@ -trace: Str("Attribute named 'optionD' does not match any option declaration.",[]) -<?xml version='1.0' encoding='utf-8'?> -<expr> - <attrs> - <attr name="optionA"> - <bool value="true" /> - </attr> - <attr name="optionB"> - <bool value="true" /> - </attr> - <attr name="optionC"> - <bool value="false" /> - </attr> - <attr name="optionD"> - <list> - <bool value="false" /> - </list> - </attr> - </attrs> -</expr> diff --git a/nixpkgs/pkgs/test/mkOption/test.sh b/nixpkgs/pkgs/test/mkOption/test.sh deleted file mode 100755 index 5478846d563f..000000000000 --- a/nixpkgs/pkgs/test/mkOption/test.sh +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -e - -echo 1>&2 "Test: Merge of option bindings." -nix-instantiate merge.nix --eval-only --strict --xml >& merge.out -diff merge.ref merge.out - -echo 1>&2 "Test: Filter of option declarations." -nix-instantiate keep.nix --eval-only --strict --xml >& keep.out -diff keep.ref keep.out diff --git a/nixpkgs/pkgs/test/nixos-functions/default.nix b/nixpkgs/pkgs/test/nixos-functions/default.nix index 6a4f3164f929..a59160511b91 100644 --- a/nixpkgs/pkgs/test/nixos-functions/default.nix +++ b/nixpkgs/pkgs/test/nixos-functions/default.nix @@ -26,14 +26,14 @@ in lib.optionalAttrs stdenv.hostPlatform.isLinux ( fileSystems."/".device = "/dev/null"; }).toplevel; - nixosTest-test = pkgs.nixosTest ({ lib, pkgs, ... }: { + nixosTest-test = pkgs.nixosTest ({ lib, pkgs, figlet, ... }: { name = "nixosTest-test"; machine = { pkgs, ... }: { system.nixos = dummyVersioning; - environment.systemPackages = [ pkgs.hello ]; + environment.systemPackages = [ pkgs.hello figlet ]; }; testScript = '' - machine.succeed("hello") + machine.succeed("hello | figlet >/dev/console") ''; }); |