mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
kexectools: Disable only on RISC-V if Linux.
The isKexecable flag treated Linux without kexec as just a normal variant, when it really should be treated as a special case incurring complexity debt to support.
This commit is contained in:
parent
b0482248fe
commit
cdf9a78a3e
@ -86,4 +86,6 @@ rec {
|
|||||||
then { system = elem; }
|
then { system = elem; }
|
||||||
else { parsed = elem; };
|
else { parsed = elem; };
|
||||||
in lib.matchAttrs pattern platform;
|
in lib.matchAttrs pattern platform;
|
||||||
|
|
||||||
|
enableIfAvailable = p: if p.meta.available or true then [ p ] else [];
|
||||||
}
|
}
|
||||||
|
@ -39,8 +39,6 @@ rec {
|
|||||||
isAndroid = [ { abi = abis.android; } { abi = abis.androideabi; } ];
|
isAndroid = [ { abi = abis.android; } { abi = abis.androideabi; } ];
|
||||||
isMusl = with abis; map (a: { abi = a; }) [ musl musleabi musleabihf ];
|
isMusl = with abis; map (a: { abi = a; }) [ musl musleabi musleabihf ];
|
||||||
|
|
||||||
isKexecable = map (family: { kernel = kernels.linux; cpu.family = family; })
|
|
||||||
[ "x86" "arm" "aarch64" "mips" ];
|
|
||||||
isEfi = map (family: { cpu.family = family; })
|
isEfi = map (family: { cpu.family = family; })
|
||||||
[ "x86" "arm" "aarch64" ];
|
[ "x86" "arm" "aarch64" ];
|
||||||
isSeccomputable = map (family: { kernel = kernels.linux; cpu.family = family; })
|
isSeccomputable = map (family: { kernel = kernels.linux; cpu.family = family; })
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
config = lib.mkIf (pkgs.kexectools != null) {
|
config = lib.mkIf (pkgs.kexectools.meta.available) {
|
||||||
environment.systemPackages = [ pkgs.kexectools ];
|
environment.systemPackages = [ pkgs.kexectools ];
|
||||||
|
|
||||||
systemd.services."prepare-kexec" =
|
systemd.services."prepare-kexec" =
|
||||||
|
@ -22,5 +22,6 @@ stdenv.mkDerivation rec {
|
|||||||
homepage = http://horms.net/projects/kexec/kexec-tools;
|
homepage = http://horms.net/projects/kexec/kexec-tools;
|
||||||
description = "Tools related to the kexec Linux feature";
|
description = "Tools related to the kexec Linux feature";
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
|
badPlatforms = platforms.riscv;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,8 @@ in stdenv.mkDerivation rec {
|
|||||||
buildInputs =
|
buildInputs =
|
||||||
[ linuxHeaders libcap kmod xz pam acl
|
[ linuxHeaders libcap kmod xz pam acl
|
||||||
/* cryptsetup */ libuuid glib libgcrypt libgpgerror libidn2
|
/* cryptsetup */ libuuid glib libgcrypt libgpgerror libidn2
|
||||||
libmicrohttpd kexectools libseccomp libffi audit lz4 bzip2 libapparmor
|
libmicrohttpd ] ++ stdenv.lib.meta.enableIfAvailable kexectools ++
|
||||||
|
[ libseccomp libffi audit lz4 bzip2 libapparmor
|
||||||
iptables gnu-efi
|
iptables gnu-efi
|
||||||
# This is actually native, but we already pull it from buildPackages
|
# This is actually native, but we already pull it from buildPackages
|
||||||
pythonLxmlEnv
|
pythonLxmlEnv
|
||||||
|
@ -3131,9 +3131,7 @@ with pkgs;
|
|||||||
|
|
||||||
keepalived = callPackage ../tools/networking/keepalived { };
|
keepalived = callPackage ../tools/networking/keepalived { };
|
||||||
|
|
||||||
kexectools = if hostPlatform.isKexecable
|
kexectools = callPackage ../os-specific/linux/kexectools { };
|
||||||
then callPackage ../os-specific/linux/kexectools { }
|
|
||||||
else null;
|
|
||||||
|
|
||||||
keybase = callPackage ../tools/security/keybase { };
|
keybase = callPackage ../tools/security/keybase { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user