diff options
Diffstat (limited to 'pkgs/os-specific')
89 files changed, 636 insertions, 375 deletions
diff --git a/pkgs/os-specific/darwin/m-cli/default.nix b/pkgs/os-specific/darwin/m-cli/default.nix index f19f5a0275bc..939ff36ef0ce 100644 --- a/pkgs/os-specific/darwin/m-cli/default.nix +++ b/pkgs/os-specific/darwin/m-cli/default.nix @@ -35,7 +35,6 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Swiss Army Knife for macOS"; inherit (src.meta) homepage; - repositories.git = "git://github.com/rgcr/m-cli.git"; license = licenses.mit; diff --git a/pkgs/os-specific/darwin/sketchybar/default.nix b/pkgs/os-specific/darwin/sketchybar/default.nix index be44db38fe14..cc5c4ae20458 100644 --- a/pkgs/os-specific/darwin/sketchybar/default.nix +++ b/pkgs/os-specific/darwin/sketchybar/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, Carbon, Cocoa, SkyLight }: +{ lib, stdenv, fetchFromGitHub, memstreamHook, Carbon, Cocoa, SkyLight }: let inherit (stdenv.hostPlatform) system; @@ -10,20 +10,17 @@ in stdenv.mkDerivation rec { pname = "sketchybar"; - version = "2.4.3"; + version = "2.5.0"; src = fetchFromGitHub { owner = "FelixKratz"; repo = "SketchyBar"; rev = "v${version}"; - sha256 = "1370xjl8sas5nghxgjxmc1zgskf28g40pv7nxgh37scjwdrkrrvb"; + sha256 = "sha256-ucTyJhRhSVyE4E/x6PtFz7nHRUg6cKKVOrRpPs39iO8="; }; - buildInputs = [ Carbon Cocoa SkyLight ]; - - postPatch = '' - sed -i -e '/^#include <malloc\/_malloc.h>/d' src/*.[ch] src/*/*.[ch] - ''; + buildInputs = [ Carbon Cocoa SkyLight ] + ++ lib.optionals (stdenv.system == "x86_64-darwin") [ memstreamHook ]; makeFlags = [ target diff --git a/pkgs/os-specific/linux/akvcam/default.nix b/pkgs/os-specific/linux/akvcam/default.nix index 700389a4a183..0724118431ce 100644 --- a/pkgs/os-specific/linux/akvcam/default.nix +++ b/pkgs/os-specific/linux/akvcam/default.nix @@ -12,7 +12,8 @@ stdenv.mkDerivation rec { }; sourceRoot = "source/src"; - makeFlags = [ + nativeBuildInputs = kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags ++ [ "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; diff --git a/pkgs/os-specific/linux/apfs/default.nix b/pkgs/os-specific/linux/apfs/default.nix index 62437d662b92..98fd83ed5d51 100644 --- a/pkgs/os-specific/linux/apfs/default.nix +++ b/pkgs/os-specific/linux/apfs/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation { hardeningDisable = [ "pic" ]; nativeBuildInputs = kernel.moduleBuildDependencies; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "KERNELRELEASE=${kernel.modDirVersion}" "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "INSTALL_MOD_PATH=$(out)" diff --git a/pkgs/os-specific/linux/audit/default.nix b/pkgs/os-specific/linux/audit/default.nix index 9fd24eea6d9b..e9762f44dcdc 100644 --- a/pkgs/os-specific/linux/audit/default.nix +++ b/pkgs/os-specific/linux/audit/default.nix @@ -3,11 +3,13 @@ runCommand, autoreconfHook, autoconf, automake, libtool, - enablePython ? false, python ? null, + # Enabling python support while cross compiling would be possible, but + # the configure script tries executing python to gather info instead of + # relying on python3-config exclusively + enablePython ? stdenv.hostPlatform == stdenv.buildPlatform, python3, swig, + linuxHeaders ? stdenv.cc.libc.linuxHeaders }: -assert enablePython -> python != null; - stdenv.mkDerivation rec { pname = "audit"; version = "2.8.5"; # at the next release, remove the patches below! @@ -21,7 +23,7 @@ stdenv.mkDerivation rec { depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ autoreconfHook ]; - buildInputs = lib.optional enablePython python; + buildInputs = lib.optionals enablePython [ python3 swig ]; configureFlags = [ # z/OS plugin is not useful on Linux, @@ -69,8 +71,11 @@ stdenv.mkDerivation rec { }) ]; - prePatch = '' + postPatch = '' sed -i 's,#include <sys/poll.h>,#include <poll.h>\n#include <limits.h>,' audisp/audispd.c + substituteInPlace bindings/swig/src/auditswig.i \ + --replace "/usr/include/linux/audit.h" \ + "${linuxHeaders}/include/linux/audit.h" '' # According to https://stackoverflow.com/questions/13089166 # --whole-archive linker flag is required to be sure that linker diff --git a/pkgs/os-specific/linux/batman-adv/default.nix b/pkgs/os-specific/linux/batman-adv/default.nix index 354f4b1bff2c..123c42e83971 100644 --- a/pkgs/os-specific/linux/batman-adv/default.nix +++ b/pkgs/os-specific/linux/batman-adv/default.nix @@ -12,11 +12,13 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags ++ [ + "KERNELPATH=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + ]; hardeningDisable = [ "pic" ]; preBuild = '' - makeFlags="KERNELPATH=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" sed -i -e "s,INSTALL_MOD_DIR=,INSTALL_MOD_PATH=$out INSTALL_MOD_DIR=," \ -e /depmod/d Makefile ''; diff --git a/pkgs/os-specific/linux/bluez/default.nix b/pkgs/os-specific/linux/bluez/default.nix index 5e81cf6b2c1d..ab9b7055fdda 100644 --- a/pkgs/os-specific/linux/bluez/default.nix +++ b/pkgs/os-specific/linux/bluez/default.nix @@ -22,11 +22,11 @@ ]; in stdenv.mkDerivation rec { pname = "bluez"; - version = "5.62"; + version = "5.63"; src = fetchurl { url = "mirror://kernel/linux/bluetooth/${pname}-${version}.tar.xz"; - sha256 = "sha256-OAkKW3UOF/wI0+UheO2NMlTF9L0sSIMNXBlVuI47wMI="; + sha256 = "sha256-k0nhHoFguz1yCDXScSUNinQk02kPUonm22/gfMZsbXY="; }; buildInputs = [ @@ -135,6 +135,5 @@ in stdenv.mkDerivation rec { homepage = "http://www.bluez.org/"; license = with licenses; [ gpl2 lgpl21 ]; platforms = platforms.linux; - repositories.git = "https://git.kernel.org/pub/scm/bluetooth/bluez.git"; }; } diff --git a/pkgs/os-specific/linux/can-isotp/default.nix b/pkgs/os-specific/linux/can-isotp/default.nix index 9c30aae86fe8..73edb3be9ec3 100644 --- a/pkgs/os-specific/linux/can-isotp/default.nix +++ b/pkgs/os-specific/linux/can-isotp/default.nix @@ -13,16 +13,13 @@ stdenv.mkDerivation { sha256 = "1laax93czalclg7cy9iq1r7hfh9jigh7igj06y9lski75ap2vhfq"; }; - KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; - INSTALL_MOD_PATH = "\${out}"; + makeFlags = kernel.makeFlags ++ [ + "KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "INSTALL_MOD_PATH=${placeholder "out"}" + ]; - buildPhase = '' - make modules - ''; - - installPhase = '' - make modules_install - ''; + buildFlags = [ "modules" ]; + installTargets = [ "modules_install" ]; nativeBuildInputs = kernel.moduleBuildDependencies; diff --git a/pkgs/os-specific/linux/cryptodev/default.nix b/pkgs/os-specific/linux/cryptodev/default.nix index f09679ba2128..cc3a1d81109e 100644 --- a/pkgs/os-specific/linux/cryptodev/default.nix +++ b/pkgs/os-specific/linux/cryptodev/default.nix @@ -11,6 +11,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-vJQ10rG5FGbeEOqCUmH/pZ0P77kAW/MtUarywbtIyHw="; }; + nativeBuildInputs = kernel.moduleBuildDependencies; hardeningDisable = [ "pic" ]; KERNEL_DIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; diff --git a/pkgs/os-specific/linux/digimend/default.nix b/pkgs/os-specific/linux/digimend/default.nix index 6b5f66f825bd..e26509d3a7cb 100644 --- a/pkgs/os-specific/linux/digimend/default.nix +++ b/pkgs/os-specific/linux/digimend/default.nix @@ -13,8 +13,6 @@ stdenv.mkDerivation rec { sha256 = "1l54j85540386a8aypqka7p5hy1b63cwmpsscv9rmmf10f78v8mm"; }; - INSTALL_MOD_PATH = "\${out}"; - postPatch = '' sed 's/udevadm /true /' -i Makefile sed 's/depmod /true /' -i Makefile @@ -38,10 +36,11 @@ stdenv.mkDerivation rec { rm -r $out/lib/udev ''; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "KVERSION=${kernel.modDirVersion}" "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "DESTDIR=${placeholder "out"}" + "INSTALL_MOD_PATH=${placeholder "out"}" ]; meta = with lib; { diff --git a/pkgs/os-specific/linux/displaylink/default.nix b/pkgs/os-specific/linux/displaylink/default.nix index f1e942a43993..e7e572ce18e1 100644 --- a/pkgs/os-specific/linux/displaylink/default.nix +++ b/pkgs/os-specific/linux/displaylink/default.nix @@ -20,22 +20,22 @@ let in stdenv.mkDerivation rec { pname = "displaylink"; - version = "5.5.0-beta-59.118"; + version = "5.5.0-59.151"; src = requireFile rec { name = "displaylink-55.zip"; - sha256 = "0mid6p1mnkhbl96cr763ngdwrlgnpgs6c137rwc2sjf4v33g59ma"; + sha256 = "0pswmczzrqqq0s0ksp6rfnkm693ligq4nblki1v53jdh0y7d1gff"; message = '' In order to install the DisplayLink drivers, you must first comply with DisplayLink's EULA and download the binaries and sources from here: - https://www.synaptics.com/products/displaylink-graphics/downloads/ubuntu-5.5-Beta + https://www.synaptics.com/products/displaylink-graphics/downloads/ubuntu-5.5 Once you have downloaded the file, please use the following commands and re-run the installation: - mv \$PWD/"DisplayLink USB Graphics Software for Ubuntu (Beta)5.5 Beta-EXE.zip" \$PWD/${name} + mv \$PWD/"DisplayLink USB Graphics Software for Ubuntu5.5-EXE.zip" \$PWD/${name} nix-prefetch-url file://\$PWD/${name} ''; }; diff --git a/pkgs/os-specific/linux/dmtcp/default.nix b/pkgs/os-specific/linux/dmtcp/default.nix index 50124a2bf452..6315d361ed68 100644 --- a/pkgs/os-specific/linux/dmtcp/default.nix +++ b/pkgs/os-specific/linux/dmtcp/default.nix @@ -1,16 +1,14 @@ -{ lib, stdenv, fetchFromGitHub, bash, perl, python2 }: - -# There are fixes for python3 compatibility on master +{ lib, stdenv, fetchFromGitHub, bash, perl, python3 }: stdenv.mkDerivation rec { pname = "dmtcp"; - version = "unstable-2021-03-01"; + version = "unstable-2022-02-28"; src = fetchFromGitHub { owner = pname; repo = pname; - rev = "f999adbb8e88fe452a0e57ceb43b6eed7b4409f9"; - sha256 = "sha256-codCHQui3fGfUZSNq8GuH4ad/GjD6I/S9rX83o8oFPc="; + rev = "133687764c6742906006a1d247e3b83cd860fa1d"; + hash = "sha256-9Vr8IhoeATCfyt7Lp7kYe/7e87mFX9KMNGTqxJgIztE="; }; dontDisableStatic = true; @@ -30,7 +28,7 @@ stdenv.mkDerivation rec { substituteInPlace test/autotest.py \ --replace /bin/bash ${bash}/bin/bash \ --replace /usr/bin/perl ${perl}/bin/perl \ - --replace /usr/bin/python ${python2}/bin/python \ + --replace /usr/bin/python ${python3.interpreter} \ --replace "os.environ['USER']" "\"nixbld1\"" \ --replace "os.getenv('USER')" "\"nixbld1\"" ''; diff --git a/pkgs/os-specific/linux/dpdk-kmods/default.nix b/pkgs/os-specific/linux/dpdk-kmods/default.nix index a188336cbe50..694e508dcd01 100644 --- a/pkgs/os-specific/linux/dpdk-kmods/default.nix +++ b/pkgs/os-specific/linux/dpdk-kmods/default.nix @@ -11,6 +11,9 @@ stdenv.mkDerivation rec { hardeningDisable = [ "pic" ]; + makeFlags = kernel.makeFlags ++ [ + "INSTALL_MOD_PATH=${placeholder "out"}" + ]; KSRC = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; nativeBuildInputs = kernel.moduleBuildDependencies; @@ -18,10 +21,9 @@ stdenv.mkDerivation rec { preBuild = "cd linux/igb_uio"; installPhase = '' - make -C ${KSRC} M=$(pwd) modules_install + make -C ${KSRC} M=$(pwd) modules_install $makeFlags ''; - INSTALL_MOD_PATH = placeholder "out"; enableParallelBuilding = true; meta = with lib; { diff --git a/pkgs/os-specific/linux/earlyoom/default.nix b/pkgs/os-specific/linux/earlyoom/default.nix index 46e83609722a..ad7468bac0f5 100644 --- a/pkgs/os-specific/linux/earlyoom/default.nix +++ b/pkgs/os-specific/linux/earlyoom/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, pandoc, installShellFiles, withManpage ? false }: +{ lib, stdenv, fetchFromGitHub, pandoc, installShellFiles, withManpage ? false, nixosTests }: stdenv.mkDerivation rec { pname = "earlyoom"; @@ -23,6 +23,10 @@ stdenv.mkDerivation rec { installManPage earlyoom.1 ''; + passthru.tests = { + inherit (nixosTests) earlyoom; + }; + meta = with lib; { description = "Early OOM Daemon for Linux"; homepage = "https://github.com/rfjakob/earlyoom"; diff --git a/pkgs/os-specific/linux/ena/default.nix b/pkgs/os-specific/linux/ena/default.nix index 1257217a5206..5873a2fe2c1d 100644 --- a/pkgs/os-specific/linux/ena/default.nix +++ b/pkgs/os-specific/linux/ena/default.nix @@ -14,6 +14,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "pic" ]; nativeBuildInputs = kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags; # linux 3.12 NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; @@ -27,7 +28,7 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall - strip -S ena.ko + $STRIP -S ena.ko dest=$out/lib/modules/${kernel.modDirVersion}/misc mkdir -p $dest cp ena.ko $dest/ diff --git a/pkgs/os-specific/linux/evdi/default.nix b/pkgs/os-specific/linux/evdi/default.nix index e40448be4353..721a49ed4a56 100644 --- a/pkgs/os-specific/linux/evdi/default.nix +++ b/pkgs/os-specific/linux/evdi/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { buildInputs = [ kernel libdrm ]; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "KVER=${kernel.modDirVersion}" "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; diff --git a/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch b/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch index 66194430b251..bdb2fc34728a 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch +++ b/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch @@ -1,28 +1,27 @@ diff --git a/data/meson.build b/data/meson.build -index f10d4ff6..2dc66fb6 100644 +index 2ae29ce5..342cac92 100644 --- a/data/meson.build +++ b/data/meson.build -@@ -21,7 +21,7 @@ endif +@@ -26,7 +26,7 @@ endif if build_standalone install_data(['daemon.conf'], - install_dir : join_paths(sysconfdir, 'fwupd') + install_dir : join_paths(sysconfdir_install, 'fwupd') ) - install_data(['power.quirk'], + install_data(['power.quirk', 'cfi.quirk'], install_dir: join_paths(datadir, 'fwupd', 'quirks.d')) diff --git a/data/pki/meson.build b/data/pki/meson.build -index dcd9e128..ff137f3a 100644 +index 2a7d0f24..091981f7 100644 --- a/data/pki/meson.build +++ b/data/pki/meson.build -@@ -2,24 +2,23 @@ install_data([ +@@ -12,13 +12,13 @@ install_data([ 'GPG-KEY-Linux-Foundation-Firmware', 'GPG-KEY-Linux-Vendor-Firmware-Service', ], - install_dir : join_paths(sysconfdir, 'pki', 'fwupd') + install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd') ) - install_data([ 'GPG-KEY-Linux-Foundation-Metadata', 'GPG-KEY-Linux-Vendor-Firmware-Service', @@ -30,7 +29,9 @@ index dcd9e128..ff137f3a 100644 - install_dir : join_paths(sysconfdir, 'pki', 'fwupd-metadata') + install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd-metadata') ) + endif +@@ -26,11 +26,11 @@ if supported_pkcs7 == '1' install_data([ 'LVFS-CA.pem', ], @@ -43,7 +44,7 @@ index dcd9e128..ff137f3a 100644 - install_dir : join_paths(sysconfdir, 'pki', 'fwupd-metadata') + install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd-metadata') ) -- + endif diff --git a/data/remotes.d/meson.build b/data/remotes.d/meson.build index 02d8777b..2c89d593 100644 --- a/data/remotes.d/meson.build @@ -82,10 +83,10 @@ index 02d8777b..2c89d593 100644 + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), ) diff --git a/meson.build b/meson.build -index 7557cd4a..4c98de6d 100644 +index 394f40fa..7b602c73 100644 --- a/meson.build +++ b/meson.build -@@ -190,6 +190,12 @@ endif +@@ -187,6 +187,12 @@ endif mandir = join_paths(prefix, get_option('mandir')) localedir = join_paths(prefix, get_option('localedir')) @@ -99,14 +100,14 @@ index 7557cd4a..4c98de6d 100644 gio = dependency('gio-2.0', version : '>= 2.45.8') giounix = dependency('gio-unix-2.0', version : '>= 2.45.8', required: false) diff --git a/meson_options.txt b/meson_options.txt -index 94f73898..5de6cc7b 100644 +index c1b483cb..047dbdd8 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ +option('sysconfdir_install', type: 'string', value: '', description: 'sysconfdir to use during installation') option('build', type : 'combo', choices : ['all', 'standalone', 'library'], value : 'all', description : 'build type') option('consolekit', type : 'boolean', value : true, description : 'enable ConsoleKit support') - option('firmware-packager', type : 'boolean', value : true, description : 'enable firmware-packager installation') + option('static_analysis', type : 'boolean', value : false, description : 'enable GCC static analysis support') diff --git a/plugins/dell-esrt/meson.build b/plugins/dell-esrt/meson.build index e9f12879..a0126dbb 100644 --- a/plugins/dell-esrt/meson.build @@ -119,8 +120,21 @@ index e9f12879..a0126dbb 100644 + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), ) endif +diff --git a/plugins/msr/meson.build b/plugins/msr/meson.build +index 3ea47456..40dbd116 100644 +--- a/plugins/msr/meson.build ++++ b/plugins/msr/meson.build +@@ -12,7 +12,7 @@ install_data(['fwupd-msr.conf'], + endif + + install_data(['msr.conf'], +- install_dir: join_paths(sysconfdir, 'fwupd') ++ install_dir: join_paths(sysconfdir_install, 'fwupd') + ) + shared_module('fu_plugin_msr', + fu_hash, diff --git a/plugins/redfish/meson.build b/plugins/redfish/meson.build -index 5263048c..c46fac64 100644 +index 4a0a8664..7d9ba77d 100644 --- a/plugins/redfish/meson.build +++ b/plugins/redfish/meson.build @@ -53,7 +53,7 @@ shared_module('fu_plugin_redfish', @@ -129,14 +143,14 @@ index 5263048c..c46fac64 100644 install_data(['redfish.conf'], - install_dir: join_paths(sysconfdir, 'fwupd'), + install_dir: join_paths(sysconfdir_install, 'fwupd'), - install_mode: 'rw-r-----', ) + if get_option('tests') diff --git a/plugins/thunderbolt/meson.build b/plugins/thunderbolt/meson.build -index 646ed6cb..8d7c59aa 100644 +index 1ba9562f..c074f770 100644 --- a/plugins/thunderbolt/meson.build +++ b/plugins/thunderbolt/meson.build -@@ -35,7 +35,7 @@ fu_plugin_thunderbolt = shared_module('fu_plugin_thunderbolt', +@@ -37,7 +37,7 @@ fu_plugin_thunderbolt = shared_module('fu_plugin_thunderbolt', ) install_data(['thunderbolt.conf'], @@ -146,7 +160,7 @@ index 646ed6cb..8d7c59aa 100644 # we use functions from 2.52 in the tests if get_option('tests') and umockdev.found() and gio.version().version_compare('>= 2.52') diff --git a/plugins/uefi-capsule/meson.build b/plugins/uefi-capsule/meson.build -index 708586b0..f29536b1 100644 +index 04cbd51a..9a8c43de 100644 --- a/plugins/uefi-capsule/meson.build +++ b/plugins/uefi-capsule/meson.build @@ -21,7 +21,7 @@ if host_machine.system() == 'linux' @@ -158,7 +172,7 @@ index 708586b0..f29536b1 100644 ) elif host_machine.system() == 'freebsd' backend_srcs += 'fu-uefi-backend-freebsd.c' -@@ -116,7 +116,7 @@ if get_option('man') +@@ -114,7 +114,7 @@ if get_option('compat_cli') and get_option('man') endif install_data(['uefi_capsule.conf'], diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix index 077c37a72cb3..272bd6dbe8fc 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/default.nix +++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix @@ -12,6 +12,7 @@ , libgudev , polkit , libxmlb +, glib , gusb , sqlite , libarchive @@ -50,6 +51,9 @@ , nixosTests , runCommand , unstableGitUpdater +, modemmanager +, libqmi +, libmbim }: let @@ -112,7 +116,7 @@ let self = stdenv.mkDerivation rec { pname = "fwupd"; - version = "1.7.2"; + version = "1.7.6"; # libfwupd goes to lib # daemon, plug-ins and libfwupdplugin go to out @@ -121,7 +125,7 @@ let src = fetchurl { url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz"; - sha256 = "sha256-hjLfacO6/Fk4fNy1F8POMaWXoJAm5E9ZB9g4RnG5+DQ="; + sha256 = "sha256-fr4VFKy2iNJknOzDktuSkJTaPwPPyYqcD6zKuwhJEvo="; }; patches = [ @@ -136,15 +140,26 @@ let # they are not really part of the library. ./install-fwupdplugin-to-out.patch + # Fix detection of installed tests + # https://github.com/fwupd/fwupd/issues/3880 + (fetchpatch { + url = "https://github.com/fwupd/fwupd/commit/5bc546221331feae9cedc1892219a25d8837955f.patch"; + sha256 = "XcLhcDrB2/MFCXjKAyhftQgvJG4BBkp07geM9eK3q1g="; + }) + # Installed tests are installed to different output # we also cannot have fwupd-tests.conf in $out/etc since it would form a cycle. ./installed-tests-path.patch - # Tests detect fwupd is installed when prefix is /usr. - ./fix-install-detection.patch - # EFI capsule is located in fwupd-efi now. ./efi-app-path.patch + + # Drop hard-coded FHS path + # https://github.com/fwupd/fwupd/issues/4360 + (fetchpatch { + url = "https://github.com/fwupd/fwupd/commit/14cc2e7ee471b66ee2ef54741f4bec1f92204620.patch"; + sha256 = "47682oqE66Y6QKPtN2mYpnb2+TIJFqBgsgx60LmC3FM="; + }) ]; nativeBuildInputs = [ @@ -187,6 +202,9 @@ let efivar fwupd-efi protobufc + modemmanager + libmbim + libqmi ] ++ lib.optionals haveDell [ libsmbios ]; @@ -206,6 +224,7 @@ let "--sysconfdir=/etc" "-Dsysconfdir_install=${placeholder "out"}/etc" "-Defi_os_dir=nixos" + "-Dplugin_modem_manager=true" # We do not want to place the daemon into lib (cyclic reference) "--libexecdir=${placeholder "out"}/libexec" @@ -250,6 +269,9 @@ let contrib/generate-version-script.py \ meson_post_install.sh \ po/test-deps + + substituteInPlace data/installed-tests/fwupdmgr-p2p.sh \ + --replace "gdbus" ${glib.bin}/bin/gdbus ''; preCheck = '' @@ -301,6 +323,7 @@ let passthru = { filesInstalledToEtc = [ "fwupd/daemon.conf" + "fwupd/msr.conf" "fwupd/remotes.d/lvfs-testing.conf" "fwupd/remotes.d/lvfs.conf" "fwupd/remotes.d/vendor.conf" diff --git a/pkgs/os-specific/linux/firmware/fwupd/fix-install-detection.patch b/pkgs/os-specific/linux/firmware/fwupd/fix-install-detection.patch deleted file mode 100644 index 56d7def5c16a..000000000000 --- a/pkgs/os-specific/linux/firmware/fwupd/fix-install-detection.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/plugins/redfish/fu-self-test.c b/plugins/redfish/fu-self-test.c -index 4710c769..1c68fdb9 100644 ---- a/plugins/redfish/fu-self-test.c -+++ b/plugins/redfish/fu-self-test.c -@@ -27,7 +27,7 @@ fu_test_is_installed_test(void) - const gchar *builddir = g_getenv("G_TEST_BUILDDIR"); - if (builddir == NULL) - return FALSE; -- return g_str_has_prefix(builddir, "/usr"); -+ return g_str_has_prefix(builddir, "/nix"); - } - - static void diff --git a/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch b/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch index 2024e84b0a83..ea50d88dfed6 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch +++ b/pkgs/os-specific/linux/firmware/fwupd/installed-tests-path.patch @@ -1,8 +1,8 @@ diff --git a/data/installed-tests/meson.build b/data/installed-tests/meson.build -index adadbcdd..1b51bb9c 100644 +index b8ec916f0..38209b363 100644 --- a/data/installed-tests/meson.build +++ b/data/installed-tests/meson.build -@@ -65,5 +65,5 @@ configure_file( +@@ -83,5 +83,5 @@ configure_file( output : 'fwupd-tests.conf', configuration : con2, install: true, @@ -10,10 +10,10 @@ index adadbcdd..1b51bb9c 100644 + install_dir: join_paths(get_option('installed_test_prefix'), 'etc', 'fwupd', 'remotes.d'), ) diff --git a/meson.build b/meson.build -index 772b7bbe..f59302cd 100644 +index 32fe6e408..b35d741e0 100644 --- a/meson.build +++ b/meson.build -@@ -177,8 +177,8 @@ else +@@ -183,8 +183,8 @@ else datadir = join_paths(prefix, get_option('datadir')) sysconfdir = join_paths(prefix, get_option('sysconfdir')) localstatedir = join_paths(prefix, get_option('localstatedir')) @@ -24,6 +24,14 @@ index 772b7bbe..f59302cd 100644 endif mandir = join_paths(prefix, get_option('mandir')) localedir = join_paths(prefix, get_option('localedir')) +@@ -484,6 +484,7 @@ gnome = import('gnome') + i18n = import('i18n') + + conf.set_quoted('FWUPD_PREFIX', prefix) ++conf.set_quoted('FWUPD_INSTALLED_TEST_PREFIX', get_option('installed_test_prefix')) + conf.set_quoted('FWUPD_BINDIR', bindir) + conf.set_quoted('FWUPD_LIBDIR', libdir) + conf.set_quoted('FWUPD_LIBEXECDIR', libexecdir) diff --git a/meson_options.txt b/meson_options.txt index 0a0e2853..5f68d78b 100644 --- a/meson_options.txt @@ -36,3 +44,16 @@ index 0a0e2853..5f68d78b 100644 option('tests', type : 'boolean', value : true, description : 'enable tests') option('tpm', type : 'boolean', value : true, description : 'enable TPM support') option('udevdir', type: 'string', value: '', description: 'Directory for udev rules') +diff --git a/plugins/redfish/fu-self-test.c b/plugins/redfish/fu-self-test.c +index c507fabc8..0cddc3248 100644 +--- a/plugins/redfish/fu-self-test.c ++++ b/plugins/redfish/fu-self-test.c +@@ -27,7 +27,7 @@ fu_test_is_installed_test(void) + const gchar *builddir = g_getenv("G_TEST_BUILDDIR"); + if (builddir == NULL) + return FALSE; +- return g_str_has_prefix(builddir, FWUPD_PREFIX); ++ return g_str_has_prefix(builddir, FWUPD_INSTALLED_TEST_PREFIX); + } + + static void diff --git a/pkgs/os-specific/linux/firmware/linux-firmware/default.nix b/pkgs/os-specific/linux/firmware/linux-firmware/default.nix index 4aff785b855e..22dc930d293d 100644 --- a/pkgs/os-specific/linux/firmware/linux-firmware/default.nix +++ b/pkgs/os-specific/linux/firmware/linux-firmware/default.nix @@ -2,12 +2,12 @@ stdenvNoCC.mkDerivation rec { pname = "linux-firmware"; - version = "20220209"; + version = "20220310"; src = fetchgit { url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"; rev = "refs/tags/${version}"; - sha256 = "sha256-QWGnaGQrDUQeYUIBq0/63YdHZgyaF4s9fdyLA9bb6qs="; + sha256 = "sha256-U5XZHzriZaPlgiAcrZnAA7K8PKnIGy58Pi6JziVFTR8="; }; installFlags = [ "DESTDIR=$(out)" ]; @@ -17,7 +17,7 @@ stdenvNoCC.mkDerivation rec { outputHashMode = "recursive"; outputHashAlgo = "sha256"; - outputHash = "sha256-ahXZK13wrcZW/8ZCgUTHU6N4QKsL3NV98eRbYGBp3jw="; + outputHash = "sha256-CAYJssH36aKhzvl0q60HyxgDXeAluspfnLLmawmWIQw="; meta = with lib; { description = "Binary firmware collection packaged by kernel.org"; diff --git a/pkgs/os-specific/linux/firmware/rt5677/default.nix b/pkgs/os-specific/linux/firmware/rt5677/default.nix index f5d84179fd29..f21d34bbe533 100644 --- a/pkgs/os-specific/linux/firmware/rt5677/default.nix +++ b/pkgs/os-specific/linux/firmware/rt5677/default.nix @@ -1,15 +1,15 @@ -{ lib, stdenv, fetchgit }: +{ lib, stdenv, fetchFromGitHub }: stdenv.mkDerivation { name = "rt5677-firmware"; - src = fetchgit { - url = "https://github.com/raphael/linux-samus"; + src = fetchFromGitHub { + owner = "raphael"; + repo = "linux-samus"; rev = "995de6c2093797905fbcd79f1a3625dd3f50be37"; - sha256 = "0a6lz9wadm47cmva136q6wd0lw03bmymf9ispnzb091a7skwacry"; + sha256 = "sha256-PjPFpz4qJLC+vTomV31dA3AKGjfYjKB2ZYfUpnj61Cg="; }; - installPhase = '' mkdir -p $out/lib/firmware cp ./firmware/rt5677_elf_vad $out/lib/firmware diff --git a/pkgs/os-specific/linux/forktty/default.nix b/pkgs/os-specific/linux/forktty/default.nix index f060557cdecd..7dc1f0c3b2e4 100644 --- a/pkgs/os-specific/linux/forktty/default.nix +++ b/pkgs/os-specific/linux/forktty/default.nix @@ -5,8 +5,8 @@ stdenv.mkDerivation rec { version = "1.3"; src = fetchurl { - url = "http://sunsite.unc.edu/pub/linux/utils/terminal/forktty-${version}.tgz"; - sha256 = "sha256-6xc5eshCuCIOsDh0r2DizKAeypGH0TRRotZ4itsvpVk="; + url = "mirror://ibiblioPubLinux/utils/terminal/${pname}-${version}.tgz"; + hash = "sha256-6xc5eshCuCIOsDh0r2DizKAeypGH0TRRotZ4itsvpVk="; }; preBuild = '' diff --git a/pkgs/os-specific/linux/fwts/module.nix b/pkgs/os-specific/linux/fwts/module.nix index 737d3316e21d..72f25aa800eb 100644 --- a/pkgs/os-specific/linux/fwts/module.nix +++ b/pkgs/os-specific/linux/fwts/module.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "pic" ]; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "INSTALL_MOD_PATH=${placeholder "out"}" ]; diff --git a/pkgs/os-specific/linux/gcadapter-oc-kmod/default.nix b/pkgs/os-specific/linux/gcadapter-oc-kmod/default.nix index ab2e099d9708..bcea220cc96e 100644 --- a/pkgs/os-specific/linux/gcadapter-oc-kmod/default.nix +++ b/pkgs/os-specific/linux/gcadapter-oc-kmod/default.nix @@ -19,7 +19,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = kernel.moduleBuildDependencies; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "KERNEL_SOURCE_DIR=${kernel.dev}/${kerneldir}/build" "INSTALL_MOD_PATH=$(out)" ]; diff --git a/pkgs/os-specific/linux/hid-nintendo/default.nix b/pkgs/os-specific/linux/hid-nintendo/default.nix index e9ee88252ea8..7d01120b2f3f 100644 --- a/pkgs/os-specific/linux/hid-nintendo/default.nix +++ b/pkgs/os-specific/linux/hid-nintendo/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = kernel.moduleBuildDependencies; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "-C" "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "M=$(sourceRoot)" diff --git a/pkgs/os-specific/linux/hostapd/default.nix b/pkgs/os-specific/linux/hostapd/default.nix index 8124da489aee..3fdbaa9149a6 100644 --- a/pkgs/os-specific/linux/hostapd/default.nix +++ b/pkgs/os-specific/linux/hostapd/default.nix @@ -73,7 +73,6 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://hostap.epitest.fi"; - repositories.git = "git://w1.fi/hostap.git"; description = "A user space daemon for access point and authentication servers"; license = licenses.gpl2; maintainers = with maintainers; [ ninjatrappeur hexa ]; diff --git a/pkgs/os-specific/linux/i7z/default.nix b/pkgs/os-specific/linux/i7z/default.nix index 7de8046483d4..9af2aba3d806 100644 --- a/pkgs/os-specific/linux/i7z/default.nix +++ b/pkgs/os-specific/linux/i7z/default.nix @@ -49,7 +49,6 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A better i7 (and now i3, i5) reporting tool for Linux"; homepage = "https://github.com/DimitryAndric/i7z"; - repositories.git = "https://github.com/DimitryAndric/i7z.git"; license = licenses.gpl2; maintainers = with maintainers; [ bluescreen303 ]; # broken on ARM diff --git a/pkgs/os-specific/linux/iwd/default.nix b/pkgs/os-specific/linux/iwd/default.nix index 3f725e3e5b26..72ecaffe5f50 100644 --- a/pkgs/os-specific/linux/iwd/default.nix +++ b/pkgs/os-specific/linux/iwd/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-GcqmMqrZSgvSrsY8FJbPynNWTzSi5A6kmyq+xJ+2i3Y="; }; - outputs = [ "out" "man" ] + outputs = [ "out" "man" "doc" ] ++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) "test"; nativeBuildInputs = [ @@ -65,9 +65,9 @@ stdenv.mkDerivation rec { doCheck = true; postInstall = '' - mkdir -p $out/share - cp -a doc $out/share/ - cp -a README AUTHORS TODO $out/share/doc/ + mkdir -p $doc/share/doc + cp -a doc $doc/share/doc/iwd + cp -a README AUTHORS TODO $doc/share/doc/iwd '' + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' mkdir -p $test/bin cp -a test/* $test/bin/ diff --git a/pkgs/os-specific/linux/jool/default.nix b/pkgs/os-specific/linux/jool/default.nix index 2fd10778e2cf..9246ca679a65 100644 --- a/pkgs/os-specific/linux/jool/default.nix +++ b/pkgs/os-specific/linux/jool/default.nix @@ -16,13 +16,12 @@ stdenv.mkDerivation { sed -e 's@/lib/modules/\$(.*)@${kernel.dev}/lib/modules/${kernel.modDirVersion}@' -i src/mod/*/Makefile ''; - buildPhase = '' - make -C src/mod - ''; + makeFlags = kernel.makeFlags ++ [ + "-C src/mod" + "INSTALL_MOD_PATH=${placeholder "out"}" + ]; - installPhase = '' - make -C src/mod modules_install INSTALL_MOD_PATH=$out - ''; + installTargets = "modules_install"; meta = with lib; { homepage = "https://www.jool.mx/"; diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 671fdef2f5d1..153b41194b85 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -60,16 +60,16 @@ let }; power-management = { - PM_ADVANCED_DEBUG = yes; - X86_INTEL_LPSS = yes; - X86_INTEL_PSTATE = yes; - INTEL_IDLE = yes; CPU_FREQ_DEFAULT_GOV_PERFORMANCE = yes; CPU_FREQ_GOV_SCHEDUTIL = yes; + PM_ADVANCED_DEBUG = yes; PM_WAKELOCKS = yes; - # Power-capping framework and support for INTEL RAPL POWERCAP = yes; + } // optionalAttrs (stdenv.hostPlatform.isx86) { + INTEL_IDLE = yes; INTEL_RAPL = whenAtLeast "5.3" module; + X86_INTEL_LPSS = yes; + X86_INTEL_PSTATE = yes; }; external-firmware = { @@ -218,6 +218,11 @@ let # Kernel TLS TLS = whenAtLeast "4.13" module; TLS_DEVICE = whenAtLeast "4.18" yes; + + # infiniband + INFINIBAND = module; + INFINIBAND_IPOIB = module; + INFINIBAND_IPOIB_CM = yes; }; wireless = { @@ -264,8 +269,6 @@ let DRM_GMA600 = whenOlder "5.13" yes; DRM_GMA3600 = whenOlder "5.12" yes; DRM_VMWGFX_FBCON = yes; - # necessary for amdgpu polaris support - DRM_AMD_POWERPLAY = whenBetween "4.5" "4.9" yes; # (experimental) amdgpu support for verde and newer chipsets DRM_AMDGPU_SI = yes; # (stable) amdgpu support for bonaire and newer chipsets @@ -378,7 +381,7 @@ let EXT4_FS_POSIX_ACL = yes; EXT4_FS_SECURITY = yes; - EXT4_ENCRYPTION = { optional = true; tristate = if (versionOlder version "4.8") then "m" else "y"; }; + EXT4_ENCRYPTION = option yes; REISERFS_FS_XATTR = option yes; REISERFS_FS_POSIX_ACL = option yes; @@ -456,7 +459,7 @@ let # https://googleprojectzero.blogspot.com/2019/11/bad-binder-android-in-wild-exploit.html DEBUG_LIST = yes; # Detect writes to read-only module pages - DEBUG_SET_MODULE_RONX = { optional = true; tristate = whenOlder "4.11" "y"; }; + DEBUG_SET_MODULE_RONX = whenOlder "4.11" (option yes); RANDOMIZE_BASE = option yes; STRICT_DEVMEM = mkDefault yes; # Filter access to /dev/mem IO_STRICT_DEVMEM = mkDefault yes; @@ -474,6 +477,7 @@ let DEFAULT_SECURITY_APPARMOR = yes; RANDOM_TRUST_CPU = whenAtLeast "4.19" yes; # allow RDRAND to seed the RNG + RANDOM_TRUST_BOOTLOADER = whenAtLeast "5.4" yes; # allow the bootloader to seed the RNG MODULE_SIG = no; # r13y, generates a random key during build and bakes it in # Depends on MODULE_SIG and only really helps when you sign your modules @@ -542,7 +546,7 @@ let UPROBE_EVENT = { optional = true; tristate = whenOlder "4.11" "y";}; UPROBE_EVENTS = { optional = true; tristate = whenAtLeast "4.11" "y";}; BPF_SYSCALL = yes; - BPF_UNPRIV_DEFAULT_OFF = whenBetween "5.10" "5.15" yes; + BPF_UNPRIV_DEFAULT_OFF = whenBetween "5.10" "5.16" yes; BPF_EVENTS = yes; FUNCTION_PROFILER = yes; RING_BUFFER_BENCHMARK = no; @@ -555,8 +559,8 @@ let PARAVIRT_SPINLOCKS = option yes; KVM_ASYNC_PF = yes; - KVM_COMPAT = { optional = true; tristate = whenBetween "4.0" "4.12" "y"; }; - KVM_DEVICE_ASSIGNMENT = { optional = true; tristate = whenBetween "3.10" "4.12" "y"; }; + KVM_COMPAT = whenOlder "4.12" (option yes); + KVM_DEVICE_ASSIGNMENT = whenOlder "4.12" (option yes); KVM_GENERIC_DIRTYLOG_READ_PROTECT = yes; KVM_GUEST = yes; KVM_MMIO = yes; @@ -719,7 +723,12 @@ let HID_ACRUX_FF = yes; DRAGONRISE_FF = yes; + GREENASIA_FF = yes; HOLTEK_FF = yes; + JOYSTICK_PSXPAD_SPI_FF = whenAtLeast "4.14" yes; + LOGIG940_FF = yes; + NINTENDO_FF = whenAtLeast "5.16" yes; + PLAYSTATION_FF = whenAtLeast "5.12" yes; SONY_FF = yes; SMARTJOYPLUS_FF = yes; THRUSTMASTER_FF = yes; @@ -759,7 +768,6 @@ let AIC79XX_DEBUG_ENABLE = no; AIC7XXX_DEBUG_ENABLE = no; AIC94XX_DEBUG = no; - B43_PCMCIA = { optional=true; tristate = whenOlder "4.4" "y";}; BLK_DEV_INTEGRITY = yes; @@ -780,7 +788,9 @@ let BT_RFCOMM_TTY = option yes; # RFCOMM TTY support BT_QCA = module; # enables QCA6390 bluetooth - CLEANCACHE = option yes; + # Removed on 5.17 as it was unused + # upstream: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0a4ee518185e902758191d968600399f3bc2be31 + CLEANCACHE = whenOlder "5.17" (option yes); CRASH_DUMP = option no; DVB_DYNAMIC_MINORS = option yes; # we use udev diff --git a/pkgs/os-specific/linux/kernel/linux-4.14.nix b/pkgs/os-specific/linux/kernel/linux-4.14.nix index 85b5532db881..df563eeec5d0 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.14.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.14.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "4.14.269"; + version = "4.14.273"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "1lhqq3va468k8w5f4hhsq1rgjcfrgi5l8lnrikfy9jisbi05z9h3"; + sha256 = "0bdwmj6hpy5gb9y50hchgjcjp4z5y7vyk8d8y1ncyrvi18r1pz8v"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-4.19.nix b/pkgs/os-specific/linux/kernel/linux-4.19.nix index 0d3aabde3134..23b14c4435bd 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.19.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.19.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "4.19.232"; + version = "4.19.236"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "0b520cwwqr5b1skc3gbq35hfjqpidxcl3gq7x5bdqqqdg0afiksg"; + sha256 = "1h1ipqpcpi5ga1dg78y9gjmd2a7gkc52i0l83xbr13gyranzcbh0"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-4.9.nix b/pkgs/os-specific/linux/kernel/linux-4.9.nix index 920128b90454..e2f94c8151f0 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.9.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.9.nix @@ -1,12 +1,12 @@ { buildPackages, fetchurl, perl, buildLinux, nixosTests, stdenv, ... } @ args: buildLinux (args // rec { - version = "4.9.304"; + version = "4.9.308"; extraMeta.branch = "4.9"; extraMeta.broken = stdenv.isAarch64; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "099bkypbkb8an8jsl49f83kg6ic1yw9ssfc1qksaji1jparlnpi9"; + sha256 = "11rf3zr31ap6rzy3s489c1dqzkfn5cfkm579y4dnssdyzmyams3v"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-5.10.nix b/pkgs/os-specific/linux/kernel/linux-5.10.nix index f5fb4144814a..d1e35748c7f9 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.10.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.10.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "5.10.103"; + version = "5.10.108"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "02jq126r8dgqrhgdg8dym2v8xgp9jkjm8kf9zgj440s3wrasvf2g"; + sha256 = "1n216rdlmb0x3az4hl224m8c8sddlqwzmqnds4s8z2wiw3bc4v5z"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-5.15.nix b/pkgs/os-specific/linux/kernel/linux-5.15.nix index 472b1f58d38e..cf9ead67efb3 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.15.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.15.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "5.15.26"; + version = "5.15.31"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -15,6 +15,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "0fmydc5v51iacd5ys7p1m1k2318p47prj8xv02rcngv1y8s224jq"; + sha256 = "123b4i5li70spf1y8642y8jwkjjcgcg23x8bj4kxkgnm8x5kh8gn"; }; } // (args.argsOverride or { })) diff --git a/pkgs/os-specific/linux/kernel/linux-5.16.nix b/pkgs/os-specific/linux/kernel/linux-5.16.nix index e7c755d68245..03947d5b1f84 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.16.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.16.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "5.16.12"; + version = "5.16.17"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "1wnpn5w0rfniy60m2a25wjm3flvpzvs2z1s4ga01b9qhbbqisnmv"; + sha256 = "1z7i6z36rs777xiff5x3qjdc02x91n9ibf7rqr003ws7bf84vvnf"; }; } // (args.argsOverride or { })) diff --git a/pkgs/os-specific/linux/kernel/linux-5.17.nix b/pkgs/os-specific/linux/kernel/linux-5.17.nix new file mode 100644 index 000000000000..f05ab1486aba --- /dev/null +++ b/pkgs/os-specific/linux/kernel/linux-5.17.nix @@ -0,0 +1,18 @@ +{ lib, buildPackages, fetchurl, perl, buildLinux, nixosTests, modDirVersionArg ? null, ... } @ args: + +with lib; + +buildLinux (args // rec { + version = "5.17"; + + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; + + # branchVersion needs to be x.y + extraMeta.branch = versions.majorMinor version; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; + sha256 = "sha256-VV/vYd3bWRqD1i3QTiUnkvmvS6nvFGg/ZIQORvogsbE="; + }; +} // (args.argsOverride or { })) diff --git a/pkgs/os-specific/linux/kernel/linux-5.4.nix b/pkgs/os-specific/linux/kernel/linux-5.4.nix index b99c51e8e025..a58d0aa8daed 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.4.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "5.4.182"; + version = "5.4.187"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "03gly4ivsdahixmshi021al48ycsalx30vsxr3iyj47hchgj1wdj"; + sha256 = "1f57x6dqipj0kdcgii8qydbdsaq0w484g2wwgw1pi1dgyarkv7hq"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-libre.nix b/pkgs/os-specific/linux/kernel/linux-libre.nix index 165779808091..16bbbf614aa9 100644 --- a/pkgs/os-specific/linux/kernel/linux-libre.nix +++ b/pkgs/os-specific/linux/kernel/linux-libre.nix @@ -1,8 +1,8 @@ { stdenv, lib, fetchsvn, linux , scripts ? fetchsvn { url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/"; - rev = "18613"; - sha256 = "1qgvhrh4nnn56aykaxqmlnzy8s111b5vn277n7qm4ldyr312g4hs"; + rev = "18664"; + sha256 = "0yvgnqf355wr7wmfd0r8zydbr7icic06cp5hjp060vv0m9bf87xi"; } , ... }: diff --git a/pkgs/os-specific/linux/kernel/linux-rt-5.10.nix b/pkgs/os-specific/linux/kernel/linux-rt-5.10.nix index 70be0e58ebce..cf0744bce681 100644 --- a/pkgs/os-specific/linux/kernel/linux-rt-5.10.nix +++ b/pkgs/os-specific/linux/kernel/linux-rt-5.10.nix @@ -6,7 +6,7 @@ , ... } @ args: let - version = "5.10.100-rt62"; # updated by ./update-rt.sh + version = "5.10.106-rt64"; # updated by ./update-rt.sh branch = lib.versions.majorMinor version; kversion = builtins.elemAt (lib.splitString "-" version) 0; in buildLinux (args // { @@ -18,14 +18,14 @@ in buildLinux (args // { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${kversion}.tar.xz"; - sha256 = "16892wnfkdpqy3v4xmdzlqn5zlfrgz9wqh6vadnx58xnr6pnasfm"; + sha256 = "0yjrlghcxw3lhd6nc2m4zy4gk536w3a3w6mxdsml690fqz4531n6"; }; kernelPatches = let rt-patch = { name = "rt"; patch = fetchurl { url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz"; - sha256 = "1wimp4ckaqp5cfvkf50gv3s5biyr0sjifz4faw23m07ciydm15k0"; + sha256 = "0z5gyi1vyjyd05vyccmk9yfgvm5v1lc8vbfywahx495xzpp9i8xb"; }; }; in [ rt-patch ] ++ kernelPatches; diff --git a/pkgs/os-specific/linux/kernel/linux-rt-5.4.nix b/pkgs/os-specific/linux/kernel/linux-rt-5.4.nix index bb789797a532..747563e3c01f 100644 --- a/pkgs/os-specific/linux/kernel/linux-rt-5.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-rt-5.4.nix @@ -6,7 +6,7 @@ , ... } @ args: let - version = "5.4.177-rt69"; # updated by ./update-rt.sh + version = "5.4.182-rt71"; # updated by ./update-rt.sh branch = lib.versions.majorMinor version; kversion = builtins.elemAt (lib.splitString "-" version) 0; in buildLinux (args // { @@ -14,14 +14,14 @@ in buildLinux (args // { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${kversion}.tar.xz"; - sha256 = "0wvb5is8rqvfxia1i8lw4yd3fm2bhb6wdl0bdjq90dx7y46wpxqq"; + sha256 = "03gly4ivsdahixmshi021al48ycsalx30vsxr3iyj47hchgj1wdj"; }; kernelPatches = let rt-patch = { name = "rt"; patch = fetchurl { url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz"; - sha256 = "16m1swkg54cgcgqwl6vifbpfvdf7waigbwi9brafwplb965zq5a2"; + sha256 = "1lxj63v37bhdgynr8ffyd5g8vp5a79dnzi6fng7jsjapfriywzqh"; }; }; in [ rt-patch ] ++ kernelPatches; diff --git a/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix b/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix index 52fc24e101e3..e86f6fced569 100644 --- a/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix +++ b/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix @@ -1,9 +1,9 @@ { lib , fetchpatch , kernel -, date ? "2022-01-12" -, commit ? "0e6eb60f8be14b02e0a76cb330f4b22c80ec82e9" -, diffHash ? "091w4r7h93s5rv8hk65aix7l0rr4bd504mv998j7x360bqlb7vpi" +, date ? "2022-03-21" +, commit ? "c38b7167aa5f3b1b91dcc93ade57f30e95064590" +, diffHash ? "04lgwnng7p2rlz9sxn74n22750kh524xwfws3agqs12pcrvfsm0j" , kernelPatches # must always be defined in bcachefs' all-packages.nix entry because it's also a top-level attribute supplied by callPackage , argsOverride ? {} , ... @@ -16,7 +16,7 @@ extraMeta = { branch = "master"; - maintainers = with lib.maintainers; [ davidak chiiruno ]; + maintainers = with lib.maintainers; [ davidak Madouura ]; }; } // argsOverride; diff --git a/pkgs/os-specific/linux/kernel/linux-xanmod.nix b/pkgs/os-specific/linux/kernel/linux-xanmod.nix index 636803f29097..b170ec044b05 100644 --- a/pkgs/os-specific/linux/kernel/linux-xanmod.nix +++ b/pkgs/os-specific/linux/kernel/linux-xanmod.nix @@ -1,7 +1,7 @@ { lib, stdenv, buildLinux, fetchFromGitHub, ... } @ args: let - version = "5.15.24"; + version = "5.15.27"; release = "1"; suffix = "xanmod${release}-tt"; in @@ -13,7 +13,7 @@ buildLinux (args // rec { owner = "xanmod"; repo = "linux"; rev = modDirVersion; - sha256 = "sha256-O3OadPMBl74IK92w7IPGfiePeo/Ox+bIVr4XmOmPYTg="; + sha256 = "sha256-ycUvTXDKnffxs8FKZJurX2bDr85gMQlSIFD0nST2Q98="; }; structuredExtraConfig = with lib.kernel; { diff --git a/pkgs/os-specific/linux/kernel/linux-zen.nix b/pkgs/os-specific/linux/kernel/linux-zen.nix index d990d6d4ed1e..0e6cc394a549 100644 --- a/pkgs/os-specific/linux/kernel/linux-zen.nix +++ b/pkgs/os-specific/linux/kernel/linux-zen.nix @@ -2,13 +2,14 @@ let # having the full version string here makes it easier to update - modDirVersion = "5.16.11-zen1"; + modDirVersion = "5.17.0-zen1"; parts = lib.splitString "-" modDirVersion; version = lib.elemAt parts 0; suffix = lib.elemAt parts 1; numbers = lib.splitString "." version; branch = "${lib.elemAt numbers 0}.${lib.elemAt numbers 1}"; + rev = if ((lib.elemAt numbers 2) == "0") then "v${branch}-${suffix}" else "v${modDirVersion}"; in buildLinux (args // { @@ -18,8 +19,8 @@ buildLinux (args // { src = fetchFromGitHub { owner = "zen-kernel"; repo = "zen-kernel"; - rev = "v${modDirVersion}"; - sha256 = "sha256-aCmHtWTOlFo9r6g0pcOXMzksAH3spcOqElE9hynFbFo="; + inherit rev; + sha256 = "sha256-8DCcO2oPnwXjjm3PW7vNZKbB3S7XsEB/svAMhbPRJIo="; }; structuredExtraConfig = with lib.kernel; { diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 4f12337c893f..220f09ed8b50 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -56,7 +56,7 @@ let hasAttr getAttr optional optionals optionalString optionalAttrs maintainers platforms; # Dependencies that are required to build kernel modules - moduleBuildDependencies = optional (lib.versionAtLeast version "4.14") libelf; + moduleBuildDependencies = [ perl ] ++ optional (lib.versionAtLeast version "4.14") libelf; installkernel = writeTextFile { name = "installkernel"; executable=true; text = '' @@ -301,7 +301,6 @@ let + ")"); license = lib.licenses.gpl2Only; homepage = "https://www.kernel.org/"; - repositories.git = "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git"; maintainers = lib.teams.linux-kernel.members ++ [ maintainers.thoughtpolice ]; diff --git a/pkgs/os-specific/linux/ldm/default.nix b/pkgs/os-specific/linux/ldm/default.nix index 072b53b02ec2..f8a519de847e 100644 --- a/pkgs/os-specific/linux/ldm/default.nix +++ b/pkgs/os-specific/linux/ldm/default.nix @@ -4,7 +4,6 @@ assert mountPath != ""; let version = "0.5"; - git = "https://github.com/LemonBoy/ldm.git"; in stdenv.mkDerivation rec { pname = "ldm"; @@ -13,7 +12,7 @@ stdenv.mkDerivation rec { # There is a stable release, but we'll use the lvm branch, which # contains important fixes for LVM setups. src = fetchgit { - url = meta.repositories.git; + url = "https://github.com/LemonBoy/ldm"; rev = "refs/tags/v${version}"; sha256 = "0lxfypnbamfx6p9ar5k9wra20gvwn665l4pp2j4vsx4yi5q7rw2n"; }; @@ -36,8 +35,6 @@ stdenv.mkDerivation rec { meta = { description = "A lightweight device mounter, with libudev as only dependency"; license = lib.licenses.mit; - platforms = lib.platforms.linux; - repositories.git = git; }; } diff --git a/pkgs/os-specific/linux/libpsm2/default.nix b/pkgs/os-specific/linux/libpsm2/default.nix index aeb261aaaca5..070a18f6984a 100644 --- a/pkgs/os-specific/linux/libpsm2/default.nix +++ b/pkgs/os-specific/linux/libpsm2/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "libpsm2"; - version = "11.2.203"; + version = "11.2.206"; preConfigure= '' export UDEVDIR=$out/etc/udev @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { owner = "intel"; repo = "opa-psm2"; rev = "PSM2_${version}"; - sha256 = "sha256-W5Mg5ATUARMFAy1VVpMKPar0VpbKfrkxa6bDhqVYpoc="; + sha256 = "sha256-HsM2OaoX+SdbIednX1MWw1M4kkkPwUs5Dm32q2H7Mg4="; }; postInstall = '' diff --git a/pkgs/os-specific/linux/lightum/default.nix b/pkgs/os-specific/linux/lightum/default.nix index 8da12d78bc93..95b766aec05b 100644 --- a/pkgs/os-specific/linux/lightum/default.nix +++ b/pkgs/os-specific/linux/lightum/default.nix @@ -1,12 +1,14 @@ -{ lib, stdenv, fetchgit, libX11, libXScrnSaver, libXext, glib, dbus, pkg-config, systemd }: +{ lib, stdenv, fetchFromGitHub, libX11, libXScrnSaver, libXext, glib, dbus, pkg-config, systemd }: stdenv.mkDerivation { pname = "lightum"; version = "unstable-2014-06-07"; - src = fetchgit { - url = "https://github.com/poliva/lightum"; + + src = fetchFromGitHub { + owner = "poliva"; + repo = "lightum"; rev = "123e6babe0669b23d4c1dfa5511088608ff2baa8"; - sha256 = "01x24rcrkgksyvqpgkr9zafg3jgs8nqng8yf0hx0kbmcimar8dbp"; + sha256 = "sha256-dzWUVY2srgk6BM6jZ7FF+snxnPopz3fx9nq+mVkmogc="; }; buildInputs = [ diff --git a/pkgs/os-specific/linux/lttng-modules/default.nix b/pkgs/os-specific/linux/lttng-modules/default.nix index 8753f34087cf..706ee95fb70a 100644 --- a/pkgs/os-specific/linux/lttng-modules/default.nix +++ b/pkgs/os-specific/linux/lttng-modules/default.nix @@ -2,23 +2,23 @@ stdenv.mkDerivation rec { pname = "lttng-modules-${kernel.version}"; - version = "2.13.1"; + version = "2.13.2"; src = fetchurl { url = "https://lttng.org/files/lttng-modules/lttng-modules-${version}.tar.bz2"; - sha256 = "0hzksx2fw008jdsgfzpws9g7imy6ryw09ai5y0knvrmvr68nvj57"; + sha256 = "sha256-39VH2QQcjFRa5be/7z8O8tnyUg1qtEGIyeqN5W1dKYo="; }; - buildInputs = kernel.moduleBuildDependencies; + nativeBuildInputs = kernel.moduleBuildDependencies; hardeningDisable = [ "pic" ]; NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; - preConfigure = '' - export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" - export INSTALL_MOD_PATH="$out" - ''; + makeFlags = kernel.makeFlags ++ [ + "KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "INSTALL_MOD_PATH=${placeholder "out"}" + ]; installTargets = [ "modules_install" ]; diff --git a/pkgs/os-specific/linux/lvm2/2_03.nix b/pkgs/os-specific/linux/lvm2/2_03.nix index 555ff6b0dc14..73f1e9fbdeec 100644 --- a/pkgs/os-specific/linux/lvm2/2_03.nix +++ b/pkgs/os-specific/linux/lvm2/2_03.nix @@ -1,4 +1,4 @@ import ./common.nix { - version = "2.03.14"; - sha256 = "0p5077h3z7mrr0b49ikmhlhrs4v4qb530raypk3y72ja125bqqsa"; + version = "2.03.15"; + sha256 = "17n9xl01by7dcbjwjnr6b4rrkp2frz8hwnjl59svsyp13sjq6llk"; } diff --git a/pkgs/os-specific/linux/lvm2/common.nix b/pkgs/os-specific/linux/lvm2/common.nix index 0749292531bb..0f2e6efe3a26 100644 --- a/pkgs/os-specific/linux/lvm2/common.nix +++ b/pkgs/os-specific/linux/lvm2/common.nix @@ -63,6 +63,7 @@ stdenv.mkDerivation rec { preConfigure = '' sed -i /DEFAULT_SYS_DIR/d Makefile.in sed -i /DEFAULT_PROFILE_DIR/d conf/Makefile.in + '' + lib.optionalString (lib.versionOlder version "2.03.15") '' substituteInPlace scripts/lvm2_activation_generator_systemd_red_hat.c \ --replace /usr/bin/udevadm /run/current-system/systemd/bin/udevadm # https://github.com/lvmteam/lvm2/issues/36 @@ -82,7 +83,7 @@ stdenv.mkDerivation rec { sed -i 's|^#define LVM_CONFIGURE_LINE.*$|#define LVM_CONFIGURE_LINE "<removed>"|g' ./include/configure.h ''; - patches = [ + patches = lib.optionals (lib.versionOlder version "2.03.15") [ # Musl fixes from Alpine. ./fix-stdio-usage.patch (fetchpatch { diff --git a/pkgs/os-specific/linux/mba6x_bl/default.nix b/pkgs/os-specific/linux/mba6x_bl/default.nix index fe9c11ace1f6..04a89ad038dd 100644 --- a/pkgs/os-specific/linux/mba6x_bl/default.nix +++ b/pkgs/os-specific/linux/mba6x_bl/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation { nativeBuildInputs = kernel.moduleBuildDependencies; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "INSTALL_MOD_PATH=$(out)" ]; diff --git a/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix b/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix index 070b4a6207e1..0b4fec4dfb4e 100644 --- a/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix +++ b/pkgs/os-specific/linux/mbp-modules/mbp2018-bridge-drv/default.nix @@ -11,14 +11,17 @@ stdenv.mkDerivation rec { sha256 = "sha256-o6yGiR+Y5SnX1johdi7fQWP5ts7HdDMqeju75UOhgik="; }; + nativeBuildInputs = kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags; + buildPhase = '' make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \ - -j$NIX_BUILD_CORES M=$(pwd) modules + -j$NIX_BUILD_CORES M=$(pwd) modules $makeFlags ''; installPhase = '' make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \ - INSTALL_MOD_PATH=$out M=$(pwd) modules_install + INSTALL_MOD_PATH=$out M=$(pwd) modules_install $makeFlags ''; meta = with lib; { diff --git a/pkgs/os-specific/linux/netatop/default.nix b/pkgs/os-specific/linux/netatop/default.nix index 28f989929a4c..dec1399d1695 100644 --- a/pkgs/os-specific/linux/netatop/default.nix +++ b/pkgs/os-specific/linux/netatop/default.nix @@ -12,6 +12,7 @@ stdenv.mkDerivation { sha256 = "0qjw8glfdmngfvbn1w63q128vxdz2jlabw13y140ga9i5ibl6vvk"; }; + nativeBuildInputs = kernel.moduleBuildDependencies; buildInputs = [ kmod zlib ]; hardeningDisable = [ "pic" ]; @@ -36,6 +37,8 @@ stdenv.mkDerivation { kmod=${kmod} substituteAllInPlace netatop.service ''; + makeFlags = kernel.makeFlags; + preInstall = '' mkdir -p $out/lib/systemd/system $out/bin $out/sbin $out/share/man/man{4,8} mkdir -p $out/lib/modules/${kernel.modDirVersion}/extra diff --git a/pkgs/os-specific/linux/nix-ld/default.nix b/pkgs/os-specific/linux/nix-ld/default.nix new file mode 100644 index 000000000000..dcab99cabfe4 --- /dev/null +++ b/pkgs/os-specific/linux/nix-ld/default.nix @@ -0,0 +1,49 @@ +{ stdenv, meson, ninja, lib, nixosTests, fetchFromGitHub }: +let + self = stdenv.mkDerivation { + name = "nix-ld"; + src = fetchFromGitHub { + owner = "Mic92"; + repo = "nix-ld"; + rev = "1.0.0"; + sha256 = "sha256-QYPg8wPpq7q5Xd1jW17Lh36iKFSsVkN/gWYoQRv2XoU="; + }; + + doCheck = true; + + nativeBuildInputs = [ meson ninja ]; + + mesonFlags = [ + "-Dnix-system=${stdenv.system}" + ]; + + hardeningDisable = [ + "stackprotector" + ]; + + postInstall = '' + mkdir -p $out/nix-support + basename $(< ${stdenv.cc}/nix-support/dynamic-linker) > $out/nix-support/ld-name + ''; + + passthru.tests.nix-ld = nixosTests.nix-ld; + passthru.ldPath = let + libDir = if stdenv.system == "x86_64-linux" || + stdenv.system == "mips64-linux" || + stdenv.system == "powerpc64le-linux" + then + "/lib64" + else + "/lib"; + ldName = lib.fileContents "${self}/nix-support/ld-name"; + in "${libDir}/${ldName}"; + + meta = with lib; { + description = "Run unpatched dynamic binaries on NixOS"; + homepage = "https://github.com/Mic92/nix-ld"; + license = licenses.mit; + maintainers = with maintainers; [ mic92 ]; + platforms = platforms.linux; + }; + }; +in self diff --git a/pkgs/os-specific/linux/nixos-rebuild/default.nix b/pkgs/os-specific/linux/nixos-rebuild/default.nix index 08bba5a428d1..34611d3f4009 100644 --- a/pkgs/os-specific/linux/nixos-rebuild/default.nix +++ b/pkgs/os-specific/linux/nixos-rebuild/default.nix @@ -5,6 +5,7 @@ , gnugrep , nix , lib +, nixosTests }: let fallback = import ./../../../../nixos/modules/installer/tools/nix-fallback-paths.nix; @@ -19,4 +20,17 @@ substituteAll { nix_i686_linux = fallback.i686-linux; nix_aarch64_linux = fallback.aarch64-linux; path = lib.makeBinPath [ coreutils gnused gnugrep ]; + + # run some a simple installer tests to make sure nixos-rebuild still works for them + passthru.tests = { + simple-installer-test = nixosTests.installer.simple; + }; + + meta = { + description = "Rebuild your NixOS configuration and switch to it, on local hosts and remote."; + homepage = "https://github.com/NixOS/nixpkgs/tree/master/pkgs/os-specific/linux/nixos-rebuild"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.Profpatsch ]; + mainProgram = "nixos-rebuild"; + }; } diff --git a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh index 5f950eb8b76b..795bedb99d4d 100755 --- a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh +++ b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh @@ -31,9 +31,16 @@ profile=/nix/var/nix/profiles/system buildHost=localhost targetHost= remoteSudo= +verboseScript= +noFlake= # comma separated list of vars to preserve when using sudo preservedSudoVars=NIXOS_INSTALL_BOOTLOADER +# log the given argument to stderr +log() { + echo "$@" >&2 +} + while [ "$#" -gt 0 ]; do i="$1"; shift 1 case "$i" in @@ -45,7 +52,7 @@ while [ "$#" -gt 0 ]; do action="$i" ;; --install-grub) - echo "$0: --install-grub deprecated, use --install-bootloader instead" >&2 + log "$0: --install-grub deprecated, use --install-bootloader instead" export NIXOS_INSTALL_BOOTLOADER=1 ;; --install-bootloader) @@ -64,14 +71,18 @@ while [ "$#" -gt 0 ]; do upgrade=1 upgrade_all=1 ;; - -s|--use-substitutes) + --use-substitutes|-s) copyClosureFlags+=("$i") ;; - --max-jobs|-j|--cores|-I|--builders) + -I|--max-jobs|-j|--cores|--builders) j="$1"; shift 1 extraBuildFlags+=("$i" "$j") ;; - --show-trace|--keep-failed|-K|--keep-going|-k|--verbose|-v|-vv|-vvv|-vvvv|-vvvvv|--fallback|--repair|--no-build-output|-Q|-j*|-L|--print-build-logs|--refresh|--no-net|--offline|--impure) + -j*|--quiet|--print-build-logs|-L|--no-build-output|-Q| --show-trace|--keep-going|-k|--keep-failed|-K|--fallback|--refresh|--repair|--impure|--offline|--no-net) + extraBuildFlags+=("$i") + ;; + --verbose|-v|-vv|-vvv|-vvvv|-vvvvv) + verboseScript="true" extraBuildFlags+=("$i") ;; --option) @@ -85,7 +96,7 @@ while [ "$#" -gt 0 ]; do ;; --profile-name|-p) if [ -z "$1" ]; then - echo "$0: ‘--profile-name’ requires an argument" + log "$0: ‘--profile-name’ requires an argument" exit 1 fi if [ "$1" != system ]; then @@ -110,6 +121,9 @@ while [ "$#" -gt 0 ]; do flakeFlags=(--extra-experimental-features 'nix-command flakes') shift 1 ;; + --no-flake) + noFlake=1 + ;; --recreate-lock-file|--no-update-lock-file|--no-write-lock-file|--no-registries|--commit-lock-file) lockFlags+=("$i") ;; @@ -123,7 +137,7 @@ while [ "$#" -gt 0 ]; do lockFlags+=("$i" "$j" "$k") ;; *) - echo "$0: unknown option \`$i'" + log "$0: unknown option \`$i'" exit 1 ;; esac @@ -143,30 +157,45 @@ if [ "$buildHost" = localhost ]; then buildHost= fi +# log the given argument to stderr if verbose mode is on +logVerbose() { + if [ -n "$verboseScript" ]; then + echo "$@" >&2 + fi +} + +# Run a command, logging it first if verbose mode is on +runCmd() { + logVerbose "$" "$@" + "$@" +} + buildHostCmd() { if [ -z "$buildHost" ]; then - "$@" + runCmd "$@" elif [ -n "$remoteNix" ]; then - ssh $SSHOPTS "$buildHost" "${maybeSudo[@]}" env PATH="$remoteNix":'$PATH' "$@" + runCmd ssh $SSHOPTS "$buildHost" "${maybeSudo[@]}" env PATH="$remoteNix":'$PATH' "$@" else - ssh $SSHOPTS "$buildHost" "${maybeSudo[@]}" "$@" + runCmd ssh $SSHOPTS "$buildHost" "${maybeSudo[@]}" "$@" fi } targetHostCmd() { if [ -z "$targetHost" ]; then - "${maybeSudo[@]}" "$@" + runCmd "${maybeSudo[@]}" "$@" else - ssh $SSHOPTS "$targetHost" "${maybeSudo[@]}" "$@" + runCmd ssh $SSHOPTS "$targetHost" "${maybeSudo[@]}" "$@" fi } copyToTarget() { if ! [ "$targetHost" = "$buildHost" ]; then if [ -z "$targetHost" ]; then - NIX_SSHOPTS=$SSHOPTS nix-copy-closure "${copyClosureFlags[@]}" --from "$buildHost" "$1" + logVerbose "Running nix-copy-closure with these NIX_SSHOPTS: $SSHOPTS" + NIX_SSHOPTS=$SSHOPTS runCmd nix-copy-closure "${copyClosureFlags[@]}" --from "$buildHost" "$1" elif [ -z "$buildHost" ]; then - NIX_SSHOPTS=$SSHOPTS nix-copy-closure "${copyClosureFlags[@]}" --to "$targetHost" "$1" + logVerbose "Running nix-copy-closure with these NIX_SSHOPTS: $SSHOPTS" + NIX_SSHOPTS=$SSHOPTS runCmd nix-copy-closure "${copyClosureFlags[@]}" --to "$targetHost" "$1" else buildHostCmd nix-copy-closure "${copyClosureFlags[@]}" --to "$targetHost" "$1" fi @@ -174,9 +203,12 @@ copyToTarget() { } nixBuild() { + logVerbose "Building in legacy (non-flake) mode." if [ -z "$buildHost" ]; then - nix-build "$@" + logVerbose "No --build-host given, running nix-build locally" + runCmd nix-build "$@" else + logVerbose "buildHost set to \"$buildHost\", running nix-build remotely" local instArgs=() local buildArgs=() local drv= @@ -206,24 +238,26 @@ nixBuild() { esac done - drv="$(nix-instantiate "${instArgs[@]}" "${extraBuildFlags[@]}")" + drv="$(runCmd nix-instantiate "${instArgs[@]}" "${extraBuildFlags[@]}")" if [ -a "$drv" ]; then - NIX_SSHOPTS=$SSHOPTS nix-copy-closure --to "$buildHost" "$drv" + logVerbose "Running nix-copy-closure with these NIX_SSHOPTS: $SSHOPTS" + NIX_SSHOPTS=$SSHOPTS runCmd nix-copy-closure --to "$buildHost" "$drv" buildHostCmd nix-store -r "$drv" "${buildArgs[@]}" else - echo "nix-instantiate failed" + log "nix-instantiate failed" exit 1 fi fi } nixFlakeBuild() { + logVerbose "Building in flake mode." if [[ -z "$buildHost" && -z "$targetHost" && "$action" != switch && "$action" != boot ]] then - nix "${flakeFlags[@]}" build "$@" + runCmd nix "${flakeFlags[@]}" build "$@" readlink -f ./result elif [ -z "$buildHost" ]; then - nix "${flakeFlags[@]}" build "$@" --out-link "${tmpDir}/result" + runCmd nix "${flakeFlags[@]}" build "$@" --out-link "${tmpDir}/result" readlink -f "${tmpDir}/result" else local attr="$1" @@ -255,12 +289,13 @@ nixFlakeBuild() { esac done - drv="$(nix "${flakeFlags[@]}" eval --raw "${attr}.drvPath" "${evalArgs[@]}" "${extraBuildFlags[@]}")" + drv="$(runCmd nix "${flakeFlags[@]}" eval --raw "${attr}.drvPath" "${evalArgs[@]}" "${extraBuildFlags[@]}")" if [ -a "$drv" ]; then - NIX_SSHOPTS=$SSHOPTS nix "${flakeFlags[@]}" copy --derivation --to "ssh://$buildHost" "$drv" + logVerbose "Running nix with these NIX_SSHOPTS: $SSHOPTS" + NIX_SSHOPTS=$SSHOPTS runCmd nix "${flakeFlags[@]}" copy --derivation --to "ssh://$buildHost" "$drv" buildHostCmd nix-store -r "$drv" "${buildArgs[@]}" else - echo "nix eval failed" + log "nix eval failed" exit 1 fi fi @@ -291,11 +326,11 @@ if [[ -n $upgrade && -z $_NIXOS_REBUILD_REEXEC && -z $flake ]]; then channel_name=$(basename "$channelpath") if [[ "$channel_name" == "nixos" ]]; then - nix-channel --update "$channel_name" + runCmd nix-channel --update "$channel_name" elif [ -e "$channelpath/.update-on-nixos-rebuild" ]; then - nix-channel --update "$channel_name" + runCmd nix-channel --update "$channel_name" elif [[ -n $upgrade_all ]] ; then - nix-channel --update "$channel_name" + runCmd nix-channel --update "$channel_name" fi done fi @@ -313,20 +348,10 @@ fi # Use /etc/nixos/flake.nix if it exists. It can be a symlink to the # actual flake. -if [[ -z $flake && -e /etc/nixos/flake.nix ]]; then +if [[ -z $flake && -e /etc/nixos/flake.nix && -z $noFlake ]]; then flake="$(dirname "$(readlink -f /etc/nixos/flake.nix)")" fi -# Re-execute nixos-rebuild from the Nixpkgs tree. -# FIXME: get nixos-rebuild from $flake. -if [[ -z $_NIXOS_REBUILD_REEXEC && -n $canRun && -z $fast && -z $flake ]]; then - if p=$(nix-build --no-out-link --expr 'with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild' "${extraBuildFlags[@]}"); then - export _NIXOS_REBUILD_REEXEC=1 - exec "$p/bin/nixos-rebuild" "${origArgs[@]}" - exit 1 - fi -fi - # For convenience, use the hostname as the default configuration to # build from the flake. if [[ -n $flake ]]; then @@ -345,33 +370,56 @@ if [[ -n $flake ]]; then fi fi + +tmpDir=$(mktemp -t -d nixos-rebuild.XXXXXX) + +cleanup() { + for ctrl in "$tmpDir"/ssh-*; do + ssh -o ControlPath="$ctrl" -O exit dummyhost 2>/dev/null || true + done + rm -rf "$tmpDir" +} +trap cleanup EXIT + + +# Re-execute nixos-rebuild from the Nixpkgs tree. +if [[ -z $_NIXOS_REBUILD_REEXEC && -n $canRun && -z $fast ]]; then + if [[ -z $flake ]]; then + if p=$(runCmd nix-build --no-out-link --expr 'with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild' "${extraBuildFlags[@]}"); then + SHOULD_REEXEC=1 + fi + else + runCmd nix "${flakeFlags[@]}" build --out-link "${tmpDir}/nixos-rebuild" "$flake#$flakeAttr.config.system.build.nixos-rebuild" "${extraBuildFlags[@]}" "${lockFlags[@]}" + if p=$(readlink -e "${tmpDir}/nixos-rebuild"); then + SHOULD_REEXEC=1 + fi + fi + + if [[ -n $SHOULD_REEXEC ]]; then + export _NIXOS_REBUILD_REEXEC=1 + # Manually call cleanup as the EXIT trap is not triggered when using exec + cleanup + runCmd exec "$p/bin/nixos-rebuild" "${origArgs[@]}" + exit 1 + fi +fi + # Find configuration.nix and open editor instead of building. if [ "$action" = edit ]; then if [[ -z $flake ]]; then - NIXOS_CONFIG=${NIXOS_CONFIG:-$(nix-instantiate --find-file nixos-config)} + NIXOS_CONFIG=${NIXOS_CONFIG:-$(runCmd nix-instantiate --find-file nixos-config)} if [[ -d $NIXOS_CONFIG ]]; then NIXOS_CONFIG=$NIXOS_CONFIG/default.nix fi - exec ${EDITOR:-nano} "$NIXOS_CONFIG" + runCmd exec ${EDITOR:-nano} "$NIXOS_CONFIG" else - exec nix "${flakeFlags[@]}" edit "${lockFlags[@]}" -- "$flake#$flakeAttr" + runCmd exec nix "${flakeFlags[@]}" edit "${lockFlags[@]}" -- "$flake#$flakeAttr" fi exit 1 fi - -tmpDir=$(mktemp -t -d nixos-rebuild.XXXXXX) SSHOPTS="$NIX_SSHOPTS -o ControlMaster=auto -o ControlPath=$tmpDir/ssh-%n -o ControlPersist=60" -cleanup() { - for ctrl in "$tmpDir"/ssh-*; do - ssh -o ControlPath="$ctrl" -O exit dummyhost 2>/dev/null || true - done - rm -rf "$tmpDir" -} -trap cleanup EXIT - - # First build Nix, since NixOS may require a newer version than the # current one. if [[ -n "$rollback" || "$action" = dry-build ]]; then @@ -395,32 +443,32 @@ prebuiltNix() { elif [[ "$machine" = aarch64 ]]; then echo @nix_aarch64_linux@ else - echo "$0: unsupported platform" + log "$0: unsupported platform" exit 1 fi } if [[ -n $buildNix && -z $flake ]]; then - echo "building Nix..." >&2 + log "building Nix..." nixDrv= - if ! nixDrv="$(nix-instantiate '<nixpkgs/nixos>' --add-root "$tmpDir/nix.drv" --indirect -A config.nix.package.out "${extraBuildFlags[@]}")"; then - if ! nixDrv="$(nix-instantiate '<nixpkgs>' --add-root "$tmpDir/nix.drv" --indirect -A nix "${extraBuildFlags[@]}")"; then - if ! nixStorePath="$(nix-instantiate --eval '<nixpkgs/nixos/modules/installer/tools/nix-fallback-paths.nix>' -A "$(nixSystem)" | sed -e 's/^"//' -e 's/"$//')"; then + if ! nixDrv="$(runCmd nix-instantiate '<nixpkgs/nixos>' --add-root "$tmpDir/nix.drv" --indirect -A config.nix.package.out "${extraBuildFlags[@]}")"; then + if ! nixDrv="$(runCmd nix-instantiate '<nixpkgs>' --add-root "$tmpDir/nix.drv" --indirect -A nix "${extraBuildFlags[@]}")"; then + if ! nixStorePath="$(runCmd nix-instantiate --eval '<nixpkgs/nixos/modules/installer/tools/nix-fallback-paths.nix>' -A "$(nixSystem)" | sed -e 's/^"//' -e 's/"$//')"; then nixStorePath="$(prebuiltNix "$(uname -m)")" fi - if ! nix-store -r "$nixStorePath" --add-root "${tmpDir}/nix" --indirect \ + if ! runCmd nix-store -r "$nixStorePath" --add-root "${tmpDir}/nix" --indirect \ --option extra-binary-caches https://cache.nixos.org/; then - echo "warning: don't know how to get latest Nix" >&2 + log "warning: don't know how to get latest Nix" fi # Older version of nix-store -r don't support --add-root. [ -e "$tmpDir/nix" ] || ln -sf "$nixStorePath" "$tmpDir/nix" if [ -n "$buildHost" ]; then - remoteNixStorePath="$(prebuiltNix "$(buildHostCmd uname -m)")" + remoteNixStorePath="$(runCmd prebuiltNix "$(buildHostCmd uname -m)")" remoteNix="$remoteNixStorePath/bin" if ! buildHostCmd nix-store -r "$remoteNixStorePath" \ --option extra-binary-caches https://cache.nixos.org/ >/dev/null; then remoteNix= - echo "warning: don't know how to get latest Nix" >&2 + log "warning: don't know how to get latest Nix" fi fi fi @@ -442,8 +490,8 @@ fi # Update the version suffix if we're building from Git (so that # nixos-version shows something useful). if [[ -n $canRun && -z $flake ]]; then - if nixpkgs=$(nix-instantiate --find-file nixpkgs "${extraBuildFlags[@]}"); then - suffix=$($SHELL "$nixpkgs/nixos/modules/installer/tools/get-version-suffix" "${extraBuildFlags[@]}" || true) + if nixpkgs=$(runCmd nix-instantiate --find-file nixpkgs "${extraBuildFlags[@]}"); then + suffix=$(runCmd $SHELL "$nixpkgs/nixos/modules/installer/tools/get-version-suffix" "${extraBuildFlags[@]}" || true) if [ -n "$suffix" ]; then echo -n "$suffix" > "$nixpkgs/.version-suffix" || true fi @@ -460,7 +508,7 @@ fi # or "boot"), or just build it and create a symlink "result" in the # current directory (for "build" and "test"). if [ -z "$rollback" ]; then - echo "building the system configuration..." >&2 + log "building the system configuration..." if [[ "$action" = switch || "$action" = boot ]]; then if [[ -z $flake ]]; then pathToConfig="$(nixBuild '<nixpkgs/nixos>' --no-out-link -A system "${extraBuildFlags[@]}")" @@ -517,7 +565,7 @@ fi # default and/or activate it now. if [[ "$action" = switch || "$action" = boot || "$action" = test || "$action" = dry-activate ]]; then if ! targetHostCmd "$pathToConfig/bin/switch-to-configuration" "$action"; then - echo "warning: error(s) occurred while switching to the new configuration" >&2 + log "warning: error(s) occurred while switching to the new configuration" exit 1 fi fi diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 145265017855..246295eb7340 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -19,10 +19,10 @@ rec { # Policy: use the highest stable version as the default (on our master). stable = if stdenv.hostPlatform.system == "x86_64-linux" then generic { - version = "510.54"; - sha256_64bit = "TCDezK4/40et/Q5piaMG+QJP2t+DGtwejmCFVnUzUWE="; - settingsSha256 = "ZWz5UN6Pa69NlmerKu30G+X8WfGlAwnVerDrO7TRO6w="; - persistencedSha256 = "MgWrBjKXJeRqF+ouT72tTiLPtn+lsS/Cp3oS61AWV8Q="; + version = "510.60.02"; + sha256_64bit = "sha256-qADfwFSQeP2Mbo5ngO+47uh4cuYFXH9fOGpHaM4H4AM="; + settingsSha256 = "sha256-Voa1JZ2qqJ1t+bfwKh/mssEi/hjzLTPwef2XG/gAC+0="; + persistencedSha256 = "sha256-THgK2GpRcttqSN2WxcuJu5My++Q+Y34jG8hm7daxhAQ="; } else legacy_390; diff --git a/pkgs/os-specific/linux/ocf-resource-agents/default.nix b/pkgs/os-specific/linux/ocf-resource-agents/default.nix index 9c9557c7be85..8d7f2b527144 100644 --- a/pkgs/os-specific/linux/ocf-resource-agents/default.nix +++ b/pkgs/os-specific/linux/ocf-resource-agents/default.nix @@ -1,3 +1,5 @@ +# This combines together OCF definitions from other derivations. +# https://github.com/ClusterLabs/resource-agents/blob/master/doc/dev-guides/ra-dev-guide.asc { stdenv , lib , runCommand @@ -8,12 +10,16 @@ , python3 , glib , drbd +, pacemaker }: let drbdForOCF = drbd.override { forOCF = true; }; + pacemakerForOCF = pacemaker.override { + forOCF = true; + }; resource-agentsForOCF = stdenv.mkDerivation rec { pname = "resource-agents"; @@ -53,4 +59,5 @@ runCommand "ocf-resource-agents" {} '' mkdir -p $out/usr/lib/ocf ${lndir}/bin/lndir -silent "${resource-agentsForOCF}/lib/ocf/" $out/usr/lib/ocf ${lndir}/bin/lndir -silent "${drbdForOCF}/usr/lib/ocf/" $out/usr/lib/ocf + ${lndir}/bin/lndir -silent "${pacemakerForOCF}/usr/lib/ocf/" $out/usr/lib/ocf '' diff --git a/pkgs/os-specific/linux/oci-seccomp-bpf-hook/default.nix b/pkgs/os-specific/linux/oci-seccomp-bpf-hook/default.nix index 511dd162785f..1952d31b0247 100644 --- a/pkgs/os-specific/linux/oci-seccomp-bpf-hook/default.nix +++ b/pkgs/os-specific/linux/oci-seccomp-bpf-hook/default.nix @@ -10,12 +10,12 @@ buildGoModule rec { pname = "oci-seccomp-bpf-hook"; - version = "1.2.3"; + version = "1.2.5"; src = fetchFromGitHub { owner = "containers"; repo = "oci-seccomp-bpf-hook"; rev = "v${version}"; - sha256 = "sha256-EKD6tkdQCPlVlb9ScvRwDxYAtbbv9PIqBHH6SvtPDsE="; + sha256 = "sha256-PU7WX5RAV6wWVRsqq6MdEjr00AtlTT4cSacRaxrEF2s="; }; vendorSha256 = null; diff --git a/pkgs/os-specific/linux/openrazer/driver.nix b/pkgs/os-specific/linux/openrazer/driver.nix index 6e387de0719f..2de63580ac33 100644 --- a/pkgs/os-specific/linux/openrazer/driver.nix +++ b/pkgs/os-specific/linux/openrazer/driver.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (common // { nativeBuildInputs = kernel.moduleBuildDependencies; - buildFlags = [ + makeFlags = kernel.makeFlags ++ [ "KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; diff --git a/pkgs/os-specific/linux/pflask/default.nix b/pkgs/os-specific/linux/pflask/default.nix index ba525c1a387a..deb3e06ca49d 100644 --- a/pkgs/os-specific/linux/pflask/default.nix +++ b/pkgs/os-specific/linux/pflask/default.nix @@ -1,18 +1,22 @@ -{ lib, stdenv, fetchFromGitHub, python2, wafHook }: +{ lib, stdenv, fetchFromGitHub, python3, wafHook }: stdenv.mkDerivation rec { pname = "pflask"; - version = "unstable-2015-12-17"; + version = "unstable-2018-01-23"; src = fetchFromGitHub { owner = "ghedo"; - repo = "pflask"; - rev = "599418bb6453eaa0ccab493f9411f13726c1a636"; - hash = "sha256-0RjitZd2JUK7WUEJuw4qhUx3joY5OI0Hh74mTzp7GmY="; + repo = pname; + rev = "9ac31ffe2ed29453218aac89ae992abbd6e7cc69"; + hash = "sha256-bAKPUj/EipZ98kHbZiFZZI3hLVMoQpCrYKMmznpSDhg="; }; - nativeBuildInputs = [ wafHook ]; - buildInputs = [ python2 ]; + nativeBuildInputs = [ python3 wafHook ]; + + postInstall = '' + mkdir -p $out/bin + cp build/pflask $out/bin + ''; meta = { description = "Lightweight process containers for Linux"; diff --git a/pkgs/os-specific/linux/projecteur/default.nix b/pkgs/os-specific/linux/projecteur/default.nix new file mode 100644 index 000000000000..63de7453935c --- /dev/null +++ b/pkgs/os-specific/linux/projecteur/default.nix @@ -0,0 +1,32 @@ +{ lib, mkDerivation, fetchFromGitHub, + cmake, pkg-config, + qtbase, qtgraphicaleffects, wrapQtAppsHook }: +mkDerivation rec { + pname = "projecteur"; + version = "0.9.2"; + + src = fetchFromGitHub { + owner = "jahnf"; + repo = "Projecteur"; + rev = "v${version}"; + fetchSubmodules = false; + sha256 = "sha256-kg6oYtJ4H5A6RNATBg+XvMfCb9FlhEBFjfxamGosMQg="; + }; + + buildInputs = [ qtbase qtgraphicaleffects ]; + nativeBuildInputs = [ wrapQtAppsHook cmake pkg-config ]; + + cmakeFlags = [ + "-DCMAKE_INSTALL_PREFIX:PATH=${placeholder "out"}" + "-DPACKAGE_TARGETS=OFF" + "-DCMAKE_INSTALL_UDEVRULESDIR=${placeholder "out"}/lib/udev/rules.d" + ]; + + meta = with lib; { + description = "Linux/X11 application for the Logitech Spotlight device (and similar devices)."; + homepage = "https://github.com/jahnf/Projecteur"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ benneti ]; + }; +} diff --git a/pkgs/os-specific/linux/r8168/default.nix b/pkgs/os-specific/linux/r8168/default.nix index 91e15db2eeb6..bcf5fb8956ab 100644 --- a/pkgs/os-specific/linux/r8168/default.nix +++ b/pkgs/os-specific/linux/r8168/default.nix @@ -10,7 +10,7 @@ in stdenv.mkDerivation rec { # This is a mirror. The original website[1] doesn't allow non-interactive # downloads, instead emailing you a download link. - # [1] http://www.realtek.com.tw/downloads/downloadsView.aspx?PFid=5&Level=5&Conn=4&DownTypeID=3 + # [1] https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software # I've verified manually (`diff -r`) that the source code for version 8.046.00 # is the same as the one available on the realtek website. src = fetchFromGitHub { @@ -27,11 +27,13 @@ in stdenv.mkDerivation rec { # avoid using the Makefile directly -- it doesn't understand # any kernel but the current. # based on the ArchLinux pkgbuild: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/r8168 + makeFlags = kernel.makeFlags ++ [ + "-C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "M=$(PWD)/src" + "modules" + ]; preBuild = '' - makeFlagsArray+=("-C${kernel.dev}/lib/modules/${kernel.modDirVersion}/build") - makeFlagsArray+=("M=$PWD/src") makeFlagsArray+=("EXTRA_CFLAGS=-DCONFIG_R8168_NAPI -DCONFIG_R8168_VLAN -DCONFIG_ASPM -DENABLE_S5WOL -DENABLE_EEE") - makeFlagsArray+=("modules") ''; enableParallelBuilding = true; @@ -52,5 +54,6 @@ in stdenv.mkDerivation rec { license = licenses.gpl2Plus; platforms = platforms.linux; maintainers = with maintainers; [ timokau ]; + broken = kernel.kernelAtLeast "5.17"; }; } diff --git a/pkgs/os-specific/linux/rtl8189es/default.nix b/pkgs/os-specific/linux/rtl8189es/default.nix index 500359f7e4fd..c1032473db10 100644 --- a/pkgs/os-specific/linux/rtl8189es/default.nix +++ b/pkgs/os-specific/linux/rtl8189es/default.nix @@ -2,17 +2,16 @@ stdenv.mkDerivation rec { name = "rtl8189es-${kernel.version}-${version}"; - version = "2020-10-03"; + version = "2021-10-01"; src = fetchFromGitHub { owner = "jwrdegoede"; repo = "rtl8189ES_linux"; - rev = "03ac413135a355b55b693154c44b70f86a39732e"; - sha256 = "0wiikviwyvy6h55rgdvy7csi1zqniqg26p8x44rd6mhbw0g00h56"; + rev = "be378f47055da1bae42ff6ec1d62f1a5052ef097"; + sha256 = "sha256-+19q1Xux2BjquavY+s0UDzTubEt6BEUZ9XVDVmj36us="; }; - nativeBuildInputs = [ bc nukeReferences ]; - buildInputs = kernel.moduleBuildDependencies; + nativeBuildInputs = [ bc nukeReferences ] ++ kernel.moduleBuildDependencies; hardeningDisable = [ "pic" "format" ]; @@ -23,13 +22,10 @@ stdenv.mkDerivation rec { substituteInPlace ./Makefile --replace '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/" ''; - makeFlags = [ - "ARCH=${stdenv.hostPlatform.linuxArch}" + makeFlags = kernel.makeFlags ++ [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ("CONFIG_PLATFORM_I386_PC=" + (if (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) then "y" else "n")) ("CONFIG_PLATFORM_ARM_RPI=" + (if (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64) then "y" else "n")) - ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ - "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; preInstall = '' @@ -46,5 +42,6 @@ stdenv.mkDerivation rec { license = licenses.gpl2; platforms = platforms.linux; maintainers = with maintainers; [ danielfullmer lheckemann ]; + broken = kernel.kernelAtLeast "5.17"; }; } diff --git a/pkgs/os-specific/linux/rtl8192eu/default.nix b/pkgs/os-specific/linux/rtl8192eu/default.nix index b33330611b88..de4dd52e511c 100644 --- a/pkgs/os-specific/linux/rtl8192eu/default.nix +++ b/pkgs/os-specific/linux/rtl8192eu/default.nix @@ -6,20 +6,20 @@ let modDestDir = "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/wi in stdenv.mkDerivation rec { pname = "rtl8192eu"; - version = "${kernel.version}-4.4.1.20211023"; + version = "${kernel.version}-4.4.1.20220313"; src = fetchFromGitHub { owner = "Mange"; repo = "rtl8192eu-linux-driver"; - rev = "744bbe52976e51895fce2c1d4075f97a98dca2b2"; - sha256 = "1ayb3fljvpljwcgi47h8vj2d2w5imqyjxc7mvmfrvmilzg5d5cj7"; + rev = "e0f967cea1d0037c730246c572f7fef000865ff7"; + sha256 = "sha256-Wgp1MZ/z8AxbZPYsmR6t7Q4nsL0TFEqTEsrkkWPI6gI="; }; hardeningDisable = [ "pic" ]; nativeBuildInputs = kernel.moduleBuildDependencies ++ [ bc ]; - makeFlags = [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; + makeFlags = kernel.makeFlags ++ [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/rtl8814au/default.nix b/pkgs/os-specific/linux/rtl8814au/default.nix index f9ca60b1112b..dce8733c0cca 100644 --- a/pkgs/os-specific/linux/rtl8814au/default.nix +++ b/pkgs/os-specific/linux/rtl8814au/default.nix @@ -2,16 +2,17 @@ stdenv.mkDerivation { pname = "rtl8814au"; - version = "${kernel.version}-unstable-2021-10-25"; + version = "${kernel.version}-unstable-2022-02-21"; src = fetchFromGitHub { owner = "morrownr"; repo = "8814au"; - rev = "d36c0874716b0776ac6c7dcd6110598ef0f6dd53"; - sha256 = "0lk3ldff489ggbqmlfi4zvnp1cvxj1b06m0fhpzai82070klzzmj"; + rev = "a538e3878c4b7b0b012f2d2fe7804390caaebd90"; + sha256 = "sha256-xBGbcy/WonFrNflMlFCD/JQOFKhPrv0J3j2XcXWc6hk="; }; - buildInputs = kernel.moduleBuildDependencies; + nativeBuildInputs = kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags; hardeningDisable = [ "pic" ]; diff --git a/pkgs/os-specific/linux/rtl8821ce/default.nix b/pkgs/os-specific/linux/rtl8821ce/default.nix index 75e12a1b7a46..62743c226889 100644 --- a/pkgs/os-specific/linux/rtl8821ce/default.nix +++ b/pkgs/os-specific/linux/rtl8821ce/default.nix @@ -13,8 +13,8 @@ stdenv.mkDerivation rec { hardeningDisable = [ "pic" ]; - nativeBuildInputs = [ bc ]; - buildInputs = kernel.moduleBuildDependencies; + nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags; prePatch = '' substituteInPlace ./Makefile \ @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { homepage = "https://github.com/tomaspinho/rtl8821ce"; license = licenses.gpl2Only; platforms = platforms.linux; - broken = stdenv.isAarch64; + broken = stdenv.isAarch64 || kernel.kernelAtLeast "5.17"; maintainers = with maintainers; [ hhm ivar ]; }; } diff --git a/pkgs/os-specific/linux/rtl8821cu/default.nix b/pkgs/os-specific/linux/rtl8821cu/default.nix index 9229a3c13069..a3d767d2ee67 100644 --- a/pkgs/os-specific/linux/rtl8821cu/default.nix +++ b/pkgs/os-specific/linux/rtl8821cu/default.nix @@ -2,19 +2,19 @@ stdenv.mkDerivation rec { pname = "rtl8821cu"; - version = "${kernel.version}-unstable-2021-10-21"; + version = "${kernel.version}-unstable-2022-03-08"; src = fetchFromGitHub { owner = "morrownr"; - repo = "8821cu"; - rev = "4e2d84c5e70245f850877f355e8bf293f252f61c"; - sha256 = "1j32psvfgzfs5b1pdff6xk76iz7j8scakji6zm3vgqb2ssbxx1k1"; + repo = "8821cu-20210118"; + rev = "4bdd7c8668562e43564cd5d786055633e591ad4d"; + sha256 = "sha256-dfvDpjsra/nHwIGywOkZICTEP/Ex7ooH4zzkXqAaDkI="; }; hardeningDisable = [ "pic" ]; - nativeBuildInputs = [ bc ]; - buildInputs = kernel.moduleBuildDependencies; + nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags; prePatch = '' substituteInPlace ./Makefile \ diff --git a/pkgs/os-specific/linux/rtl88x2bu/default.nix b/pkgs/os-specific/linux/rtl88x2bu/default.nix index 31d8f50a5288..e092d145abd2 100644 --- a/pkgs/os-specific/linux/rtl88x2bu/default.nix +++ b/pkgs/os-specific/linux/rtl88x2bu/default.nix @@ -13,10 +13,10 @@ stdenv.mkDerivation rec { hardeningDisable = [ "pic" ]; - nativeBuildInputs = [ bc ]; - buildInputs = kernel.moduleBuildDependencies; + nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags; - prePatch = '' + prePatch = '' substituteInPlace ./Makefile \ --replace /lib/modules/ "${kernel.dev}/lib/modules/" \ --replace '$(shell uname -r)' "${kernel.modDirVersion}" \ diff --git a/pkgs/os-specific/linux/rtl88xxau-aircrack/default.nix b/pkgs/os-specific/linux/rtl88xxau-aircrack/default.nix index 1f27c262e673..f975cc2b420b 100644 --- a/pkgs/os-specific/linux/rtl88xxau-aircrack/default.nix +++ b/pkgs/os-specific/linux/rtl88xxau-aircrack/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, kernel }: let - rev = "307d694076b056588c652c2bdaa543a89eb255d9"; + rev = "37e27f9165300c89607144b646545fac576ec510"; in stdenv.mkDerivation rec { pname = "rtl88xxau-aircrack"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { owner = "aircrack-ng"; repo = "rtl8812au"; inherit rev; - sha256 = "sha256-iSJnKWc+LxGHUhb/wbFSMh7w6Oi9v4v5V+R+LI96X7w="; + sha256 = "sha256-TpmpueKAaCe7Nlmv8pMvgMXGVmXVa/1mBwtEoy4JyCY="; }; buildInputs = kernel.moduleBuildDependencies; diff --git a/pkgs/os-specific/linux/rtw88/default.nix b/pkgs/os-specific/linux/rtw88/default.nix index c3f849df1181..529ee621892b 100644 --- a/pkgs/os-specific/linux/rtw88/default.nix +++ b/pkgs/os-specific/linux/rtw88/default.nix @@ -14,7 +14,8 @@ stdenv.mkDerivation { hash = "sha256-PRzWXC1lre8gt1GfVdnaG836f5YK57P9a8tG20yef0w="; }; - makeFlags = [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; + nativeBuildInputs = kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags ++ [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/rtw89/default.nix b/pkgs/os-specific/linux/rtw89/default.nix index 6b0f06c5bdc4..6ff208fa6dd9 100644 --- a/pkgs/os-specific/linux/rtw89/default.nix +++ b/pkgs/os-specific/linux/rtw89/default.nix @@ -14,7 +14,8 @@ stdenv.mkDerivation { sha256 = "0cvawyi1ksw9xkr8pzwipsl7b8hnmrb17w5cblyicwih8fqaw632"; }; - makeFlags = [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; + nativeBuildInputs = kernel.moduleBuildDependencies; + makeFlags = kernel.makeFlags ++ [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/smem/default.nix b/pkgs/os-specific/linux/smem/default.nix index b2636382aec6..6308b83b600a 100644 --- a/pkgs/os-specific/linux/smem/default.nix +++ b/pkgs/os-specific/linux/smem/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, python2 }: +{ lib, stdenv, fetchurl, python3 }: stdenv.mkDerivation rec { pname = "smem"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "19ibv1byxf2b68186ysrgrhy5shkc5mc69abark1h18yigp3j34m"; }; - buildInputs = [ python2 ]; + buildInputs = [ python3 ]; makeFlags = [ "smemcap" ]; diff --git a/pkgs/os-specific/linux/tuigreet/default.nix b/pkgs/os-specific/linux/tuigreet/default.nix index 581b89fb1c64..95de5b8c8d9c 100644 --- a/pkgs/os-specific/linux/tuigreet/default.nix +++ b/pkgs/os-specific/linux/tuigreet/default.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-H5xqk7Yd3M8sFGHlmhAS0fhh3eM4dkvkNQGVxRSXUJs="; meta = with lib; { - description = "Graphical console greter for greetd"; + description = "Graphical console greeter for greetd"; homepage = "https://github.com/apognu/tuigreet"; license = licenses.gpl3Plus; maintainers = with maintainers; [ luc65r ivar ]; diff --git a/pkgs/os-specific/linux/udisks/2-default.nix b/pkgs/os-specific/linux/udisks/2-default.nix index fd321d90cb2a..427e19ac9215 100644 --- a/pkgs/os-specific/linux/udisks/2-default.nix +++ b/pkgs/os-specific/linux/udisks/2-default.nix @@ -25,9 +25,11 @@ stdenv.mkDerivation rec { blkid = "${util-linux}/bin/blkid"; false = "${coreutils}/bin/false"; mdadm = "${mdadm}/bin/mdadm"; + mkswap = "${util-linux}/bin/mkswap"; sed = "${gnused}/bin/sed"; sh = "${bash}/bin/sh"; sleep = "${coreutils}/bin/sleep"; + swapon = "${util-linux}/bin/swapon"; true = "${coreutils}/bin/true"; }) (substituteAll { @@ -77,7 +79,7 @@ stdenv.mkDerivation rec { description = "A daemon, tools and libraries to access and manipulate disks, storage devices and technologies"; homepage = "https://www.freedesktop.org/wiki/Software/udisks/"; license = with licenses; [ lgpl2Plus gpl2Plus ]; # lgpl2Plus for the library, gpl2Plus for the tools & daemon - maintainers = with maintainers; [ johnazoidberg ]; + maintainers = teams.freedesktop.members ++ (with maintainers; [ johnazoidberg ]); platforms = platforms.linux; }; } diff --git a/pkgs/os-specific/linux/udisks/fix-paths.patch b/pkgs/os-specific/linux/udisks/fix-paths.patch index 215df565eccd..30bc08da8cfa 100644 --- a/pkgs/os-specific/linux/udisks/fix-paths.patch +++ b/pkgs/os-specific/linux/udisks/fix-paths.patch @@ -1,17 +1,5 @@ -diff --git a/Makefile.am b/Makefile.am -index 56922b79..697f8c6e 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -1,6 +1,6 @@ - ## Process this file with automake to produce Makefile.in - --SHELL = @BASH@ -+SHELL = @bash@ - .SHELLFLAGS = -o pipefail -c - - PYTHON ?= python3 diff --git a/data/80-udisks2.rules b/data/80-udisks2.rules -index 39bfa28b..ee1ca90a 100644 +index ca802cce..bfd1c29e 100644 --- a/data/80-udisks2.rules +++ b/data/80-udisks2.rules @@ -17,9 +17,9 @@ ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="?*", GOTO="udisks_probe_end" @@ -66,9 +54,27 @@ index e7df4ed2..ab4356d9 100644 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # diff --git a/src/tests/integration-test b/src/tests/integration-test -index 4499a6a9..8b711f95 100755 +index 07e4e029..3bd8ec51 100755 --- a/src/tests/integration-test +++ b/src/tests/integration-test +@@ -299,7 +299,7 @@ class UDisksTestCase(unittest.TestCase): + if not device: + device = cls.devname(partition) + result = {} +- cmd = subprocess.Popen(['blkid', '-p', '-o', 'udev', device], stdout=subprocess.PIPE) ++ cmd = subprocess.Popen(['@blkid@', '-p', '-o', 'udev', device], stdout=subprocess.PIPE) + for l in cmd.stdout: + (key, value) = l.decode('UTF-8').split('=', 1) + result[key] = value.strip() +@@ -437,7 +437,7 @@ class UDisksTestCase(unittest.TestCase): + f.write('KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ' + 'ATTRS{model}=="scsi_debug*", ' + 'ENV{ID_CDROM_MEDIA}=="?*", ' +- 'IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"\n') ++ 'IMPORT{program}="@blkid@ -o udev -p -u noraid $tempnode"\n') + # reload udev + subprocess.call('sync; pkill --signal HUP udevd || ' + 'pkill --signal HUP systemd-udevd', @@ -1142,7 +1142,7 @@ class FS(UDisksTestCase): self.assertFalse(os.access(f, os.X_OK)) @@ -150,6 +156,3 @@ index 3ddbdf2c..a87f960a 100644 udisks_spawned_job_start (job); g_object_unref (job); } --- -2.33.1 - diff --git a/pkgs/os-specific/linux/upower/default.nix b/pkgs/os-specific/linux/upower/default.nix index 51ae7b002f9a..aff9125c236d 100644 --- a/pkgs/os-specific/linux/upower/default.nix +++ b/pkgs/os-specific/linux/upower/default.nix @@ -8,7 +8,7 @@ , ninja , python3 , gtk-doc -, docbook_xsl +, docbook-xsl-nons , udev , libgudev , libusb1 @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { pname = "upower"; - version = "0.99.15"; + version = "0.99.17"; outputs = [ "out" "dev" "devdoc" ]; @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { owner = "upower"; repo = "upower"; rev = "v${version}"; - sha256 = "sha256-GlLy2MPip21KOabdW8Vw6NVe3xhzsd9htxQ2xO/hZ/4="; + sha256 = "xvvqzGxgkuGcvnO12jnLURNJUoSlnMw2g/mnII+i6Bs="; }; nativeBuildInputs = [ @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { ninja python3 gtk-doc - docbook_xsl + docbook-xsl-nons gettext gobject-introspection libxslt @@ -99,7 +99,9 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://upower.freedesktop.org/"; + changelog = "https://gitlab.freedesktop.org/upower/upower/-/blob/v${version}/NEWS"; description = "A D-Bus service for power management"; + maintainers = teams.freedesktop.members; platforms = platforms.linux; license = licenses.gpl2Plus; }; diff --git a/pkgs/os-specific/linux/usbguard/default.nix b/pkgs/os-specific/linux/usbguard/default.nix index de4517872fc4..35505af5a1ed 100644 --- a/pkgs/os-specific/linux/usbguard/default.nix +++ b/pkgs/os-specific/linux/usbguard/default.nix @@ -24,14 +24,14 @@ assert libgcrypt != null -> libsodium == null; stdenv.mkDerivation rec { - version = "1.1.0"; + version = "1.1.1"; pname = "usbguard"; src = fetchFromGitHub { owner = "USBGuard"; repo = pname; rev = "usbguard-${version}"; - sha256 = "sha256-lnHeU/X/2N81WPLakRYLs8TjpBhxBPhiXDJ+wNW0sU0="; + sha256 = "sha256-lAh+l9GF+FHQqv2kEYU5JienZKGwR5e45BYAwjieYgw="; fetchSubmodules = true; }; diff --git a/pkgs/os-specific/linux/usermount/default.nix b/pkgs/os-specific/linux/usermount/default.nix index 87b38b9af6e4..934367dcd11b 100644 --- a/pkgs/os-specific/linux/usermount/default.nix +++ b/pkgs/os-specific/linux/usermount/default.nix @@ -1,13 +1,14 @@ -{ lib, stdenv, fetchgit, pkg-config, dbus, libnotify, udisks2, gdk-pixbuf }: +{ lib, stdenv, fetchFromGitHub, pkg-config, dbus, libnotify, udisks2, gdk-pixbuf }: stdenv.mkDerivation { pname = "usermount"; version = "0.1"; - src = fetchgit { - url = "https://github.com/tom5760/usermount.git"; + src = fetchFromGitHub { + owner = "tom5760"; + repo = "usermount"; rev = "0d6aba3c1f8fec80de502f5b92fd8b28041cc8e4"; - sha256 = "0gpp0vwiwr7kgbhh26jspv3255662mnvnav6g8i2h0qxar8hf8w2"; + sha256 = "sha256-giMHUVYdAygiemYru20VxpQixr5aGgHhevNkHvkG9z4="; }; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index 8485565e0a88..bedd2417e7ea 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -5,11 +5,11 @@ stdenv.mkDerivation rec { pname = "util-linux"; - version = "2.37.3"; + version = "2.37.4"; src = fetchurl { url = "mirror://kernel/linux/utils/util-linux/v${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-WQxZLljNa/OFGctGevBc5qGrGAQOPjQY8kvPsvVfl3Y="; + sha256 = "sha256-Y05pFq2RM2bDU2tkaOeER2lUm5mnsr+AMU3nirVlW4M="; }; patches = [ diff --git a/pkgs/os-specific/linux/v4l-utils/default.nix b/pkgs/os-specific/linux/v4l-utils/default.nix index 90a052fdef9d..3fdd9e791bd5 100644 --- a/pkgs/os-specific/linux/v4l-utils/default.nix +++ b/pkgs/os-specific/linux/v4l-utils/default.nix @@ -12,11 +12,11 @@ let # we need to use stdenv.mkDerivation in order not to pollute the libv4l’s closure with Qt in stdenv.mkDerivation rec { pname = "v4l-utils"; - version = "1.20.0"; + version = "1.22.1"; src = fetchurl { url = "https://linuxtv.org/downloads/${pname}/${pname}-${version}.tar.bz2"; - sha256 = "1xr66y6w422hil6s7n8d61a2vhwh4im8l267amf41jvw7xqihqcm"; + hash = "sha256-Zcb76DCkTKEFxEOwJxgsGyyQU6kdHnKthJ36s4i5TjE="; }; outputs = [ "out" ] ++ lib.optional withUtils "lib" ++ [ "dev" ]; @@ -40,14 +40,16 @@ in stdenv.mkDerivation rec { propagatedBuildInputs = [ libjpeg ]; postPatch = '' - patchShebangs utils/cec-ctl/msg2ctl.pl - patchShebangs utils/libcecutil/cec-gen.pl + patchShebangs utils/ ''; + enableParallelBuilding = true; + meta = with lib; { description = "V4L utils and libv4l, provide common image formats regardless of the v4l device"; homepage = "https://linuxtv.org/projects.php"; - license = licenses.lgpl21Plus; + changelog = "https://git.linuxtv.org/v4l-utils.git/plain/ChangeLog?h=v4l-utils-${version}"; + license = with licenses; [ lgpl21Plus gpl2Plus ]; maintainers = with maintainers; [ codyopel ]; platforms = platforms.linux; }; diff --git a/pkgs/os-specific/linux/v4l2loopback/default.nix b/pkgs/os-specific/linux/v4l2loopback/default.nix index c1aa7be2af6b..095d873e66cb 100644 --- a/pkgs/os-specific/linux/v4l2loopback/default.nix +++ b/pkgs/os-specific/linux/v4l2loopback/default.nix @@ -16,12 +16,9 @@ stdenv.mkDerivation rec { preBuild = '' substituteInPlace Makefile --replace "modules_install" "INSTALL_MOD_PATH=$out modules_install" sed -i '/depmod/d' Makefile - export PATH=${kmod}/sbin:$PATH ''; - nativeBuildInputs = kernel.moduleBuildDependencies; - - buildInputs = [ kmod ]; + nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies; postInstall = '' make install-utils PREFIX=$bin @@ -29,7 +26,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "bin" ]; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "KERNELRELEASE=${kernel.modDirVersion}" "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; diff --git a/pkgs/os-specific/linux/veikk-linux-driver/default.nix b/pkgs/os-specific/linux/veikk-linux-driver/default.nix index a1019d7b7fd6..8cf4896ae027 100644 --- a/pkgs/os-specific/linux/veikk-linux-driver/default.nix +++ b/pkgs/os-specific/linux/veikk-linux-driver/default.nix @@ -15,9 +15,9 @@ stdenv.mkDerivation rec { buildInputs = [ kernel ]; - buildPhase = '' - make BUILD_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build - ''; + makeFlags = kernel.makeFlags ++ [ + "BUILD_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + ]; installPhase = '' mkdir -p $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/veikk diff --git a/pkgs/os-specific/linux/x86info/default.nix b/pkgs/os-specific/linux/x86info/default.nix index e842b59651e7..db5b040da3a2 100644 --- a/pkgs/os-specific/linux/x86info/default.nix +++ b/pkgs/os-specific/linux/x86info/default.nix @@ -1,32 +1,45 @@ -{lib, stdenv, fetchurl, pciutils, python2}: +{ lib +, stdenv +, fetchFromGitHub +, pciutils +, pkg-config +, python3 +}: stdenv.mkDerivation rec { - version = "1.30"; pname = "x86info"; + version = "unstable-2021-08-07"; - src = fetchurl { - url = "http://codemonkey.org.uk/projects/x86info/${pname}-${version}.tgz"; - sha256 = "0a4lzka46nabpsrg3n7akwr46q38f96zfszd73xcback1s2hjc7y"; + src = fetchFromGitHub { + owner = "kernelslacker"; + repo = pname; + rev = "061ea35ecb0697761b6260998fa2045b8bb0be68"; + hash = "sha256-/qWioC4dV1bQkU4SiTR8duYqoGIMIH7s8vuAXi75juo="; }; - preConfigure = '' - patchShebangs . + nativeBuildInputs = [ + pkg-config + python3 + ]; - # ignore warnings - sed -i 's/-Werror -Wall//' Makefile - ''; + buildInputs = [ + pciutils + ]; - buildInputs = [ pciutils python2 ]; + postBuild = '' + patchShebangs lsmsr/createheader.py + make -C lsmsr + ''; installPhase = '' mkdir -p $out/bin - cp x86info lsmsr $out/bin + cp x86info $out/bin + cp lsmsr/lsmsr $out/bin ''; meta = { description = "Identification utility for the x86 series of processors"; - longDescription = - '' + longDescription = '' x86info will identify all Intel/AMD/Centaur/Cyrix/VIA CPUs. It leverages the cpuid kernel module where possible. it supports parsing model specific registers (MSRs) via the msr kernel module. it will approximate processor @@ -34,7 +47,7 @@ stdenv.mkDerivation rec { ''; platforms = [ "i686-linux" "x86_64-linux" ]; license = lib.licenses.gpl2; - homepage = "http://codemonkey.org.uk/projects/x86info/"; - maintainers = with lib.maintainers; [jcumming]; + homepage = "https://github.com/kernelslacker/x86info"; + maintainers = with lib.maintainers; [ jcumming ]; }; } diff --git a/pkgs/os-specific/linux/xmm7360-pci/default.nix b/pkgs/os-specific/linux/xmm7360-pci/default.nix index 6a589ff889c3..435ff94afb76 100644 --- a/pkgs/os-specific/linux/xmm7360-pci/default.nix +++ b/pkgs/os-specific/linux/xmm7360-pci/default.nix @@ -11,10 +11,12 @@ stdenv.mkDerivation rec { sha256 = "1wdb0phqg9rj9g9ycqdya0m7lx24kzjlh25yw0ifp898ddxrrr0c"; }; - makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; + makeFlags = kernel.makeFlags ++ [ + "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "INSTALL_MOD_PATH=${placeholder "out"}" + ]; nativeBuildInputs = kernel.moduleBuildDependencies; - INSTALL_MOD_PATH = placeholder "out"; installFlags = [ "DEPMOD=true" ]; meta = with lib; { diff --git a/pkgs/os-specific/linux/xpadneo/default.nix b/pkgs/os-specific/linux/xpadneo/default.nix index c1874877620c..c5aa09a88608 100644 --- a/pkgs/os-specific/linux/xpadneo/default.nix +++ b/pkgs/os-specific/linux/xpadneo/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = kernel.moduleBuildDependencies; buildInputs = [ bluez ]; - makeFlags = [ + makeFlags = kernel.makeFlags ++ [ "-C" "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "M=$(sourceRoot)" diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix index 7341240f95af..6747d511694b 100644 --- a/pkgs/os-specific/linux/zfs/default.nix +++ b/pkgs/os-specific/linux/zfs/default.nix @@ -16,11 +16,12 @@ , enablePython ? true # for determining the latest compatible linuxPackages -, linuxPackages_5_15 ? pkgs.linuxKernel.packages.linux_5_15 +, linuxPackages_5_17 ? pkgs.linuxKernel.packages.linux_5_17 }: -with lib; let + inherit (lib) any optionalString optionals optional makeBinPath; + smartmon = smartmontools.override { inherit enableMail; }; buildKernel = any (n: n == configFile) [ "kernel" "all" ]; @@ -113,7 +114,7 @@ let configureFlags = [ "--with-config=${configFile}" "--with-tirpc=1" - (withFeatureAs (buildUser && enablePython) "python" python3.interpreter) + (lib.withFeatureAs (buildUser && enablePython) "python" python3.interpreter) ] ++ optionals buildUser [ "--with-dracutdir=$(out)/lib/dracut" "--with-udevdir=$(out)/lib/udev" @@ -200,9 +201,9 @@ let ''; homepage = "https://github.com/openzfs/zfs"; changelog = "https://github.com/openzfs/zfs/releases/tag/zfs-${version}"; - license = licenses.cddl; - platforms = platforms.linux; - maintainers = with maintainers; [ hmenke jcumming jonringer wizeman fpletz globin ]; + license = lib.licenses.cddl; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ hmenke jcumming jonringer wizeman fpletz globin ]; mainProgram = "zfs"; # If your Linux kernel version is not yet supported by zfs, try zfsUnstable. # On NixOS set the option boot.zfs.enableUnstable. @@ -215,28 +216,28 @@ in { # to be adapted zfsStable = common { # check the release notes for compatible kernels - kernelCompatible = kernel.kernelAtLeast "3.10" && kernel.kernelOlder "5.16"; - latestCompatibleLinuxPackages = linuxPackages_5_15; + kernelCompatible = kernel.kernelAtLeast "3.10" && kernel.kernelOlder "5.18"; + latestCompatibleLinuxPackages = linuxPackages_5_17; # this package should point to the latest release. - version = "2.1.2"; + version = "2.1.4"; - sha256 = "sha256-7oSFZlmjCr+egImIVf429GrFOKn3L3r4SMnK3LHHmL8="; + sha256 = "sha256-pHz1N2j+d9p1xleEBwwrmK9mN5gEyM69Suy0dsrkZT4="; }; zfsUnstable = common { # check the release notes for compatible kernels - kernelCompatible = kernel.kernelAtLeast "3.10" && kernel.kernelOlder "5.16"; - latestCompatibleLinuxPackages = linuxPackages_5_15; + kernelCompatible = kernel.kernelAtLeast "3.10" && kernel.kernelOlder "5.18"; + latestCompatibleLinuxPackages = linuxPackages_5_17; # this package should point to a version / git revision compatible with the latest kernel release # IMPORTANT: Always use a tagged release candidate or commits from the # zfs-<version>-staging branch, because this is tested by the OpenZFS # maintainers. - version = "2.1.2"; + version = "2.1.4"; # rev = "0000000000000000000000000000000000000000"; - sha256 = "sha256-7oSFZlmjCr+egImIVf429GrFOKn3L3r4SMnK3LHHmL8="; + sha256 = "sha256-pHz1N2j+d9p1xleEBwwrmK9mN5gEyM69Suy0dsrkZT4="; isUnstable = true; }; |