Merge pull request #342 from nix-community/platform-fixes

disable shellcheck for x86_32 and riscv64 in one place
This commit is contained in:
Jörg Thalheim authored and GitHub committed 2023-09-02 18:41:03 +02:00
commit 0eb913fe20
7 files changed
+16 -11

No files matched your search

+6 -3
View File
@@ -37,18 +37,21 @@
checks = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
nixosTests = import ./tests {
# FIXME: aarch64-linux seems to hang on boot
nixosTests = nixpkgs.lib.optionalAttrs pkgs.hostPlatform.isx86_64 (import ./tests {
inherit pkgs;
makeTest = import (pkgs.path + "/nixos/tests/make-test-python.nix");
eval-config = import (pkgs.path + "/nixos/lib/eval-config.nix");
};
});
shellcheck = pkgs.runCommand "shellcheck" { nativeBuildInputs = [ pkgs.shellcheck ]; } ''
cd ${./.}
shellcheck disk-deactivate/disk-deactivate disko
touch $out
'';
in
nixosTests // pkgs.lib.optionalAttrs (!pkgs.buildPlatform.isRiscV64) { inherit shellcheck; });
# FIXME: aarch64-linux seems to hang on boot
nixpkgs.lib.optionalAttrs pkgs.hostPlatform.isx86_64 nixosTests //
pkgs.lib.optionalAttrs (!pkgs.buildPlatform.isRiscV64 && !pkgs.hostPlatform.isx86_32) { inherit shellcheck; });
formatter = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
+1 -1
View File
@@ -253,7 +253,7 @@ let
*/
writeCheckedBash = { pkgs, checked ? false, noDeps ? false }: pkgs.writers.makeScriptWriter {
interpreter = if noDeps then "/usr/bin/env bash" else "${pkgs.bash}/bin/bash";
check = lib.optionalString checked (pkgs.writeScript "check" ''
check = lib.optionalString (checked && !pkgs.hostPlatform.isRiscV64 && !pkgs.hostPlatform.isx86_32) (pkgs.writeScript "check" ''
set -efu
${pkgs.shellcheck}/bin/shellcheck -e SC2034 "$1"
'');
+5 -4
View File
@@ -6,10 +6,11 @@ let
else if config.passwordFile != null
then ''<(echo -n "$(cat ${config.passwordFile})")''
else if config.keyFile != null
then lib.warn
("The option `keyFile` is deprecated."
+ "Use passwordFile instead if you want to use interactive login or settings.keyFile if you want to use key file login")
config.keyFile
then
lib.warn
("The option `keyFile` is deprecated."
+ "Use passwordFile instead if you want to use interactive login or settings.keyFile if you want to use key file login")
config.keyFile
else null;
keyFileArgs = ''\
${lib.optionalString (keyFile != null) "--key-file ${keyFile}"} \
+1 -1
View File
@@ -60,7 +60,7 @@
readOnly = true;
default =
[
(if lib.versionAtLeast (lib.versions.majorMinor lib.version) "23.11" then {
(if lib.versionAtLeast (lib.versions.majorMinor lib.version) "23.11" then {
boot.swraid.enable = true;
} else {
boot.initrd.services.swraid.enable = true;
+1 -1
View File
@@ -7,13 +7,13 @@ diskoLib.testLib.makeDiskoTest {
disko-config = ../example/complex.nix;
extraSystemConfig = {
fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this!
fileSystems."/zfs_fs".options = [ "nofail" ]; # TODO find out why we need this!
};
testMode = "direct";
extraTestScript = ''
machine.succeed("test -b /dev/zroot/zfs_testvolume");
machine.succeed("test -b /dev/md/raid1p1");
machine.succeed("mountpoint /zfs_fs");
machine.succeed("mountpoint /zfs_legacy_fs");
machine.succeed("mountpoint /ext4onzfs");
+1
View File
@@ -7,6 +7,7 @@ diskoLib.testLib.makeDiskoTest {
disko-config = ../example/complex.nix;
extraSystemConfig = {
fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this!
fileSystems."/zfs_fs".options = [ "nofail" ]; # TODO find out why we need this!
};
extraTestScript = ''
machine.succeed("test -b /dev/zroot/zfs_testvolume");
+1 -1
View File
@@ -10,6 +10,6 @@ diskoLib.makeDiskImageScript {
system.stateVersion = config.system.nixos.version;
})
];
checked = !pkgs.hostPlatform.isRiscV64;
checked = true;
}