From 950f1e5ce849e80474a9c4b8b31036495b3993f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 24 Jan 2023 15:05:33 +0100 Subject: [PATCH] also run shellcheck on kexec-run script --- flake.nix | 12 ++++++++++-- nix/kexec-installer/module.nix | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 4643935..e07a818 100644 --- a/flake.nix +++ b/flake.nix @@ -25,8 +25,16 @@ kexec-installer-nixos-2211 = kexec-installer nixos-2211; }); nixosModules.kexec-installer = import ./nix/kexec-installer/module.nix; - checks.x86_64-linux = { - kexec-installer-unstable = nixos-unstable.legacyPackages.x86_64-linux.callPackage ./nix/kexec-installer/test.nix {}; + checks.x86_64-linux = let + pkgs = nixos-unstable.legacyPackages.x86_64-linux; + in { + kexec-installer-unstable = pkgs.callPackage ./nix/kexec-installer/test.nix {}; + shellcheck = pkgs.runCommand "shellcheck" { + nativeBuildInputs = [ pkgs.shellcheck ]; + } '' + shellcheck ${(pkgs.nixos [self.nixosModules.kexec-installer]).config.system.build.kexecRun} + touch $out + ''; kexec-installer-2211 = nixos-2211.legacyPackages.x86_64-linux.callPackage ./nix/kexec-installer/test.nix {}; }; }; diff --git a/nix/kexec-installer/module.nix b/nix/kexec-installer/module.nix index 52f1247..e44bc6e 100644 --- a/nix/kexec-installer/module.nix +++ b/nix/kexec-installer/module.nix @@ -63,7 +63,7 @@ in { echo "The image can depends only on DHCP to get network after reboot!" 2>&1 fi - find | cpio -o -H newc | gzip -9 > ../extra.gz + find . | cpio -o -H newc | gzip -9 > ../extra.gz popd cat extra.gz >> "''${SCRIPT_DIR}/initrd" rm -r "$INITRD_TMP"