diff options
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r-- | pkgs/os-specific/linux/iptables/default.nix | 2 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/linux-libre.nix | 11 | ||||
-rw-r--r-- | pkgs/os-specific/linux/libbpf/default.nix | 4 | ||||
-rw-r--r-- | pkgs/os-specific/linux/nftables/default.nix | 2 | ||||
-rw-r--r-- | pkgs/os-specific/linux/systemd/default.nix | 12 | ||||
-rw-r--r-- | pkgs/os-specific/linux/util-linux/default.nix | 16 |
6 files changed, 29 insertions, 18 deletions
diff --git a/pkgs/os-specific/linux/iptables/default.nix b/pkgs/os-specific/linux/iptables/default.nix index fe0e82c4a8e..50730597d9e 100644 --- a/pkgs/os-specific/linux/iptables/default.nix +++ b/pkgs/os-specific/linux/iptables/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, pkg-config, pruneLibtoolFiles, flex, bison , libmnl, libnetfilter_conntrack, libnfnetlink, libnftnl, libpcap -, nftablesCompat ? false +, nftablesCompat ? true }: with lib; diff --git a/pkgs/os-specific/linux/kernel/linux-libre.nix b/pkgs/os-specific/linux/kernel/linux-libre.nix index d8d9edcf4af..ac0f875e3eb 100644 --- a/pkgs/os-specific/linux/kernel/linux-libre.nix +++ b/pkgs/os-specific/linux/kernel/linux-libre.nix @@ -14,9 +14,14 @@ let minor = lib.versions.minor linux.modDirVersion; patch = lib.versions.patch linux.modDirVersion; + # See http://linux-libre.fsfla.org/pub/linux-libre/releases + versionPrefix = if linux.kernelOlder "5.14" then + "gnu1" + else + "gnu"; in linux.override { argsOverride = { - modDirVersion = "${linux.modDirVersion}-gnu"; + modDirVersion = "${linux.modDirVersion}-${versionPrefix}"; isLibre = true; src = stdenv.mkDerivation { @@ -35,10 +40,8 @@ in linux.override { ''; }; - extraMeta.broken = true; - passthru.updateScript = ./update-libre.sh; - maintainers = [ lib.maintainers.qyliss ]; + maintainers = with lib.maintainers; [ qyliss ivar ]; }; } diff --git a/pkgs/os-specific/linux/libbpf/default.nix b/pkgs/os-specific/linux/libbpf/default.nix index 649ad88a3d1..6f242f4c036 100644 --- a/pkgs/os-specific/linux/libbpf/default.nix +++ b/pkgs/os-specific/linux/libbpf/default.nix @@ -7,13 +7,13 @@ with builtins; stdenv.mkDerivation rec { pname = "libbpf"; - version = "0.4.0"; + version = "0.5.0"; src = fetchFromGitHub { owner = "libbpf"; repo = "libbpf"; rev = "v${version}"; - sha256 = "1by5w7g3i2fc10bi6f0j8jqi2nq0x8r973j2qx7qlfryjxr7b2v3"; + sha256 = "08mg5agd40qaz1hz5rqqhf0wgfna06f7l01z5v06y995xdmw2v9g"; }; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/os-specific/linux/nftables/default.nix b/pkgs/os-specific/linux/nftables/default.nix index e0e69adb4b6..73adcd78605 100644 --- a/pkgs/os-specific/linux/nftables/default.nix +++ b/pkgs/os-specific/linux/nftables/default.nix @@ -4,7 +4,7 @@ , gmp, jansson, readline , withDebugSymbols ? false , withPython ? false , python3 -, withXtables ? false , iptables +, withXtables ? true , iptables }: with lib; diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 3af70ff9151..3cb9216b184 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -251,6 +251,7 @@ stdenv.mkDerivation { { name = "libtss2-esys.so.0"; pkg = opt withTpm2Tss tpm2-tss; } { name = "libtss2-rc.so.0"; pkg = opt withTpm2Tss tpm2-tss; } { name = "libtss2-mu.so.0"; pkg = opt withTpm2Tss tpm2-tss; } + { name = "libtss2-tcti-"; pkg = opt withTpm2Tss tpm2-tss; } { name = "libfido2.so.1"; pkg = opt withFido2 libfido2; } ]; @@ -267,8 +268,12 @@ stdenv.mkDerivation { '' else '' # ensure that the library we provide actually exists if ! [ -e ${library} ]; then - echo 'The shared library `${library}` does not exist but was given as subtitute for `${dl.name}`' - exit 1 + # exceptional case, details: + # https://github.com/systemd/systemd-stable/blob/v249-stable/src/shared/tpm2-util.c#L157 + if ! [[ "${library}" =~ .*libtss2-tcti-$ ]]; then + echo 'The shared library `${library}` does not exist but was given as subtitute for `${dl.name}`' + exit 1 + fi fi # make the path to the dependency explicit for file in $(grep -lr '"${dl.name}"' src); do @@ -353,6 +358,7 @@ stdenv.mkDerivation { ++ lib.optionals withHomed [ p11-kit ] ++ lib.optionals (withHomed || withCryptsetup) [ libfido2 ] ++ lib.optionals withLibBPF [ libbpf ] + ++ lib.optional withTpm2Tss tpm2-tss ; #dontAddPrefix = true; @@ -452,7 +458,7 @@ stdenv.mkDerivation { "-Dnss-systemd=false" ] ++ lib.optionals withLibBPF [ "-Dbpf-framework=true" - ]; + ] ++ lib.optional withTpm2Tss "-Dtpm2=true"; preConfigure = '' mesonFlagsArray+=(-Dntp-servers="0.nixos.pool.ntp.org 1.nixos.pool.ntp.org 2.nixos.pool.ntp.org 3.nixos.pool.ntp.org") diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index 73f321f2631..7ab2489f5e8 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -1,5 +1,7 @@ { lib, stdenv, fetchurl, pkg-config, zlib, shadow, libcap_ng -, ncurses ? null, perl ? null, pam, systemd ? null, minimal ? false }: +, ncurses ? null, pam, systemd ? null +, nlsSupport ? true +}: stdenv.mkDerivation rec { pname = "util-linux"; @@ -14,7 +16,7 @@ stdenv.mkDerivation rec { ./rtcwake-search-PATH-for-shutdown.patch ]; - outputs = [ "bin" "dev" "out" "man" ]; + outputs = [ "bin" "dev" "out" "lib" "man" ]; postPatch = '' patchShebangs tests/run.sh @@ -30,6 +32,7 @@ stdenv.mkDerivation rec { # somewhat risky because we have to consider that mount can setuid # root... configureFlags = [ + "--localstatedir=/var" "--enable-write" "--enable-last" "--enable-mesg" @@ -37,30 +40,29 @@ stdenv.mkDerivation rec { "--enable-fs-paths-default=/run/wrappers/bin:/run/current-system/sw/bin:/sbin" "--disable-makeinstall-setuid" "--disable-makeinstall-chown" "--disable-su" # provided by shadow + (lib.enableFeature nlsSupport "nls") (lib.withFeature (ncurses != null) "ncursesw") (lib.withFeature (systemd != null) "systemd") (lib.withFeatureAs (systemd != null) "systemdsystemunitdir" "${placeholder "bin"}/lib/systemd/system/") + "SYSCONFSTATICDIR=${placeholder "lib"}/lib" ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "scanf_cv_type_modifier=ms" ; makeFlags = [ "usrbin_execdir=${placeholder "bin"}/bin" + "usrlib_execdir=${placeholder "lib"}/lib" "usrsbin_execdir=${placeholder "bin"}/sbin" ]; nativeBuildInputs = [ pkg-config ]; buildInputs = [ zlib pam libcap_ng ] - ++ lib.filter (p: p != null) [ ncurses systemd perl ]; + ++ lib.filter (p: p != null) [ ncurses systemd ]; doCheck = false; # "For development purpose only. Don't execute on production system!" - postInstall = lib.optionalString minimal '' - rm -rf $out/share/{locale,doc,bash-completion} - ''; - enableParallelBuilding = true; meta = with lib; { |