mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
linux-hardened: Fix kernel version detection
This commit is contained in:
parent
511b503b0d
commit
0c9b897241
@ -184,11 +184,10 @@ for filename in os.listdir(NIXPKGS_KERNEL_PATH):
|
|||||||
with import {NIXPKGS_PATH} {{}};
|
with import {NIXPKGS_PATH} {{}};
|
||||||
(callPackage {NIXPKGS_KERNEL_PATH / filename} {{}}).version
|
(callPackage {NIXPKGS_KERNEL_PATH / filename} {{}}).version
|
||||||
"""
|
"""
|
||||||
kernel_version = parse_version(
|
kernel_version_json = run(
|
||||||
run(
|
"nix-instantiate", "--eval", "--json", "--expr", nix_version_expr,
|
||||||
"nix", "eval", "--impure", "--raw", "--expr", nix_version_expr,
|
).stdout
|
||||||
).stdout
|
kernel_version = parse_version(json.loads(kernel_version_json))
|
||||||
)
|
|
||||||
if kernel_version < MIN_KERNEL_VERSION:
|
if kernel_version < MIN_KERNEL_VERSION:
|
||||||
continue
|
continue
|
||||||
kernel_key = major_kernel_version_key(kernel_version)
|
kernel_key = major_kernel_version_key(kernel_version)
|
||||||
|
Loading…
Reference in New Issue
Block a user