From 3b873dc867ea9b6615596f487fac39b1ebb6562e Mon Sep 17 00:00:00 2001 From: Winter Date: Thu, 11 Aug 2022 13:13:19 -0400 Subject: [PATCH 1/2] linux-hardened: use default python3 version in update script --- pkgs/os-specific/linux/kernel/hardened/update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kernel/hardened/update.py b/pkgs/os-specific/linux/kernel/hardened/update.py index d0f8c77c783f..4948c03dc5bb 100755 --- a/pkgs/os-specific/linux/kernel/hardened/update.py +++ b/pkgs/os-specific/linux/kernel/hardened/update.py @@ -1,5 +1,5 @@ #! /usr/bin/env nix-shell -#! nix-shell -i python -p "python38.withPackages (ps: [ps.PyGithub])" git gnupg +#! nix-shell -i python -p "python3.withPackages (ps: [ps.PyGithub])" git gnupg # This is automatically called by ../update.sh. From 23218d872e1de9734fe9f10da9a5ccf566fd9aab Mon Sep 17 00:00:00 2001 From: Winter Date: Thu, 11 Aug 2022 13:49:41 -0400 Subject: [PATCH 2/2] linux-hardened: specify system when calling nix-instantiate in update script This allows the script to run on non-Linux systems. --- pkgs/os-specific/linux/kernel/hardened/update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kernel/hardened/update.py b/pkgs/os-specific/linux/kernel/hardened/update.py index 4948c03dc5bb..8b40088756e1 100755 --- a/pkgs/os-specific/linux/kernel/hardened/update.py +++ b/pkgs/os-specific/linux/kernel/hardened/update.py @@ -201,7 +201,7 @@ for filename in os.listdir(NIXPKGS_KERNEL_PATH): (callPackage {NIXPKGS_KERNEL_PATH / filename} {{}}).version """ kernel_version_json = run( - "nix-instantiate", "--eval", "--json", "--expr", nix_version_expr, + "nix-instantiate", "--eval", "--system", "x86_64-linux", "--json", "--expr", nix_version_expr, ).stdout kernel_version = parse_version(json.loads(kernel_version_json)) if kernel_version < MIN_KERNEL_VERSION: