diff options
Diffstat (limited to 'pkgs/os-specific')
207 files changed, 644 insertions, 719 deletions
diff --git a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix index 7650dcdc8c70..14ede7949d0f 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix @@ -34,7 +34,7 @@ appleDerivation' (if headersOnly then stdenvNoCC else stdenv) ( --replace "-Werror " "" substituteInPlace SETUP/kextsymboltool/Makefile \ - --replace "-lstdc++" "-lc++ -lc++abi" + --replace "-lstdc++" "-lc++" substituteInPlace libsyscall/xcodescripts/mach_install_mig.sh \ --replace "/usr/include" "/include" \ diff --git a/pkgs/os-specific/darwin/libtapi/default.nix b/pkgs/os-specific/darwin/libtapi/default.nix index 5a72225eec30..cb6b3cf4b739 100644 --- a/pkgs/os-specific/darwin/libtapi/default.nix +++ b/pkgs/os-specific/darwin/libtapi/default.nix @@ -40,15 +40,12 @@ stdenv.mkDerivation (finalAttrs: { let nativeCC = pkgsBuildBuild.stdenv.cc; nativeBintools = nativeCC.bintools.bintools; - nativeLibcxxabi = lib.getLib pkgsBuildBuild.libcxxabi; nativeToolchainFlags = [ "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc" "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++" "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar" "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip" "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib" - "-DCMAKE_EXE_LINKER_FLAGS=-L${nativeLibcxxabi}/lib" - "-DCMAKE_SHARED_LINKER_FLAGS=-L${nativeLibcxxabi}/lib" ]; in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list=${lib.concatStringsSep ";" nativeToolchainFlags}" ) @@ -70,6 +67,7 @@ stdenv.mkDerivation (finalAttrs: { meta = with lib; { description = "Replaces the Mach-O Dynamic Library Stub files in Apple's SDKs to reduce the size"; + mainProgram = "tapi"; homepage = "https://github.com/tpoechtrager/apple-libtapi"; license = licenses.ncsa; maintainers = with maintainers; [ matthewbauer ]; diff --git a/pkgs/os-specific/darwin/maloader/default.nix b/pkgs/os-specific/darwin/maloader/default.nix deleted file mode 100644 index c59f854b8475..000000000000 --- a/pkgs/os-specific/darwin/maloader/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, opencflite, clang, libcxx }: - -stdenv.mkDerivation { - pname = "maloader"; - version = "unstable-2014-02-25"; - - src = fetchFromGitHub { - owner = "shinh"; - repo = "maloader"; - rev = "5f220393e0b7b9ad0cf1aba0e89df2b42a1f0442"; - sha256 = "0dd1pn07x1y8pyn5wz8qcl1c1xwghyya4d060m3y9vx5dhv9xmzw"; - }; - - postPatch = '' - sed -i \ - -e '/if.*loadLibMac.*mypath/s|mypath|"'"$out/lib/"'"|' \ - -e 's|libCoreFoundation\.so|${opencflite}/lib/&|' \ - ld-mac.cc - ''; - - env.NIX_CFLAGS_COMPILE = "-I${lib.getDev libcxx}/include/c++/v1"; - buildInputs = [ clang libcxx ]; - buildFlags = [ "USE_LIBCXX=1" "release" ]; - - installPhase = '' - install -vD libmac.so "$out/lib/libmac.so" - - for bin in extract macho2elf ld-mac; do - install -vD "$bin" "$out/bin/$bin" - done - ''; - - meta = { - description = "Mach-O loader for Linux"; - homepage = "https://github.com/shinh/maloader"; - license = lib.licenses.bsd2; - platforms = lib.platforms.linux; - broken = true; # 2018-09-08, no succesful build since 2017-08-21 - }; -} diff --git a/pkgs/os-specific/darwin/moltenvk/MoltenVK.xcodeproj.patch b/pkgs/os-specific/darwin/moltenvk/MoltenVK.xcodeproj.patch deleted file mode 100644 index 83e020a1b848..000000000000 --- a/pkgs/os-specific/darwin/moltenvk/MoltenVK.xcodeproj.patch +++ /dev/null @@ -1,100 +0,0 @@ -diff --git a/MoltenVK/MoltenVK.xcodeproj/project.pbxproj b/MoltenVK/MoltenVK.xcodeproj/project.pbxproj -index c23afce4..12ac12f4 100644 ---- a/MoltenVK/MoltenVK.xcodeproj/project.pbxproj -+++ b/MoltenVK/MoltenVK.xcodeproj/project.pbxproj -@@ -365,13 +365,6 @@ - /* End PBXBuildFile section */ - - /* Begin PBXContainerItemProxy section */ -- 2F21D82E24983488009BEA5F /* PBXContainerItemProxy */ = { -- isa = PBXContainerItemProxy; -- containerPortal = A9C86CB61C55B8350096CAF2 /* MoltenVKShaderConverter.xcodeproj */; -- proxyType = 1; -- remoteGlobalIDString = 2FEA0CFF2490381A00EEF3AD; -- remoteInfo = "MoltenVKSPIRVToMSLConverter-tvOS"; -- }; - 2FEA0D1B249040CA00EEF3AD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A9C86CB61C55B8350096CAF2 /* MoltenVKShaderConverter.xcodeproj */; -@@ -400,27 +393,6 @@ - remoteGlobalIDString = A93903C71C57E9ED00FE90DC; - remoteInfo = "MVKSPIRVToMSLConverter-macOS"; - }; -- A981499A1FB6B9CF005F00B4 /* PBXContainerItemProxy */ = { -- isa = PBXContainerItemProxy; -- containerPortal = A9C86CB61C55B8350096CAF2 /* MoltenVKShaderConverter.xcodeproj */; -- proxyType = 1; -- remoteGlobalIDString = A93903B81C57E9D700FE90DC; -- remoteInfo = "MVKSPIRVToMSLConverter-iOS"; -- }; -- A9B1C7F4251AA5AF001D12CC /* PBXContainerItemProxy */ = { -- isa = PBXContainerItemProxy; -- containerPortal = A9C86CB61C55B8350096CAF2 /* MoltenVKShaderConverter.xcodeproj */; -- proxyType = 1; -- remoteGlobalIDString = A9092A8C1A81717B00051823; -- remoteInfo = MoltenVKShaderConverter; -- }; -- DCA2CEAE2A45DFD400FB75B6 /* PBXContainerItemProxy */ = { -- isa = PBXContainerItemProxy; -- containerPortal = A9C86CB61C55B8350096CAF2 /* MoltenVKShaderConverter.xcodeproj */; -- proxyType = 1; -- remoteGlobalIDString = DCFD7F6F2A45BDA0007BBBF7; -- remoteInfo = "MoltenVKShaderConverter-xrOS"; -- }; - DCBC41212A45DB1000F49BD1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A9C86CB61C55B8350096CAF2 /* MoltenVKShaderConverter.xcodeproj */; -@@ -1019,7 +998,6 @@ - buildRules = ( - ); - dependencies = ( -- 2F21D82F24983488009BEA5F /* PBXTargetDependency */, - ); - name = "MoltenVK-tvOS"; - productName = MoltenVK; -@@ -1039,7 +1017,6 @@ - buildRules = ( - ); - dependencies = ( -- A981499B1FB6B9CF005F00B4 /* PBXTargetDependency */, - ); - name = "MoltenVK-iOS"; - productName = MoltenVK; -@@ -1059,7 +1036,6 @@ - buildRules = ( - ); - dependencies = ( -- A9B1C7F5251AA5AF001D12CC /* PBXTargetDependency */, - ); - name = "MoltenVK-macOS"; - productName = MoltenVK; -@@ -1476,29 +1452,6 @@ - }; - /* End PBXSourcesBuildPhase section */ - --/* Begin PBXTargetDependency section */ -- 2F21D82F24983488009BEA5F /* PBXTargetDependency */ = { -- isa = PBXTargetDependency; -- name = "MoltenVKSPIRVToMSLConverter-tvOS"; -- targetProxy = 2F21D82E24983488009BEA5F /* PBXContainerItemProxy */; -- }; -- A981499B1FB6B9CF005F00B4 /* PBXTargetDependency */ = { -- isa = PBXTargetDependency; -- name = "MVKSPIRVToMSLConverter-iOS"; -- targetProxy = A981499A1FB6B9CF005F00B4 /* PBXContainerItemProxy */; -- }; -- A9B1C7F5251AA5AF001D12CC /* PBXTargetDependency */ = { -- isa = PBXTargetDependency; -- name = MoltenVKShaderConverter; -- targetProxy = A9B1C7F4251AA5AF001D12CC /* PBXContainerItemProxy */; -- }; -- DCA2CEAF2A45DFD400FB75B6 /* PBXTargetDependency */ = { -- isa = PBXTargetDependency; -- name = "MoltenVKShaderConverter-xrOS"; -- targetProxy = DCA2CEAE2A45DFD400FB75B6 /* PBXContainerItemProxy */; -- }; --/* End PBXTargetDependency section */ -- - /* Begin XCBuildConfiguration section */ - 2FEA0AB824902F9F00EEF3AD /* Debug */ = { - isa = XCBuildConfiguration; diff --git a/pkgs/os-specific/darwin/moltenvk/MoltenVKShaderConverter.xcodeproj.patch b/pkgs/os-specific/darwin/moltenvk/MoltenVKShaderConverter.xcodeproj.patch deleted file mode 100644 index 3e48b2b5ba67..000000000000 --- a/pkgs/os-specific/darwin/moltenvk/MoltenVKShaderConverter.xcodeproj.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff --git a/MoltenVKShaderConverter/MoltenVKShaderConverter.xcodeproj/project.pbxproj b/MoltenVKShaderConverter/MoltenVKShaderConverter.xcodeproj/project.pbxproj -index c7842b63..d55f73ed 100644 ---- a/MoltenVKShaderConverter/MoltenVKShaderConverter.xcodeproj/project.pbxproj -+++ b/MoltenVKShaderConverter/MoltenVKShaderConverter.xcodeproj/project.pbxproj -@@ -3,7 +3,7 @@ - archiveVersion = 1; - classes = { - }; -- objectVersion = 54; -+ objectVersion = 48; - objects = { - - /* Begin PBXBuildFile section */ -@@ -33,9 +33,6 @@ - A920A8AC251B75B70076851C /* GLSLToSPIRVConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = A920A8A2251B75B70076851C /* GLSLToSPIRVConverter.h */; }; - A920A8AD251B75B80076851C /* GLSLToSPIRVConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = A920A8A2251B75B70076851C /* GLSLToSPIRVConverter.h */; }; - A920A8AE251B75B80076851C /* GLSLToSPIRVConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = A920A8A2251B75B70076851C /* GLSLToSPIRVConverter.h */; }; -- A920A8AF251B77900076851C /* glslang.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = A98386FD24EEE93700199A05 /* glslang.xcframework */; }; -- A920A8B0251B77910076851C /* glslang.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = A98386FD24EEE93700199A05 /* glslang.xcframework */; }; -- A920A8B1251B77920076851C /* glslang.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = A98386FD24EEE93700199A05 /* glslang.xcframework */; }; - A925B71B1C78DEB2006E7ECD /* libMoltenVKShaderConverter.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A93903C71C57E9ED00FE90DC /* libMoltenVKShaderConverter.a */; }; - A928C9191D0488DC00071B88 /* SPIRVConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = A928C9171D0488DC00071B88 /* SPIRVConversion.h */; }; - A928C91A1D0488DC00071B88 /* SPIRVConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = A928C9171D0488DC00071B88 /* SPIRVConversion.h */; }; -@@ -55,12 +52,6 @@ - A97CC7411C7527F3004A5C7E /* MoltenVKShaderConverterTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A97CC73E1C7527F3004A5C7E /* MoltenVKShaderConverterTool.cpp */; }; - A98149681FB6A98A005F00B4 /* MVKStrings.h in Headers */ = {isa = PBXBuildFile; fileRef = A98149651FB6A98A005F00B4 /* MVKStrings.h */; }; - A98149691FB6A98A005F00B4 /* MVKStrings.h in Headers */ = {isa = PBXBuildFile; fileRef = A98149651FB6A98A005F00B4 /* MVKStrings.h */; }; -- A98386FA24EEE91A00199A05 /* SPIRVCross.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = A98386F824EEE91A00199A05 /* SPIRVCross.xcframework */; }; -- A98386FB24EEE91A00199A05 /* SPIRVCross.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = A98386F824EEE91A00199A05 /* SPIRVCross.xcframework */; }; -- A98386FC24EEE91A00199A05 /* SPIRVCross.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = A98386F824EEE91A00199A05 /* SPIRVCross.xcframework */; }; -- A983870724EEE94800199A05 /* SPIRVTools.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = A983870224EEE94800199A05 /* SPIRVTools.xcframework */; }; -- A983870824EEE94800199A05 /* SPIRVTools.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = A983870224EEE94800199A05 /* SPIRVTools.xcframework */; }; -- A983870924EEE94800199A05 /* SPIRVTools.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = A983870224EEE94800199A05 /* SPIRVTools.xcframework */; }; - A9A14E332244388700C080F3 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9A14E322244388700C080F3 /* Metal.framework */; }; - A9B51BDD225E98BB00AC74D2 /* MVKOSExtensions.mm in Sources */ = {isa = PBXBuildFile; fileRef = A9B51BDB225E98BB00AC74D2 /* MVKOSExtensions.mm */; }; - A9F042B21FB4D060009FCCB8 /* MVKCommonEnvironment.h in Headers */ = {isa = PBXBuildFile; fileRef = A9F042AA1FB4D060009FCCB8 /* MVKCommonEnvironment.h */; }; -@@ -115,9 +106,6 @@ - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( -- A983870824EEE94800199A05 /* SPIRVTools.xcframework in Frameworks */, -- A98386FB24EEE91A00199A05 /* SPIRVCross.xcframework in Frameworks */, -- A920A8B0251B77910076851C /* glslang.xcframework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -@@ -134,9 +122,6 @@ - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( -- A983870724EEE94800199A05 /* SPIRVTools.xcframework in Frameworks */, -- A98386FA24EEE91A00199A05 /* SPIRVCross.xcframework in Frameworks */, -- A920A8AF251B77900076851C /* glslang.xcframework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -@@ -144,9 +129,6 @@ - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( -- A983870924EEE94800199A05 /* SPIRVTools.xcframework in Frameworks */, -- A98386FC24EEE91A00199A05 /* SPIRVCross.xcframework in Frameworks */, -- A920A8B1251B77920076851C /* glslang.xcframework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -@@ -313,7 +295,7 @@ - A925B71D1C78DEBF006E7ECD /* PBXTargetDependency */, - ); - name = MoltenVKShaderConverter; -- productName = MetalGLShaderConverterTool; -+ productName = MoltenVKShaderConverter; - productReference = A964BD5F1C57EFBD00D930D8 /* MoltenVKShaderConverter */; - productType = "com.apple.product-type.tool"; - }; -@@ -349,7 +331,7 @@ - dependencies = ( - ); - name = "MoltenVKShaderConverter-macOS"; -- productName = "MetalGLShaderConverter-macOS"; -+ productName = MoltenVKShaderConverter; - productReference = A93903C71C57E9ED00FE90DC /* libMoltenVKShaderConverter.a */; - productType = "com.apple.product-type.library.static"; - }; diff --git a/pkgs/os-specific/darwin/moltenvk/default.nix b/pkgs/os-specific/darwin/moltenvk/default.nix index c6ada1f55d5f..4e332e6fe557 100644 --- a/pkgs/os-specific/darwin/moltenvk/default.nix +++ b/pkgs/os-specific/darwin/moltenvk/default.nix @@ -1,26 +1,31 @@ -{ lib -, overrideCC -, stdenv -, fetchFromGitHub -, gitUpdater -, cctools -, sigtool -, cereal -, libcxx -, glslang -, spirv-cross -, spirv-headers -, spirv-tools -, vulkan-headers -, xcbuild -, AppKit -, Foundation -, Libsystem -, MacOSX-SDK -, Metal -, QuartzCore +{ + lib, + stdenv, + fetchFromGitHub, + gitUpdater, + cereal, + libcxx, + glslang, + simd, + spirv-cross, + spirv-headers, + spirv-tools, + vulkan-headers, + xcbuild, + AppKit, + Foundation, + Metal, + QuartzCore, + # MoltenVK supports using private APIs to implement some Vulkan functionality. + # Applications that use private APIs can’t be distributed on the App Store, + # but that’s not really a concern for nixpkgs, so use them by default. + # See: https://github.com/KhronosGroup/MoltenVK/blob/main/README.md#metal_private_api + enablePrivateAPIUsage ? true, }: +let + inherit (stdenv.hostPlatform) isStatic; +in stdenv.mkDerivation (finalAttrs: { pname = "MoltenVK"; version = "1.2.7"; @@ -32,15 +37,20 @@ stdenv.mkDerivation (finalAttrs: { QuartzCore cereal glslang + simd spirv-cross spirv-headers spirv-tools vulkan-headers ]; - nativeBuildInputs = [ cctools sigtool xcbuild ]; + nativeBuildInputs = [ xcbuild ]; - outputs = [ "out" "bin" "dev" ]; + outputs = [ + "out" + "bin" + "dev" + ]; src = fetchFromGitHub { owner = "KhronosGroup"; @@ -49,106 +59,142 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-0+S/kueV+AEVt+oFnh4cgcDRVtEbUH1QiHFPhGhimCA="; }; - patches = [ - # Fix the Xcode projects to play nicely with `xcbuild`. - ./MoltenVKShaderConverter.xcodeproj.patch - ./MoltenVK.xcodeproj.patch - ]; - postPatch = '' # Move `mvkGitRevDerived.h` to a stable location substituteInPlace Scripts/gen_moltenvk_rev_hdr.sh \ --replace-fail '$'''{BUILT_PRODUCTS_DIR}' "$NIX_BUILD_TOP/$sourceRoot/build/include" \ --replace-fail '$(git rev-parse HEAD)' ${finalAttrs.src.rev} - # Use the SPIRV-Cross packaged in nixpkgs instead of one built specifically for MoltenVK. - substituteInPlace MoltenVK/MoltenVK.xcodeproj/project.pbxproj \ - --replace-fail SPIRV_CROSS_NAMESPACE_OVERRIDE=MVK_spirv_cross SPIRV_CROSS_NAMESPACE_OVERRIDE=spirv_cross + + # Modify MoltenVK Xcode projects to build with xcbuild and dependencies from nixpkgs. + for proj in MoltenVK MoltenVKShaderConverter; do + # Remove xcframework dependencies from the Xcode projects. The basic format is: + # (children|files) = ( + # DCFD7F822A45BDA0007BBBF7 /* SPIRVCross.xcframework in Frameworks */, + # etc + # ) + # This regex will only remove lines matching `xcframework` that are in these blocks + # to avoid accidentally corrupting the project. + sed -E -e '/(children|files) = /,/;/{/xcframework/d}' \ + -i "$proj/$proj.xcodeproj/project.pbxproj" + # Ensure the namespace used is consistent with the spirv-cross package in nixpkgs. + substituteInPlace "$proj/$proj.xcodeproj/project.pbxproj" \ + --replace-fail SPIRV_CROSS_NAMESPACE_OVERRIDE=MVK_spirv_cross SPIRV_CROSS_NAMESPACE_OVERRIDE=spirv_cross + done substituteInPlace MoltenVKShaderConverter/MoltenVKShaderConverter.xcodeproj/project.pbxproj \ - --replace-fail SPIRV_CROSS_NAMESPACE_OVERRIDE=MVK_spirv_cross SPIRV_CROSS_NAMESPACE_OVERRIDE=spirv_cross - # Adding all of `usr/include` from the SDK results in header conflicts with `libcxx.dev`. - # Work around it by symlinking just the SIMD stuff needed by MoltenVK. + --replace-fail MetalGLShaderConverterTool MoltenVKShaderConverter \ + --replace-fail MetalGLShaderConverter-macOS MoltenVKShaderConverter + + # Don’t try to build `xcframework`s because `xcbuild` can’t build them. + sed -e '/xcframework/d' -i Scripts/package_all.sh + + # Remove vendored dependency links. + find . -lname '*/External/*' -delete + + # The library will be linked in the install phase regardless of version, + # so truncate it if it exists to avoid link failures. + test -f Scripts/create_dylib.sh && truncate --size 0 Scripts/create_dylib.sh + + # Link glslang source because MoltenVK needs non-public headers to build. mkdir -p build/include - ln -s "${MacOSX-SDK}/usr/include/simd" "build/include" ln -s "${glslang.src}" "build/include/glslang" ''; - dontConfigure = true; - - env.NIX_CFLAGS_COMPILE = toString [ - "-isystem ${lib.getDev libcxx}/include/c++/v1" - "-I${lib.getDev spirv-cross}/include/spirv_cross" - "-I${lib.getDev spirv-headers}/include/spirv/unified1/" + env.NIX_CFLAGS_COMPILE = toString ( + [ + "-isystem ${lib.getDev libcxx}/include/c++/v1" + "-I${lib.getDev spirv-cross}/include/spirv_cross" + "-I${lib.getDev spirv-headers}/include/spirv/unified1" + ] + ++ lib.optional enablePrivateAPIUsage "-DMVK_USE_METAL_PRIVATE_API=1" + ); + + env.NIX_LDFLAGS = toString [ + "-lMachineIndependent" + "-lGenericCodeGen" + "-lglslang" + "-lOSDependent" + "-lSPIRV" + "-lSPIRV-Tools" + "-lSPIRV-Tools-opt" + "-lspirv-cross-msl" + "-lspirv-cross-core" + "-lspirv-cross-glsl" + "-lspirv-cross-reflect" ]; buildPhase = '' + runHook preBuild + NIX_CFLAGS_COMPILE+=" \ -I$NIX_BUILD_TOP/$sourceRoot/build/include \ -I$NIX_BUILD_TOP/$sourceRoot/Common" - NIX_LDFLAGS+=" -L$NIX_BUILD_TOP/$sourceRoot/build/lib" - - # Build each project on its own because `xcbuild` fails to build `MoltenVKPackaging.xcodeproj`. - build=$NIX_BUILD_TOP/$sourceRoot/build - mkdir -p "$build/bin" "$build/lib" - - NIX_LDFLAGS+=" \ - -lMachineIndependent \ - -lGenericCodeGen \ - -lglslang \ - -lOSDependent \ - -lSPIRV \ - -lSPIRV-Tools \ - -lSPIRV-Tools-opt \ - -lspirv-cross-msl \ - -lspirv-cross-core \ - -lspirv-cross-glsl" - - pushd MoltenVKShaderConverter - xcodebuild build \ - -jobs $NIX_BUILD_CORES \ - -configuration Release \ - -project MoltenVKShaderConverter.xcodeproj \ - -scheme MoltenVKShaderConverter \ - -arch ${stdenv.hostPlatform.darwinArch} - declare -A products=( [MoltenVKShaderConverter]=bin [libMoltenVKShaderConverter.a]=lib ) - for product in "''${!products[@]}"; do - cp MoltenVKShaderConverter-*/Build/Products/Release/$product "$build/''${products[$product]}/$product" - done - popd - - NIX_LDFLAGS+=" \ - -lobjc \ - -lMoltenVKShaderConverter \ - -lspirv-cross-reflect" - pushd MoltenVK xcodebuild build \ + SYMROOT=$PWD/Products OBJROOT=$PWD/Intermedates \ -jobs $NIX_BUILD_CORES \ -configuration Release \ - -project MoltenVK.xcodeproj \ - -scheme MoltenVK-macOS \ + -project MoltenVKPackaging.xcodeproj \ + -scheme 'MoltenVK Package (macOS only)' \ + -destination generic/platform=macOS \ -arch ${stdenv.hostPlatform.darwinArch} - cp MoltenVK-*/Build/Products/Release/dynamic/libMoltenVK.dylib "$build/lib/libMoltenVK.dylib" - popd + + runHook postBuild ''; + postBuild = + if isStatic then + '' + mkdir -p Package/Release/MoltenVK/static + cp Products/Release/libMoltenVK.a Package/Release/MoltenVK/static + '' + else + '' + # MoltenVK’s Xcode project builds the dylib, but it doesn’t seem to work with + # xcbuild. This is based on the script versions prior to 1.2.8 used. + mkdir -p Package/Release/MoltenVK/dynamic/dylib + clang++ -Wl,-all_load -Wl,-w \ + -dynamiclib \ + -compatibility_version 1.0.0 -current_version 1.0.0 \ + -LProducts/Release \ + -framework AppKit \ + -framework CoreGraphics \ + -framework Foundation \ + -framework IOKit \ + -framework IOSurface \ + -framework Metal \ + -framework QuartzCore \ + -lobjc \ + -lMoltenVKShaderConverter \ + -lspirv-cross-reflect \ + -install_name "$out/lib/libMoltenVK.dylib" \ + -o Package/Release/MoltenVK/dynamic/dylib/libMoltenVK.dylib \ + -force_load Products/Release/libMoltenVK.a + ''; + installPhase = '' - mkdir -p "$out/lib" "$out/share/vulkan/icd.d" "$bin/bin" "$dev/include/MoltenVK" - cp build/bin/MoltenVKShaderConverter "$bin/bin/" - cp build/lib/libMoltenVK.dylib "$out/lib/" - cp MoltenVK/MoltenVK/API/* "$dev/include/MoltenVK" - install -m644 MoltenVK/icd/MoltenVK_icd.json "$out/share/vulkan/icd.d/MoltenVK_icd.json" - substituteInPlace $out/share/vulkan/icd.d/MoltenVK_icd.json \ + runHook preInstall + + libraryExtension=${if isStatic then ".a" else ".dylib"} + packagePath=${if isStatic then "static" else "dynamic/dylib"} + + mkdir -p "$out/lib" "$out/share/vulkan/icd.d" "$bin/bin" "$dev" + + cp Package/Release/MoltenVKShaderConverter/Tools/MoltenVKShaderConverter "$bin/bin" + cp -r Package/Release/MoltenVK/include "$dev" + cp Package/Release/MoltenVK/$packagePath/libMoltenVK$libraryExtension "$out/lib" + + # Install ICD definition for use with vulkan-loader. + install -m644 MoltenVK/icd/MoltenVK_icd.json \ + "$out/share/vulkan/icd.d/MoltenVK_icd.json" + substituteInPlace "$out/share/vulkan/icd.d/MoltenVK_icd.json" \ --replace-fail ./libMoltenVK.dylib "$out/lib/libMoltenVK.dylib" - ''; - postFixup = '' - install_name_tool -id "$out/lib/libMoltenVK.dylib" "$out/lib/libMoltenVK.dylib" - codesign -s - -f "$out/lib/libMoltenVK.dylib" - codesign -s - -f "$bin/bin/MoltenVKShaderConverter" + runHook postInstall ''; passthru.updateScript = gitUpdater { rev-prefix = "v"; + ignoredVersions = ".*-(beta|rc).*"; }; meta = { diff --git a/pkgs/os-specific/darwin/opencflite/default.nix b/pkgs/os-specific/darwin/opencflite/default.nix deleted file mode 100644 index 937d0763feff..000000000000 --- a/pkgs/os-specific/darwin/opencflite/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ lib, stdenv, fetchurl, icu, libuuid, tzdata }: - -stdenv.mkDerivation rec { - pname = "opencflite"; - version = "476.19.0"; - - src = fetchurl { - url = "mirror://sourceforge/opencflite/${pname}-${version}.tar.gz"; - sha256 = "0jgmzs0ycl930hmzcvx0ykryik56704yw62w394q1q3xw5kkjn9v"; - }; - - configureFlags = [ "--with-uuid=${libuuid.dev}" ]; - buildInputs = [ icu tzdata.dev ]; - enableParallelBuilding = true; - - meta = { - description = "Cross platform port of the macOS CoreFoundation"; - homepage = "https://sourceforge.net/projects/opencflite/"; - license = lib.licenses.apsl20; - }; -} diff --git a/pkgs/os-specific/darwin/print-reexports/default.nix b/pkgs/os-specific/darwin/print-reexports/default.nix index 740bcb48ef59..992cf1bff8ea 100644 --- a/pkgs/os-specific/darwin/print-reexports/default.nix +++ b/pkgs/os-specific/darwin/print-reexports/default.nix @@ -14,4 +14,5 @@ stdenv.mkDerivation { mkdir -p $out/bin mv print-reexports $out/bin ''; + meta.mainProgram = "print-reexports"; } diff --git a/pkgs/os-specific/darwin/rewrite-tbd/default.nix b/pkgs/os-specific/darwin/rewrite-tbd/default.nix index 7a5467dc92a4..527cca8e87c1 100644 --- a/pkgs/os-specific/darwin/rewrite-tbd/default.nix +++ b/pkgs/os-specific/darwin/rewrite-tbd/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation { meta = with lib; { homepage = "https://github.com/thefloweringash/rewrite-tbd/"; description = "Rewrite filepath in .tbd to Nix applicable format"; + mainProgram = "rewrite-tbd"; platforms = platforms.unix; license = licenses.mit; }; diff --git a/pkgs/os-specific/darwin/sketchybar/default.nix b/pkgs/os-specific/darwin/sketchybar/default.nix index 4ac6ef9c13c9..3081e40622c5 100644 --- a/pkgs/os-specific/darwin/sketchybar/default.nix +++ b/pkgs/os-specific/darwin/sketchybar/default.nix @@ -22,13 +22,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "sketchybar"; - version = "2.20.1"; + version = "2.21.0"; src = fetchFromGitHub { owner = "FelixKratz"; repo = "SketchyBar"; rev = "v${finalAttrs.version}"; - hash = "sha256-dyo4J3Qszq7SSXdAXmgm7xFhWE5Eqtr7yZpNGmtuphY="; + hash = "sha256-hTfQQjx6ai83zYFfccsz/KaoZUIj5Dfz4ENe59gS02E="; }; buildInputs = [ diff --git a/pkgs/os-specific/darwin/yabai/default.nix b/pkgs/os-specific/darwin/yabai/default.nix index cdae949ba982..fa8067d8d478 100644 --- a/pkgs/os-specific/darwin/yabai/default.nix +++ b/pkgs/os-specific/darwin/yabai/default.nix @@ -17,7 +17,7 @@ let pname = "yabai"; - version = "6.0.15"; + version = "7.0.2"; test-version = testers.testVersion { package = yabai; @@ -53,7 +53,7 @@ in src = fetchzip { url = "https://github.com/koekeishiya/yabai/releases/download/v${version}/yabai-v${version}.tar.gz"; - hash = "sha256-L82N0IaC2OAZVhmu9NALencK78FeCZI2cWJyNkGH2vQ="; + hash = "sha256-FeNiJJM5vdzFT9s7N9cTjLYxKEfzZnKE9br13lkQhJo="; }; nativeBuildInputs = [ @@ -89,7 +89,7 @@ in owner = "koekeishiya"; repo = "yabai"; rev = "v${version}"; - hash = "sha256-buX6FRIXdM5VmYpA80eESDMPf+xeMfJJj0ulyx2g94M="; + hash = "sha256-/MOAKsY7MlRWdvUQwHeITTeGJbCUdX7blZZAl2zXuic="; }; nativeBuildInputs = [ diff --git a/pkgs/os-specific/linux/915resolution/default.nix b/pkgs/os-specific/linux/915resolution/default.nix index b67d737034e4..6966a76cfa97 100644 --- a/pkgs/os-specific/linux/915resolution/default.nix +++ b/pkgs/os-specific/linux/915resolution/default.nix @@ -15,6 +15,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "http://915resolution.mango-lang.org/"; description = "A tool to modify Intel 800/900 video BIOS"; + mainProgram = "915resolution"; platforms = [ "i686-linux" "x86_64-linux" ]; license = licenses.publicDomain; }; diff --git a/pkgs/os-specific/linux/acpi-call/default.nix b/pkgs/os-specific/linux/acpi-call/default.nix index b84ecd21293a..0da824b169e6 100644 --- a/pkgs/os-specific/linux/acpi-call/default.nix +++ b/pkgs/os-specific/linux/acpi-call/default.nix @@ -30,6 +30,7 @@ stdenv.mkDerivation rec { homepage = "https://github.com/nix-community/acpi_call"; platforms = platforms.linux; description = "A module allowing arbitrary ACPI calls; use case: hybrid video"; + mainProgram = "test_discrete_video_off.sh"; license = licenses.gpl3Plus; }; } diff --git a/pkgs/os-specific/linux/acpi/default.nix b/pkgs/os-specific/linux/acpi/default.nix index d257553299cf..2b661e57c4cd 100644 --- a/pkgs/os-specific/linux/acpi/default.nix +++ b/pkgs/os-specific/linux/acpi/default.nix @@ -11,6 +11,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Show battery status and other ACPI information"; + mainProgram = "acpi"; longDescription = '' Linux ACPI client is a small command-line program that attempts to replicate the functionality of diff --git a/pkgs/os-specific/linux/acpitool/default.nix b/pkgs/os-specific/linux/acpitool/default.nix index d494e95e3db6..317ca54b7cde 100644 --- a/pkgs/os-specific/linux/acpitool/default.nix +++ b/pkgs/os-specific/linux/acpitool/default.nix @@ -44,6 +44,7 @@ in stdenv.mkDerivation rec { meta = { description = "A small, convenient command-line ACPI client with a lot of features"; + mainProgram = "acpitool"; homepage = "https://sourceforge.net/projects/acpitool/"; license = lib.licenses.gpl2Plus; maintainers = [ lib.maintainers.guibert ]; diff --git a/pkgs/os-specific/linux/adcli/default.nix b/pkgs/os-specific/linux/adcli/default.nix index 66e017437f9d..5f94da21f207 100644 --- a/pkgs/os-specific/linux/adcli/default.nix +++ b/pkgs/os-specific/linux/adcli/default.nix @@ -63,6 +63,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://www.freedesktop.org/software/realmd/adcli/adcli.html"; description = "A helper library and tools for Active Directory client operations."; + mainProgram = "adcli"; license = licenses.lgpl21Only; maintainers = with maintainers; [ SohamG anthonyroussel ]; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/amdctl/default.nix b/pkgs/os-specific/linux/amdctl/default.nix index d0a15578857c..abc26aabf784 100644 --- a/pkgs/os-specific/linux/amdctl/default.nix +++ b/pkgs/os-specific/linux/amdctl/default.nix @@ -24,6 +24,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Set P-State voltages and clock speeds on recent AMD CPUs on Linux."; + mainProgram = "amdctl"; homepage = "https://github.com/kevinlekiller/amdctl"; license = licenses.gpl3Plus; maintainers = with maintainers; [ ]; diff --git a/pkgs/os-specific/linux/aseq2json/default.nix b/pkgs/os-specific/linux/aseq2json/default.nix index ac1a8220d564..d828c808037a 100644 --- a/pkgs/os-specific/linux/aseq2json/default.nix +++ b/pkgs/os-specific/linux/aseq2json/default.nix @@ -20,6 +20,7 @@ stdenv.mkDerivation (finalAttrs: { meta = with lib; { description = "Listens for MIDI events on the Alsa sequencer and outputs as JSON to stdout"; + mainProgram = "aseq2json"; homepage = "https://github.com/google/midi-dump-tools"; license = licenses.asl20; maintainers = [ maintainers.queezle ]; diff --git a/pkgs/os-specific/linux/autofs/default.nix b/pkgs/os-specific/linux/autofs/default.nix index 48d12abcf2f5..db0e7b48383f 100644 --- a/pkgs/os-specific/linux/autofs/default.nix +++ b/pkgs/os-specific/linux/autofs/default.nix @@ -52,6 +52,7 @@ stdenv.mkDerivation rec { meta = { description = "Kernel-based automounter"; + mainProgram = "automount"; homepage = "https://www.kernel.org/pub/linux/daemons/autofs/"; license = lib.licenses.gpl2Plus; executables = [ "automount" ]; diff --git a/pkgs/os-specific/linux/batman-adv/batctl.nix b/pkgs/os-specific/linux/batman-adv/batctl.nix index b01f48a242a6..bb44ac5e99f5 100644 --- a/pkgs/os-specific/linux/batman-adv/batctl.nix +++ b/pkgs/os-specific/linux/batman-adv/batctl.nix @@ -21,6 +21,7 @@ stdenv.mkDerivation rec { meta = { homepage = "https://www.open-mesh.org/projects/batman-adv/wiki/Wiki"; description = "B.A.T.M.A.N. routing protocol in a linux kernel module for layer 2, control tool"; + mainProgram = "batctl"; license = lib.licenses.gpl2; maintainers = with lib.maintainers; [ fpletz ]; platforms = with lib.platforms; linux; diff --git a/pkgs/os-specific/linux/beefi/default.nix b/pkgs/os-specific/linux/beefi/default.nix index 959a43faea91..39300b948976 100644 --- a/pkgs/os-specific/linux/beefi/default.nix +++ b/pkgs/os-specific/linux/beefi/default.nix @@ -36,6 +36,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A small script to create bootable EFISTUB kernel images"; + mainProgram = "beefi"; license = licenses.gpl3; platforms = platforms.linux; maintainers = with maintainers; [ tu-maurice ]; diff --git a/pkgs/os-specific/linux/bolt/default.nix b/pkgs/os-specific/linux/bolt/default.nix index f81173095814..11973ba5a570 100644 --- a/pkgs/os-specific/linux/bolt/default.nix +++ b/pkgs/os-specific/linux/bolt/default.nix @@ -93,6 +93,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Thunderbolt 3 device management daemon"; + mainProgram = "boltctl"; homepage = "https://gitlab.freedesktop.org/bolt/bolt"; license = licenses.lgpl21Plus; maintainers = with maintainers; [ callahad ]; diff --git a/pkgs/os-specific/linux/bpfmon/default.nix b/pkgs/os-specific/linux/bpfmon/default.nix index f0815376c2a0..ca59dbde6bb8 100644 --- a/pkgs/os-specific/linux/bpfmon/default.nix +++ b/pkgs/os-specific/linux/bpfmon/default.nix @@ -27,6 +27,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "BPF based visual packet rate monitor"; + mainProgram = "bpfmon"; homepage = "https://github.com/bbonev/bpfmon"; changelog = "https://github.com/bbonev/bpfmon/releases/tag/v${version}"; maintainers = with maintainers; [ arezvov ]; diff --git a/pkgs/os-specific/linux/bpftune/default.nix b/pkgs/os-specific/linux/bpftune/default.nix index 86c706ac2702..517cd04a455d 100644 --- a/pkgs/os-specific/linux/bpftune/default.nix +++ b/pkgs/os-specific/linux/bpftune/default.nix @@ -70,6 +70,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "BPF-based auto-tuning of Linux system parameters"; + mainProgram = "bpftune"; homepage = "https://github.com/oracle-samples/bpftune"; license = licenses.gpl2Only; maintainers = with maintainers; [ nickcao ]; diff --git a/pkgs/os-specific/linux/bridge-utils/default.nix b/pkgs/os-specific/linux/bridge-utils/default.nix index a03cb12727ce..1753be599380 100644 --- a/pkgs/os-specific/linux/bridge-utils/default.nix +++ b/pkgs/os-specific/linux/bridge-utils/default.nix @@ -23,6 +23,7 @@ stdenv.mkDerivation rec { meta = { description = "An userspace tool to configure linux bridges (deprecated in favour or iproute2)."; + mainProgram = "brctl"; homepage = "https://wiki.linuxfoundation.org/networking/bridge"; license = lib.licenses.gpl2Plus; platforms = lib.platforms.linux; diff --git a/pkgs/os-specific/linux/cachefilesd/default.nix b/pkgs/os-specific/linux/cachefilesd/default.nix index 6c52eb4a7f60..12b9e1cf9919 100644 --- a/pkgs/os-specific/linux/cachefilesd/default.nix +++ b/pkgs/os-specific/linux/cachefilesd/default.nix @@ -17,6 +17,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Local network file caching management daemon"; + mainProgram = "cachefilesd"; homepage = "https://people.redhat.com/dhowells/fscache/"; license = licenses.gpl2Plus; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/cannelloni/default.nix b/pkgs/os-specific/linux/cannelloni/default.nix index 0a27c53eefc8..86107d4f7aa0 100644 --- a/pkgs/os-specific/linux/cannelloni/default.nix +++ b/pkgs/os-specific/linux/cannelloni/default.nix @@ -22,6 +22,7 @@ stdenv.mkDerivation (finalAttrs: { meta = with lib; { description = "A SocketCAN over Ethernet tunnel"; + mainProgram = "cannelloni"; homepage = "https://github.com/mguentner/cannelloni"; platforms = platforms.linux; license = licenses.gpl2Only; diff --git a/pkgs/os-specific/linux/catfs/default.nix b/pkgs/os-specific/linux/catfs/default.nix index fb4d21820755..107dce2123db 100644 --- a/pkgs/os-specific/linux/catfs/default.nix +++ b/pkgs/os-specific/linux/catfs/default.nix @@ -41,6 +41,7 @@ rustPlatform.buildRustPackage rec { meta = with lib; { description = "Caching filesystem written in Rust"; + mainProgram = "catfs"; homepage = "https://github.com/kahing/catfs"; license = licenses.asl20; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/checksec/default.nix b/pkgs/os-specific/linux/checksec/default.nix index 07574722cd20..488bfdff1a6a 100644 --- a/pkgs/os-specific/linux/checksec/default.nix +++ b/pkgs/os-specific/linux/checksec/default.nix @@ -97,6 +97,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Tool for checking security bits on executables"; + mainProgram = "checksec"; homepage = "https://www.trapkit.de/tools/checksec/"; license = licenses.bsd3; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/compsize/default.nix b/pkgs/os-specific/linux/compsize/default.nix index 9d0dbeffaee3..441108b0e54f 100644 --- a/pkgs/os-specific/linux/compsize/default.nix +++ b/pkgs/os-specific/linux/compsize/default.nix @@ -23,6 +23,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "btrfs: Find compression type/ratio on a file or set of files"; + mainProgram = "compsize"; homepage = "https://github.com/kilobyte/compsize"; license = licenses.gpl2Plus; maintainers = with maintainers; [ CrazedProgrammer ]; diff --git a/pkgs/os-specific/linux/conky/default.nix b/pkgs/os-specific/linux/conky/default.nix index 32eef7f9e26a..0818850f7549 100644 --- a/pkgs/os-specific/linux/conky/default.nix +++ b/pkgs/os-specific/linux/conky/default.nix @@ -148,6 +148,7 @@ stdenv.mkDerivation rec { homepage = "https://conky.cc"; changelog = "https://github.com/brndnmtthws/conky/releases/tag/v${version}"; description = "Advanced, highly configurable system monitor based on torsmo"; + mainProgram = "conky"; maintainers = [ maintainers.guibert ]; license = licenses.gpl3Plus; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/conspy/default.nix b/pkgs/os-specific/linux/conspy/default.nix index 00e97855e261..19b1565e435d 100644 --- a/pkgs/os-specific/linux/conspy/default.nix +++ b/pkgs/os-specific/linux/conspy/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Linux text console viewer"; + mainProgram = "conspy"; license = licenses.epl10; maintainers = with maintainers; [ raskin ]; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/cpupower-gui/default.nix b/pkgs/os-specific/linux/cpupower-gui/default.nix index 1f57bc9428f0..02a781d1f0cf 100644 --- a/pkgs/os-specific/linux/cpupower-gui/default.nix +++ b/pkgs/os-specific/linux/cpupower-gui/default.nix @@ -96,6 +96,7 @@ buildPythonApplication rec { meta = with lib; { description = "Change the frequency limits of your cpu and its governor"; + mainProgram = "cpupower-gui"; homepage = "https://github.com/vagnum08/cpupower-gui/"; license = licenses.gpl3Plus; maintainers = with maintainers; [ unode ]; diff --git a/pkgs/os-specific/linux/cpustat/default.nix b/pkgs/os-specific/linux/cpustat/default.nix index e5bbd388081e..3fb0e8e123a9 100644 --- a/pkgs/os-specific/linux/cpustat/default.nix +++ b/pkgs/os-specific/linux/cpustat/default.nix @@ -21,6 +21,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "CPU usage monitoring tool"; + mainProgram = "cpustat"; homepage = "https://github.com/ColinIanKing/cpustat"; license = licenses.gpl2; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/cramfsswap/default.nix b/pkgs/os-specific/linux/cramfsswap/default.nix index f79921186388..c696df6f0084 100644 --- a/pkgs/os-specific/linux/cramfsswap/default.nix +++ b/pkgs/os-specific/linux/cramfsswap/default.nix @@ -24,6 +24,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Swap endianess of a cram filesystem (cramfs)"; + mainProgram = "cramfsswap"; homepage = "https://packages.debian.org/sid/utils/cramfsswap"; license = licenses.gpl2Only; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/cshatag/default.nix b/pkgs/os-specific/linux/cshatag/default.nix index 84de0c5dd11d..70fd5ccbb695 100644 --- a/pkgs/os-specific/linux/cshatag/default.nix +++ b/pkgs/os-specific/linux/cshatag/default.nix @@ -22,6 +22,7 @@ buildGoModule rec { meta = with lib; { description = "A tool to detect silent data corruption"; + mainProgram = "cshatag"; homepage = "https://github.com/rfjakob/cshatag"; license = licenses.mit; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/dcgm/default.nix b/pkgs/os-specific/linux/dcgm/default.nix index f3ebdf1427eb..cc9e26d2b707 100644 --- a/pkgs/os-specific/linux/dcgm/default.nix +++ b/pkgs/os-specific/linux/dcgm/default.nix @@ -105,10 +105,10 @@ in gcc11Stdenv.mkDerivation rec { strictDeps = true; nativeBuildInputs = [ - # autoAddOpenGLRunpathHook does not actually depend on or incur any dependency + # autoAddDriverRunpath does not actually depend on or incur any dependency # of cudaPackages. It merely adds an impure, non-Nix PATH to the RPATHs of # executables that need to use cuda at runtime. - cudaPackages_12.autoAddOpenGLRunpathHook + cudaPackages_12.autoAddDriverRunpath cmake git diff --git a/pkgs/os-specific/linux/devmem2/default.nix b/pkgs/os-specific/linux/devmem2/default.nix index fbf47204b3e6..88a3877c37f2 100644 --- a/pkgs/os-specific/linux/devmem2/default.nix +++ b/pkgs/os-specific/linux/devmem2/default.nix @@ -21,6 +21,7 @@ stdenv.mkDerivation { meta = with lib; { description = "Simple program to read/write from/to any location in memory"; + mainProgram = "devmem2"; homepage = "http://lartmaker.nl/lartware/port/"; license = licenses.gpl2Plus; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/disk-indicator/default.nix b/pkgs/os-specific/linux/disk-indicator/default.nix index f5c7f3bc774e..e0e238fd3560 100644 --- a/pkgs/os-specific/linux/disk-indicator/default.nix +++ b/pkgs/os-specific/linux/disk-indicator/default.nix @@ -41,6 +41,7 @@ stdenv.mkDerivation { meta = { homepage = "https://github.com/MeanEYE/Disk-Indicator"; description = "A program that will turn a LED into a hard disk indicator"; + mainProgram = "disk_indicator"; longDescription = '' Small program for Linux that will turn your Scroll, Caps or Num Lock LED or LED on your ThinkPad laptop into a hard disk activity indicator. diff --git a/pkgs/os-specific/linux/dpdk-kmods/default.nix b/pkgs/os-specific/linux/dpdk-kmods/default.nix index a3e4f6663860..1dc026125c3d 100644 --- a/pkgs/os-specific/linux/dpdk-kmods/default.nix +++ b/pkgs/os-specific/linux/dpdk-kmods/default.nix @@ -2,20 +2,13 @@ stdenv.mkDerivation rec { pname = "dpdk-kmods"; - version = "2022-08-29"; + version = "2023-02-05"; src = fetchzip { - url = "https://git.dpdk.org/dpdk-kmods/snapshot/dpdk-kmods-4a589f7bed00fc7009c93d430bd214ac7ad2bb6b.tar.xz"; - sha256 = "sha256-l9asJuw2nl63I1BxK6udy2pNunRiMJxyoXeg9V5+WgI="; + url = "https://git.dpdk.org/dpdk-kmods/snapshot/dpdk-kmods-e721c733cd24206399bebb8f0751b0387c4c1595.tar.xz"; + sha256 = "sha256-AG5Lthp+CPR4R7I23DUmoWAmET8gLEFHHdjk2TUbQn4="; }; - patches = [ - (fetchpatch { - url = "https://git.launchpad.net/ubuntu/+source/dpdk-kmods/plain/debian/patches/0001-support-linux-5.18.patch?id=9d628c02c169d8190bc2cb6afd81e4d364c382cd"; - sha256 = "sha256-j4kpx1DOnmf5lFxOhaVFNT7prEy1jrJERX2NFaybTPU="; - }) - ]; - hardeningDisable = [ "pic" ]; makeFlags = kernel.makeFlags ++ [ @@ -39,5 +32,6 @@ stdenv.mkDerivation rec { license = licenses.gpl2Only; maintainers = [ maintainers.mic92 ]; platforms = platforms.linux; + broken = kernel.isHardened; }; } diff --git a/pkgs/os-specific/linux/dpdk/default.nix b/pkgs/os-specific/linux/dpdk/default.nix index c92f40e3935f..bd5d9db661a8 100644 --- a/pkgs/os-specific/linux/dpdk/default.nix +++ b/pkgs/os-specific/linux/dpdk/default.nix @@ -1,8 +1,7 @@ { stdenv, lib -, kernel , fetchurl , pkg-config, meson, ninja, makeWrapper -, libbsd, numactl, libbpf, zlib, libelf, jansson, openssl, libpcap, rdma-core +, libbsd, numactl, libbpf, zlib, elfutils, jansson, openssl, libpcap, rdma-core , doxygen, python3, pciutils , withExamples ? [] , shared ? false @@ -13,16 +12,13 @@ ) }: -let - mod = kernel != null; - dpdkVersion = "23.07"; -in stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "dpdk"; - version = "${dpdkVersion}" + lib.optionalString mod "-${kernel.version}"; + version = "23.11"; src = fetchurl { - url = "https://fast.dpdk.org/rel/dpdk-${dpdkVersion}.tar.xz"; - sha256 = "sha256-4IYU6K65KUB9c9cWmZKJpE70A0NSJx8JOX7vkysjs9Y="; + url = "https://fast.dpdk.org/rel/dpdk-${version}.tar.xz"; + sha256 = "sha256-ZPpY/fyelRDo5BTjvt0WW9PUykZaIxsoAyP4PNU/2GU="; }; nativeBuildInputs = [ @@ -38,13 +34,13 @@ in stdenv.mkDerivation { buildInputs = [ jansson libbpf - libelf + elfutils libpcap numactl openssl.dev zlib python3 - ] ++ lib.optionals mod kernel.moduleBuildDependencies; + ]; propagatedBuildInputs = [ # Propagated to support current DPDK users in nixpkgs which statically link @@ -56,21 +52,15 @@ in stdenv.mkDerivation { postPatch = '' patchShebangs config/arm buildtools - '' + lib.optionalString mod '' - # kernel_install_dir is hardcoded to `/lib/modules`; patch that. - sed -i "s,kernel_install_dir *= *['\"].*,kernel_install_dir = '$kmod/lib/modules/${kernel.modDirVersion}'," kernel/linux/meson.build ''; mesonFlags = [ "-Dtests=false" "-Denable_docs=true" - "-Denable_kmods=${lib.boolToString mod}" + "-Ddeveloper_mode=disabled" ] - # kni kernel driver is currently not compatble with 5.11 - ++ lib.optional (mod && kernel.kernelOlder "5.11") "-Ddisable_drivers=kni" ++ [(if shared then "-Ddefault_library=shared" else "-Ddefault_library=static")] ++ lib.optional (machine != null) "-Dmachine=${machine}" - ++ lib.optional mod "-Dkernel_dir=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ++ lib.optional (withExamples != []) "-Dexamples=${builtins.concatStringsSep "," withExamples}"; postInstall = '' @@ -87,7 +77,6 @@ in stdenv.mkDerivation { outputs = [ "out" "doc" ] - ++ lib.optional mod "kmod" ++ lib.optional (withExamples != []) "examples"; meta = with lib; { @@ -96,6 +85,5 @@ in stdenv.mkDerivation { license = with licenses; [ lgpl21 gpl2 bsd2 ]; platforms = platforms.linux; maintainers = with maintainers; [ magenbluten orivej mic92 zhaofengli ]; - broken = mod && kernel.isHardened; }; } diff --git a/pkgs/os-specific/linux/dstat/default.nix b/pkgs/os-specific/linux/dstat/default.nix index d79f9f4c61bf..75b613075e78 100644 --- a/pkgs/os-specific/linux/dstat/default.nix +++ b/pkgs/os-specific/linux/dstat/default.nix @@ -34,6 +34,7 @@ python3Packages.buildPythonApplication rec { meta = with lib; { homepage = "http://dag.wieers.com/home-made/dstat/"; description = "Versatile resource statistics tool"; + mainProgram = "dstat"; license = licenses.gpl2; platforms = platforms.linux; maintainers = with maintainers; [ ]; diff --git a/pkgs/os-specific/linux/earlyoom/default.nix b/pkgs/os-specific/linux/earlyoom/default.nix index ad7468bac0f5..d1d95b4d3f95 100644 --- a/pkgs/os-specific/linux/earlyoom/default.nix +++ b/pkgs/os-specific/linux/earlyoom/default.nix @@ -29,6 +29,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Early OOM Daemon for Linux"; + mainProgram = "earlyoom"; homepage = "https://github.com/rfjakob/earlyoom"; license = licenses.mit; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/ell/default.nix b/pkgs/os-specific/linux/ell/default.nix index 59f2a6965daf..9175f477bd60 100644 --- a/pkgs/os-specific/linux/ell/default.nix +++ b/pkgs/os-specific/linux/ell/default.nix @@ -9,14 +9,14 @@ stdenv.mkDerivation rec { pname = "ell"; - version = "0.62"; + version = "0.63"; outputs = [ "out" "dev" ]; src = fetchgit { url = "https://git.kernel.org/pub/scm/libs/ell/ell.git"; rev = version; - hash = "sha256-HgYwyE0jejEzg9LorjDz7F0GbiXUfYpKNJ+tFIBbYWA="; + hash = "sha256-husK3eurfL1NhRHgJUdFP6sYLqeZ4NSHa/tU8PUWmGo="; }; nativeBuildInputs = [ diff --git a/pkgs/os-specific/linux/ethq/default.nix b/pkgs/os-specific/linux/ethq/default.nix index d103604294a4..5936447ac935 100644 --- a/pkgs/os-specific/linux/ethq/default.nix +++ b/pkgs/os-specific/linux/ethq/default.nix @@ -24,6 +24,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Ethernet NIC Queue stats viewer"; + mainProgram = "ethq"; homepage = "https://github.com/isc-projects/ethq"; license = licenses.mpl20; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/eventstat/default.nix b/pkgs/os-specific/linux/eventstat/default.nix index 0de1ded83543..3c551939c7cf 100644 --- a/pkgs/os-specific/linux/eventstat/default.nix +++ b/pkgs/os-specific/linux/eventstat/default.nix @@ -20,6 +20,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Simple monitoring of system events"; + mainProgram = "eventstat"; homepage = "https://github.com/ColinIanKing/eventstat"; license = licenses.gpl2; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/fan2go/default.nix b/pkgs/os-specific/linux/fan2go/default.nix index c7176183018a..cb8ff5a84b74 100644 --- a/pkgs/os-specific/linux/fan2go/default.nix +++ b/pkgs/os-specific/linux/fan2go/default.nix @@ -23,6 +23,7 @@ buildGoModule rec { meta = with lib; { description = "A simple daemon providing dynamic fan speed control based on temperature sensors"; + mainProgram = "fan2go"; homepage = "https://github.com/markusressel/fan2go"; license = licenses.agpl3Plus; maintainers = with maintainers; [ mtoohey ]; diff --git a/pkgs/os-specific/linux/fanctl/default.nix b/pkgs/os-specific/linux/fanctl/default.nix index d8769b0f04de..f55779bd9165 100644 --- a/pkgs/os-specific/linux/fanctl/default.nix +++ b/pkgs/os-specific/linux/fanctl/default.nix @@ -15,6 +15,7 @@ rustPlatform.buildRustPackage rec { meta = with lib; { description = "Replacement for fancontrol with more fine-grained control interface in its config file"; + mainProgram = "fanctl"; homepage = "https://gitlab.com/mcoffin/fanctl"; license = licenses.gpl3Only; maintainers = with maintainers; [ icewind1991 ]; diff --git a/pkgs/os-specific/linux/fbterm/default.nix b/pkgs/os-specific/linux/fbterm/default.nix index f762eca36beb..8704c72a21ba 100644 --- a/pkgs/os-specific/linux/fbterm/default.nix +++ b/pkgs/os-specific/linux/fbterm/default.nix @@ -96,6 +96,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Framebuffer terminal emulator"; + mainProgram = "fbterm"; homepage = "https://salsa.debian.org/debian/fbterm"; maintainers = with maintainers; [ lovesegfault raskin ]; license = licenses.gpl2; diff --git a/pkgs/os-specific/linux/firmware/b43-firmware-cutter/default.nix b/pkgs/os-specific/linux/firmware/b43-firmware-cutter/default.nix index fe7a3e9ae406..65e259667516 100644 --- a/pkgs/os-specific/linux/firmware/b43-firmware-cutter/default.nix +++ b/pkgs/os-specific/linux/firmware/b43-firmware-cutter/default.nix @@ -18,8 +18,9 @@ stdenv.mkDerivation rec { meta = { description = "Firmware extractor for cards supported by the b43 kernel module"; + mainProgram = "b43-fwcutter"; homepage = "http://wireless.kernel.org/en/users/Drivers/b43"; - license = lib.licenses.free; + license = lib.licenses.bsd2; platforms = lib.platforms.linux; }; } diff --git a/pkgs/os-specific/linux/firmware/bt-fw-converter/default.nix b/pkgs/os-specific/linux/firmware/bt-fw-converter/default.nix index a28189a9e474..988aabd85779 100644 --- a/pkgs/os-specific/linux/firmware/bt-fw-converter/default.nix +++ b/pkgs/os-specific/linux/firmware/bt-fw-converter/default.nix @@ -28,6 +28,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://github.com/winterheart/broadcom-bt-firmware/"; description = "A tool that converts hex to hcd based on inf file"; + mainProgram = "bt-fw-converter"; license = licenses.mit; platforms = platforms.linux; maintainers = with maintainers; [ zraexy ]; diff --git a/pkgs/os-specific/linux/firmware/firmware-updater/default.nix b/pkgs/os-specific/linux/firmware/firmware-updater/default.nix index 2b280c72b1ca..98b9ff5d3388 100644 --- a/pkgs/os-specific/linux/firmware/firmware-updater/default.nix +++ b/pkgs/os-specific/linux/firmware/firmware-updater/default.nix @@ -36,6 +36,7 @@ flutter.buildFlutterApplication rec { meta = with lib; { description = "Firmware Updater for Linux"; + mainProgram = "firmware-updater"; homepage = "https://github.com/canonical/firmware-updater"; license = licenses.gpl3Only; maintainers = with maintainers; [ mkg20001 ]; diff --git a/pkgs/os-specific/linux/firmware/ivsc-firmware/default.nix b/pkgs/os-specific/linux/firmware/ivsc-firmware/default.nix index 1a90380838a9..e2f2fd4f9fee 100644 --- a/pkgs/os-specific/linux/firmware/ivsc-firmware/default.nix +++ b/pkgs/os-specific/linux/firmware/ivsc-firmware/default.nix @@ -23,6 +23,13 @@ stdenv.mkDerivation { cp --no-preserve=mode --recursive ./firmware/* $out/lib/firmware/vsc/ install -D ./LICENSE $out/share/doc + mkdir -p $out/lib/firmware/vsc/soc_a1_prod + # According to Intel's documentation for prod platform the a1_prod postfix is need it (https://github.com/intel/ivsc-firmware) + # This fixes ipu6 webcams + for file in $out/lib/firmware/vsc/*.bin; do + ln -sf "$file" "$out/lib/firmware/vsc/soc_a1_prod/$(basename "$file" .bin)_a1_prod.bin" + done + runHook postInstall ''; diff --git a/pkgs/os-specific/linux/fnotifystat/default.nix b/pkgs/os-specific/linux/fnotifystat/default.nix index c943ce26f91e..18afaaa6d29b 100644 --- a/pkgs/os-specific/linux/fnotifystat/default.nix +++ b/pkgs/os-specific/linux/fnotifystat/default.nix @@ -22,6 +22,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "File activity monitoring tool"; + mainProgram = "fnotifystat"; homepage = "https://github.com/ColinIanKing/fnotifystat"; license = licenses.gpl2Plus; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/forkstat/default.nix b/pkgs/os-specific/linux/forkstat/default.nix index c87c69c07708..75ca64833a59 100644 --- a/pkgs/os-specific/linux/forkstat/default.nix +++ b/pkgs/os-specific/linux/forkstat/default.nix @@ -19,6 +19,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Process fork/exec/exit monitoring tool"; + mainProgram = "forkstat"; homepage = "https://github.com/ColinIanKing/forkstat"; license = licenses.gpl2; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/freefall/default.nix b/pkgs/os-specific/linux/freefall/default.nix index 683b599e5beb..bad4849ca0bf 100644 --- a/pkgs/os-specific/linux/freefall/default.nix +++ b/pkgs/os-specific/linux/freefall/default.nix @@ -19,6 +19,7 @@ stdenv.mkDerivation { inherit (kernel.meta) homepage license; description = "Free-fall protection for spinning HP/Dell laptop hard drives"; + mainProgram = "freefall"; longDescription = '' Provides a shock protection facility in modern laptops with spinning hard drives, by stopping all input/output operations on the internal hard drive diff --git a/pkgs/os-specific/linux/fscrypt/default.nix b/pkgs/os-specific/linux/fscrypt/default.nix index fd925ab654fa..8b54a1f9a745 100644 --- a/pkgs/os-specific/linux/fscrypt/default.nix +++ b/pkgs/os-specific/linux/fscrypt/default.nix @@ -41,6 +41,7 @@ buildGoModule rec { meta = with lib; { description = "A high-level tool for the management of Linux filesystem encryption"; + mainProgram = "fscrypt"; longDescription = '' This tool manages metadata, key generation, key wrapping, PAM integration, and provides a uniform interface for creating and modifying encrypted diff --git a/pkgs/os-specific/linux/fscryptctl/default.nix b/pkgs/os-specific/linux/fscryptctl/default.nix index 2a2a9b41c9c2..4b38913b7122 100644 --- a/pkgs/os-specific/linux/fscryptctl/default.nix +++ b/pkgs/os-specific/linux/fscryptctl/default.nix @@ -17,6 +17,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Small C tool for Linux filesystem encryption"; + mainProgram = "fscryptctl"; longDescription = '' fscryptctl is a low-level tool written in C that handles raw keys and manages policies for Linux filesystem encryption, specifically the diff --git a/pkgs/os-specific/linux/fsverity-utils/default.nix b/pkgs/os-specific/linux/fsverity-utils/default.nix index b0b6286c8cfa..232fc1470465 100644 --- a/pkgs/os-specific/linux/fsverity-utils/default.nix +++ b/pkgs/os-specific/linux/fsverity-utils/default.nix @@ -43,6 +43,7 @@ stdenv.mkDerivation rec { homepage = "https://www.kernel.org/doc/html/latest/filesystems/fsverity.html#userspace-utility"; changelog = "https://git.kernel.org/pub/scm/fs/fsverity/fsverity-utils.git/tree/NEWS.md"; description = "A set of userspace utilities for fs-verity"; + mainProgram = "fsverity"; license = licenses.mit; maintainers = with maintainers; [ jk ]; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/fswebcam/default.nix b/pkgs/os-specific/linux/fswebcam/default.nix index 678e0d428419..1f45d7955da4 100644 --- a/pkgs/os-specific/linux/fswebcam/default.nix +++ b/pkgs/os-specific/linux/fswebcam/default.nix @@ -14,6 +14,7 @@ stdenv.mkDerivation rec { meta = { description = "Neat and simple webcam app"; + mainProgram = "fswebcam"; homepage = "http://www.sanslogic.co.uk/fswebcam"; platforms = lib.platforms.linux; license = lib.licenses.gpl2; diff --git a/pkgs/os-specific/linux/ftop/default.nix b/pkgs/os-specific/linux/ftop/default.nix index abd6d7884619..b199c84b9fb5 100644 --- a/pkgs/os-specific/linux/ftop/default.nix +++ b/pkgs/os-specific/linux/ftop/default.nix @@ -23,6 +23,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Show progress of open files and file systems"; + mainProgram = "ftop"; homepage = "https://code.google.com/archive/p/ftop/"; license = licenses.gpl3Plus; longDescription = '' diff --git a/pkgs/os-specific/linux/fxload/default.nix b/pkgs/os-specific/linux/fxload/default.nix index e8b9d0648bd8..a4b204b571d4 100644 --- a/pkgs/os-specific/linux/fxload/default.nix +++ b/pkgs/os-specific/linux/fxload/default.nix @@ -24,6 +24,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://github.com/libusb/libusb"; description = "Tool to upload firmware to into an21, fx, fx2, fx2lp and fx3 ez-usb devices"; + mainProgram = "fxload"; license = licenses.gpl2Only; platforms = platforms.linux; maintainers = with maintainers; [ realsnick ]; diff --git a/pkgs/os-specific/linux/g15daemon/default.nix b/pkgs/os-specific/linux/g15daemon/default.nix index 823f523db242..90a818be4947 100644 --- a/pkgs/os-specific/linux/g15daemon/default.nix +++ b/pkgs/os-specific/linux/g15daemon/default.nix @@ -88,6 +88,7 @@ stdenv.mkDerivation rec { meta = { description = "A daemon that makes it possible to use the Logitech keyboard G-Buttons and draw on various Logitech LCDs"; + mainProgram = "g15daemon"; inherit license maintainers; }; } diff --git a/pkgs/os-specific/linux/gfxtablet/default.nix b/pkgs/os-specific/linux/gfxtablet/default.nix index 608ca8e58cc5..3ee35844f999 100644 --- a/pkgs/os-specific/linux/gfxtablet/default.nix +++ b/pkgs/os-specific/linux/gfxtablet/default.nix @@ -26,6 +26,7 @@ stdenv.mkDerivation rec { meta = { description = "Uinput driver for Android GfxTablet tablet-as-input-device app"; + mainProgram = "networktablet"; license = lib.licenses.mit ; maintainers = [lib.maintainers.raskin]; platforms = lib.platforms.linux; diff --git a/pkgs/os-specific/linux/google-authenticator/default.nix b/pkgs/os-specific/linux/google-authenticator/default.nix index fcf75ac7821a..02ca3d30d238 100644 --- a/pkgs/os-specific/linux/google-authenticator/default.nix +++ b/pkgs/os-specific/linux/google-authenticator/default.nix @@ -27,6 +27,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://github.com/google/google-authenticator-libpam"; description = "Two-step verification, with pam module"; + mainProgram = "google-authenticator"; license = licenses.asl20; maintainers = with maintainers; [ aneeshusa ]; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/gpu-switch/default.nix b/pkgs/os-specific/linux/gpu-switch/default.nix index 17452a5e2446..d6f749aa8f1e 100644 --- a/pkgs/os-specific/linux/gpu-switch/default.nix +++ b/pkgs/os-specific/linux/gpu-switch/default.nix @@ -15,6 +15,7 @@ stdenv.mkDerivation { ''; meta = with lib; { description = "Application that allows to switch between the graphic cards of dual-GPU MacBook Pro models"; + mainProgram = "gpu-switch"; homepage = "https://github.com/0xbb/gpu-switch"; license = licenses.mit; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/gt/default.nix b/pkgs/os-specific/linux/gt/default.nix index 85897b72585e..9d35556358b5 100644 --- a/pkgs/os-specific/linux/gt/default.nix +++ b/pkgs/os-specific/linux/gt/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation (finalAttrs: { meta = { description = "Linux command line tool for setting up USB gadgets using configfs"; + mainProgram = "gt"; license = with lib.licenses; [ asl20 ]; maintainers = with lib.maintainers; [ lheckemann ]; platforms = lib.platforms.linux; diff --git a/pkgs/os-specific/linux/guvcview/default.nix b/pkgs/os-specific/linux/guvcview/default.nix index 6e073662c4e6..e08203873011 100644 --- a/pkgs/os-specific/linux/guvcview/default.nix +++ b/pkgs/os-specific/linux/guvcview/default.nix @@ -70,6 +70,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A simple interface for devices supported by the linux UVC driver"; + mainProgram = "guvcview"; homepage = "https://guvcview.sourceforge.net"; maintainers = [ maintainers.coconnor ]; license = licenses.gpl3; diff --git a/pkgs/os-specific/linux/hd-idle/default.nix b/pkgs/os-specific/linux/hd-idle/default.nix index 13cb397b1798..7c2ac2894a55 100644 --- a/pkgs/os-specific/linux/hd-idle/default.nix +++ b/pkgs/os-specific/linux/hd-idle/default.nix @@ -21,6 +21,7 @@ buildGoModule rec { meta = with lib; { description = "Spins down external disks after a period of idle time"; + mainProgram = "hd-idle"; homepage = "https://github.com/adelolmo/hd-idle"; license = licenses.gpl3Plus; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/hdapsd/default.nix b/pkgs/os-specific/linux/hdapsd/default.nix index 959fa9ac6e8a..e9dca6fd8927 100644 --- a/pkgs/os-specific/linux/hdapsd/default.nix +++ b/pkgs/os-specific/linux/hdapsd/default.nix @@ -13,6 +13,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Hard Drive Active Protection System Daemon"; + mainProgram = "hdapsd"; homepage = "http://hdaps.sf.net/"; license = licenses.gpl2; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/health-check/default.nix b/pkgs/os-specific/linux/health-check/default.nix index b8737eb15302..e63b7ca7fe25 100644 --- a/pkgs/os-specific/linux/health-check/default.nix +++ b/pkgs/os-specific/linux/health-check/default.nix @@ -23,6 +23,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Process monitoring tool"; + mainProgram = "health-check"; homepage = "https://github.com/ColinIanKing/health-check"; license = licenses.gpl2; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/hibernate/default.nix b/pkgs/os-specific/linux/hibernate/default.nix index 1a7dd01e9771..71a93e4a154e 100644 --- a/pkgs/os-specific/linux/hibernate/default.nix +++ b/pkgs/os-specific/linux/hibernate/default.nix @@ -33,6 +33,7 @@ in meta = { description = "The `hibernate' script for swsusp and Tux-on-Ice"; + mainProgram = "hibernate"; longDescription = '' This package provides the `hibernate' script, a command-line utility that saves the computer's state to disk and switches it off, turning diff --git a/pkgs/os-specific/linux/hwdata/default.nix b/pkgs/os-specific/linux/hwdata/default.nix index 7aeea8a8b59a..f7303b182ec7 100644 --- a/pkgs/os-specific/linux/hwdata/default.nix +++ b/pkgs/os-specific/linux/hwdata/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "hwdata"; - version = "0.379"; + version = "0.380"; src = fetchFromGitHub { owner = "vcrhonek"; repo = "hwdata"; rev = "v${version}"; - hash = "sha256-6IMvnXP9uy8kAKRyzV/raZzUnpVCzp7SHnGt8qDUDXY="; + hash = "sha256-Ioa0tUiwgOZO3qrtwAr9A/yGfYTBk83OON8Sr47J9Mg="; }; configureFlags = [ "--datadir=${placeholder "out"}/share" ]; diff --git a/pkgs/os-specific/linux/hyperv-daemons/default.nix b/pkgs/os-specific/linux/hyperv-daemons/default.nix index 12033063c165..619318d7e04c 100644 --- a/pkgs/os-specific/linux/hyperv-daemons/default.nix +++ b/pkgs/os-specific/linux/hyperv-daemons/default.nix @@ -97,6 +97,7 @@ in stdenv.mkDerivation { meta = with lib; { description = "Integration Services for running NixOS under HyperV"; + mainProgram = "lsvmbus"; longDescription = '' This packages contains the daemons that are used by the Hyper-V hypervisor on the host. diff --git a/pkgs/os-specific/linux/i7z/default.nix b/pkgs/os-specific/linux/i7z/default.nix index 9af2aba3d806..9bd5ca302da3 100644 --- a/pkgs/os-specific/linux/i7z/default.nix +++ b/pkgs/os-specific/linux/i7z/default.nix @@ -48,6 +48,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A better i7 (and now i3, i5) reporting tool for Linux"; + mainProgram = "i7z"; homepage = "https://github.com/DimitryAndric/i7z"; license = licenses.gpl2; maintainers = with maintainers; [ bluescreen303 ]; diff --git a/pkgs/os-specific/linux/ifenslave/default.nix b/pkgs/os-specific/linux/ifenslave/default.nix index d23fc101bcc0..cc132c69faf7 100644 --- a/pkgs/os-specific/linux/ifenslave/default.nix +++ b/pkgs/os-specific/linux/ifenslave/default.nix @@ -22,6 +22,7 @@ stdenv.mkDerivation rec { meta = { description = "Utility for enslaving networking interfaces under a bond"; + mainProgram = "ifenslave"; license = lib.licenses.gpl2; platforms = lib.platforms.linux; }; diff --git a/pkgs/os-specific/linux/iio-sensor-proxy/default.nix b/pkgs/os-specific/linux/iio-sensor-proxy/default.nix index 3da9396d618e..38c30dc43687 100644 --- a/pkgs/os-specific/linux/iio-sensor-proxy/default.nix +++ b/pkgs/os-specific/linux/iio-sensor-proxy/default.nix @@ -52,6 +52,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Proxy for sending IIO sensor data to D-Bus"; + mainProgram = "monitor-sensor"; homepage = "https://gitlab.freedesktop.org/hadess/iio-sensor-proxy"; license = licenses.gpl3; maintainers = with maintainers; [ _999eagle ]; diff --git a/pkgs/os-specific/linux/ima-evm-utils/default.nix b/pkgs/os-specific/linux/ima-evm-utils/default.nix index 34889783034c..fa90ceecdb2b 100644 --- a/pkgs/os-specific/linux/ima-evm-utils/default.nix +++ b/pkgs/os-specific/linux/ima-evm-utils/default.nix @@ -38,6 +38,7 @@ stdenv.mkDerivation rec { meta = { description = "evmctl utility to manage digital signatures of the Linux kernel integrity subsystem (IMA/EVM)"; + mainProgram = "evmctl"; homepage = "https://sourceforge.net/projects/linux-ima/"; license = lib.licenses.gpl2; platforms = lib.platforms.linux; diff --git a/pkgs/os-specific/linux/intel-compute-runtime/default.nix b/pkgs/os-specific/linux/intel-compute-runtime/default.nix index 073714bd57a0..c175916b9008 100644 --- a/pkgs/os-specific/linux/intel-compute-runtime/default.nix +++ b/pkgs/os-specific/linux/intel-compute-runtime/default.nix @@ -52,6 +52,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Intel Graphics Compute Runtime for OpenCL. Replaces Beignet for Gen8 (Broadwell) and beyond"; + mainProgram = "ocloc"; homepage = "https://github.com/intel/compute-runtime"; changelog = "https://github.com/intel/compute-runtime/releases/tag/${version}"; license = licenses.mit; diff --git a/pkgs/os-specific/linux/intel-speed-select/default.nix b/pkgs/os-specific/linux/intel-speed-select/default.nix index 2caad335d57c..9d9c9b134c64 100644 --- a/pkgs/os-specific/linux/intel-speed-select/default.nix +++ b/pkgs/os-specific/linux/intel-speed-select/default.nix @@ -13,6 +13,7 @@ stdenv.mkDerivation { meta = with lib; { description = "Tool to enumerate and control the Intel Speed Select Technology features"; + mainProgram = "intel-speed-select"; homepage = "https://www.kernel.org/"; license = licenses.gpl2; platforms = [ "i686-linux" "x86_64-linux" ]; # x86-specific diff --git a/pkgs/os-specific/linux/ipp-usb/default.nix b/pkgs/os-specific/linux/ipp-usb/default.nix index 38d9afddaca6..d02018f570c4 100644 --- a/pkgs/os-specific/linux/ipp-usb/default.nix +++ b/pkgs/os-specific/linux/ipp-usb/default.nix @@ -1,13 +1,13 @@ { buildGoModule, avahi, libusb1, pkg-config, lib, fetchFromGitHub, ronn }: buildGoModule rec { pname = "ipp-usb"; - version = "0.9.24"; + version = "0.9.25"; src = fetchFromGitHub { owner = "openprinting"; repo = "ipp-usb"; rev = version; - sha256 = "sha256-06Kb4s9oN53llz/Yya45ig5rd86VvlcK+vRh3bL/MAw="; + sha256 = "sha256-ryKQDzb31JA192lbCYkwJrXgwErViqIzP4mD2NmWdgA="; }; postPatch = '' @@ -34,6 +34,7 @@ buildGoModule rec { meta = { description = "Daemon to use the IPP everywhere protocol with USB printers"; + mainProgram = "ipp-usb"; homepage = "https://github.com/OpenPrinting/ipp-usb"; maintainers = [ lib.maintainers.symphorien ]; platforms = lib.platforms.linux; diff --git a/pkgs/os-specific/linux/iptstate/default.nix b/pkgs/os-specific/linux/iptstate/default.nix index 4e3693aba6f1..d1e193f831ca 100644 --- a/pkgs/os-specific/linux/iptstate/default.nix +++ b/pkgs/os-specific/linux/iptstate/default.nix @@ -13,6 +13,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Conntrack top like tool"; + mainProgram = "iptstate"; homepage = "https://github.com/jaymzh/iptstate"; platforms = platforms.linux; maintainers = with maintainers; [ trevorj ]; diff --git a/pkgs/os-specific/linux/iw/default.nix b/pkgs/os-specific/linux/iw/default.nix index bf7cb025bc1c..4c1d94f02e6b 100644 --- a/pkgs/os-specific/linux/iw/default.nix +++ b/pkgs/os-specific/linux/iw/default.nix @@ -16,6 +16,7 @@ stdenv.mkDerivation rec { meta = { description = "Tool to use nl80211"; + mainProgram = "iw"; longDescription = '' iw is a new nl80211 based CLI configuration utility for wireless devices. It supports all new drivers that have been added to the kernel recently. diff --git a/pkgs/os-specific/linux/iwd/default.nix b/pkgs/os-specific/linux/iwd/default.nix index ccaf54759d85..a15d21f2c3a1 100644 --- a/pkgs/os-specific/linux/iwd/default.nix +++ b/pkgs/os-specific/linux/iwd/default.nix @@ -13,12 +13,12 @@ stdenv.mkDerivation rec { pname = "iwd"; - version = "2.14"; + version = "2.16"; src = fetchgit { url = "https://git.kernel.org/pub/scm/network/wireless/iwd.git"; rev = version; - hash = "sha256-35hKb8IVL8jQG80y48a5CcozUEWxLCdTqAHhZlPFCYE="; + hash = "sha256-YWtiI2HkGyIdUeBXerQtN5UvgaMaUs9eoG88ZUQRrDg="; }; outputs = [ "out" "man" "doc" ] diff --git a/pkgs/os-specific/linux/joycond/default.nix b/pkgs/os-specific/linux/joycond/default.nix index e60e661f0c44..5edc227732f8 100644 --- a/pkgs/os-specific/linux/joycond/default.nix +++ b/pkgs/os-specific/linux/joycond/default.nix @@ -33,6 +33,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://github.com/DanielOgorchock/joycond"; description = "Userspace daemon to combine joy-cons from the hid-nintendo kernel driver"; + mainProgram = "joycond"; license = licenses.gpl3Only; maintainers = [ maintainers.ivar ]; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/kbdlight/default.nix b/pkgs/os-specific/linux/kbdlight/default.nix index 0ed575b82546..b41e4cd4da1c 100644 --- a/pkgs/os-specific/linux/kbdlight/default.nix +++ b/pkgs/os-specific/linux/kbdlight/default.nix @@ -20,6 +20,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://github.com/hobarrera/kbdlight"; description = "A very simple application that changes MacBooks' keyboard backlight level"; + mainProgram = "kbdlight"; license = licenses.isc; maintainers = [ maintainers.womfoo ]; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index cc9e7484c331..f46f413f9e0a 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -23,7 +23,7 @@ let # configuration items have to be part of a subattrs - flattenKConf = nested: mapAttrs (_: head) (zipAttrs (attrValues nested)); + flattenKConf = nested: mapAttrs (name: values: if length values == 1 then head values else throw "duplicate kernel configuration option: ${name}") (zipAttrs (attrValues nested)); whenPlatformHasEBPFJit = mkIf (stdenv.hostPlatform.isAarch32 || @@ -62,10 +62,26 @@ let SUNRPC_DEBUG = yes; # Provide access to tunables like sched_migration_cost_ns SCHED_DEBUG = yes; + + # Count IRQ and steal CPU time separately + IRQ_TIME_ACCOUNTING = yes; + PARAVIRT_TIME_ACCOUNTING = yes; + + # Enable CPU lockup detection + LOCKUP_DETECTOR = yes; + SOFTLOCKUP_DETECTOR = yes; + HARDLOCKUP_DETECTOR = yes; + + # Enable streaming logs to a remote device over a network + NETCONSOLE = module; + NETCONSOLE_DYNAMIC = yes; + + # Export known printks in debugfs + PRINTK_INDEX = whenAtLeast "5.15" yes; }; power-management = { - CPU_FREQ_DEFAULT_GOV_PERFORMANCE = yes; + CPU_FREQ_DEFAULT_GOV_SCHEDUTIL = yes; CPU_FREQ_GOV_SCHEDUTIL = yes; PM_ADVANCED_DEBUG = yes; PM_WAKELOCKS = yes; @@ -85,6 +101,27 @@ let # depends on HAVE_VIRT_CPU_ACCOUNTING_GEN depends on 64BIT, # so we can't force-enable this RCU_LAZY = whenAtLeast "6.2" (option yes); + + # Auto suspend Bluetooth devices at idle + BT_HCIBTUSB_AUTOSUSPEND = yes; + + # Expose cpufreq stats in sysfs + CPU_FREQ_STAT = yes; + + # Enable CPU energy model for scheduling + ENERGY_MODEL = whenAtLeast "5.0" yes; + + # Enable thermal interface netlink API + THERMAL_NETLINK = whenAtLeast "5.9" yes; + + # Prefer power-efficient workqueue implementation to per-CPU workqueues, + # which is slightly slower, but improves battery life. + # This is opt-in per workqueue, and can be disabled globally with a kernel command line option. + WQ_POWER_EFFICIENT_DEFAULT = yes; + + # Default SATA link power management to "medium with device initiated PM" + # for some extra power savings. + SATA_MOBILE_LPM_POLICY = whenAtLeast "5.18" (freeform "3"); } // optionalAttrs (stdenv.hostPlatform.isx86) { INTEL_IDLE = yes; INTEL_RAPL = whenAtLeast "5.3" module; @@ -109,6 +146,9 @@ let CHT_DC_TI_PMIC_OPREGION = whenAtLeast "5.10" yes; MFD_TPS68470 = whenBetween "5.10" "5.13" yes; TPS68470_PMIC_OPREGION = whenAtLeast "5.10" yes; + + # Enable Intel thermal hardware feedback + INTEL_HFI_THERMAL = whenAtLeast "5.18" yes; }; external-firmware = { @@ -136,6 +176,16 @@ let DAMON_DBGFS = whenAtLeast "5.15" yes; DAMON_RECLAIM = whenAtLeast "5.16" yes; DAMON_LRU_SORT = whenAtLeast "6.0" yes; + # Support recovering from memory failures on systems with ECC and MCA recovery. + MEMORY_FAILURE = yes; + + # Collect ECC errors and retire pages that fail too often + RAS_CEC = yes; + } // optionalAttrs (stdenv.is32bit) { + # Enable access to the full memory range (aka PAE) on 32-bit architectures + # This check isn't super accurate but it's close enough + HIGHMEM = option yes; + BOUNCE = option yes; }; memtest = { @@ -154,6 +204,9 @@ let BFQ_GROUP_IOSCHED = yes; MQ_IOSCHED_KYBER = yes; IOSCHED_BFQ = module; + # Enable CPU utilization clamping for RT tasks + UCLAMP_TASK = whenAtLeast "5.3" yes; + UCLAMP_TASK_GROUP = whenAtLeast "5.4" yes; }; @@ -166,6 +219,7 @@ let # Enable NUMA. numa = { NUMA = option yes; + NUMA_BALANCING = option yes; }; networking = { @@ -250,6 +304,9 @@ let # Bridge Netfilter Configuration NF_TABLES_BRIDGE = mkMerge [ (whenOlder "5.3" yes) (whenAtLeast "5.3" module) ]; + # Expose some debug info + NF_CONNTRACK_PROCFS = yes; + NF_FLOW_TABLE_PROCFS = whenAtLeast "6.0" yes; # needed for `dropwatch` # Builtin-only since https://github.com/torvalds/linux/commit/f4b6bcc7002f0e3a3428bac33cf1945abff95450 @@ -276,6 +333,10 @@ let INFINIBAND = module; INFINIBAND_IPOIB = module; INFINIBAND_IPOIB_CM = yes; + + # Enable debugfs for wireless drivers + CFG80211_DEBUGFS = yes; + MAC80211_DEBUGFS = yes; } // optionalAttrs (stdenv.hostPlatform.system == "aarch64-linux") { # Not enabled by default, hides modules behind it NET_VENDOR_MEDIATEK = yes; @@ -288,8 +349,8 @@ let CFG80211_WEXT = option yes; # Without it, ipw2200 drivers don't build IPW2100_MONITOR = option yes; # support promiscuous mode IPW2200_MONITOR = option yes; # support promiscuous mode - HOSTAP_FIRMWARE = option yes; # Support downloading firmware images with Host AP driver - HOSTAP_FIRMWARE_NVRAM = option yes; + HOSTAP_FIRMWARE = whenOlder "6.8" (option yes); # Support downloading firmware images with Host AP driver + HOSTAP_FIRMWARE_NVRAM = whenOlder "6.8" (option yes); MAC80211_MESH = option yes; # Enable 802.11s (mesh networking) support ATH9K_PCI = option yes; # Detect Atheros AR9xxx cards on PCI(e) bus ATH9K_AHB = option yes; # Ditto, AHB bus @@ -345,8 +406,11 @@ let FONT_TER16x32 = whenAtLeast "5.0" yes; }; - video = { + video = let + whenHasDevicePrivate = mkIf (!stdenv.isx86_32 && versionAtLeast version "5.1"); + in { DRM_LEGACY = whenOlder "6.8" no; + NOUVEAU_LEGACY_CTX_SUPPORT = whenBetween "5.2" "6.3" no; # Allow specifying custom EDID on the kernel command line @@ -371,8 +435,25 @@ let DRM_AMD_DC_FP = whenAtLeast "6.4" yes; DRM_AMD_DC_HDCP = whenBetween "5.5" "6.4" yes; DRM_AMD_DC_SI = whenAtLeast "5.10" yes; + + # Enable AMD Audio Coprocessor support for HDMI outputs + DRM_AMD_ACP = yes; + + # Enable AMD secure display when available + DRM_AMD_SECURE_DISPLAY = whenAtLeast "5.13" yes; + # Enable new firmware (and by extension NVK) for compatible hardware on Nouveau DRM_NOUVEAU_GSP_DEFAULT = whenAtLeast "6.8" yes; + + # Enable Nouveau shared virtual memory (used by OpenCL) + DEVICE_PRIVATE = whenHasDevicePrivate yes; + DRM_NOUVEAU_SVM = whenHasDevicePrivate yes; + + # Enable HDMI-CEC receiver support + MEDIA_CEC_RC = whenAtLeast "5.10" yes; + + # Enable CEC over DisplayPort + DRM_DP_CEC = yes; } // optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux") { # Intel GVT-g graphics virtualization supports 64-bit only DRM_I915_GVT = yes; @@ -397,6 +478,11 @@ let sound = { SND_DYNAMIC_MINORS = yes; SND_AC97_POWER_SAVE = yes; # AC97 Power-Saving Mode + # 10s for the idle timeout, Fedora does 1, Arch does 10. + # The kernel says we should do 10. + # Read: https://docs.kernel.org/sound/designs/powersave.html + SND_AC97_POWER_SAVE_DEFAULT = freeform "10"; + SND_HDA_POWER_SAVE_DEFAULT = freeform "10"; SND_HDA_INPUT_BEEP = yes; # Support digital beep via input layer SND_HDA_RECONFIG = yes; # Support reconfiguration of jack functions # Support configuring jack functions via fw mechanism at boot @@ -404,6 +490,7 @@ let SND_HDA_CODEC_CA0132_DSP = whenOlder "5.7" yes; # Enable DSP firmware loading on Creative Soundblaster Z/Zx/ZxR/Recon SND_OSSEMUL = yes; SND_USB_CAIAQ_INPUT = yes; + SND_USB_AUDIO_MIDI_V2 = whenAtLeast "6.5" yes; # Enable Sound Open Firmware support } // optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux" && versionAtLeast version "5.5") { @@ -440,14 +527,23 @@ let SND_SOC_SOF_TIGERLAKE_SUPPORT = whenOlder "5.12" yes; }; - usb-serial = { - USB_SERIAL_GENERIC = yes; # USB Generic Serial Driver - }; - usb = { + USB = yes; # compile USB core into kernel, so we can use USB_SERIAL_CONSOLE before modules + USB_EHCI_ROOT_HUB_TT = yes; # Root Hub Transaction Translators USB_EHCI_TT_NEWSCHED = yes; # Improved transaction translator scheduling USB_HIDDEV = yes; # USB Raw HID Devices (like monitor controls and Uninterruptable Power Supplies) + + # default to dual role mode + USB_DWC2_DUAL_ROLE = yes; + USB_DWC3_DUAL_ROLE = yes; + }; + + usb-serial = { + USB_SERIAL = yes; + USB_SERIAL_GENERIC = yes; # USB Generic Serial Driver + USB_SERIAL_CONSOLE = yes; # Allow using USB serial adapter as console + U_SERIAL_CONSOLE = whenAtLeast "5.10" yes; # Allow using USB gadget as console }; # Filesystem options - in particular, enable extended attributes and @@ -528,6 +624,7 @@ let SQUASHFS_FILE_DIRECT = yes; SQUASHFS_DECOMP_MULTI_PERCPU = whenOlder "6.2" yes; + SQUASHFS_CHOICE_DECOMP_BY_MOUNT = whenAtLeast "6.2" yes; SQUASHFS_XATTR = yes; SQUASHFS_ZLIB = yes; SQUASHFS_LZO = yes; @@ -593,6 +690,16 @@ let CRYPTO_DRBG_HASH = yes; CRYPTO_DRBG_CTR = yes; + # Enable KFENCE + # See: https://docs.kernel.org/dev-tools/kfence.html + KFENCE = whenAtLeast "5.12" yes; + + # Enable support for page poisoning. Still needs to be enabled on the command line to actually work. + PAGE_POISONING = yes; + + # Enable stack smashing protections in schedule() + # See: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v4.8&id=0d9e26329b0c9263d4d9e0422d80a0e73268c52f + SCHED_STACK_END_CHECK = yes; } // optionalAttrs stdenv.hostPlatform.isx86_64 { # Enable Intel SGX X86_SGX = whenAtLeast "5.11" yes; @@ -609,6 +716,9 @@ let SEV_GUEST = whenAtLeast "5.19" module; # Shadow stacks X86_USER_SHADOW_STACK = whenAtLeast "6.6" yes; + + # Mitigate straight line speculation at the cost of some file size + SLS = whenAtLeast "5.17" yes; }; microcode = { @@ -776,7 +886,6 @@ let NOTIFIER_ERROR_INJECTION = option no; RCU_PERF_TEST = whenOlder "5.9" no; RCU_SCALE_TEST = whenAtLeast "5.10" no; - RCU_TORTURE_TEST = option no; TEST_ASYNC_DRIVER_PROBE = option no; WW_MUTEX_SELFTEST = option no; XZ_DEC_TEST = option no; @@ -786,6 +895,10 @@ let # Unconditionally enabled, because it is required for CRIU and # it provides the kcmp() system call that Mesa depends on. CHECKPOINT_RESTORE = yes; + + # Allows soft-dirty tracking on pages, used by CRIU. + # See https://docs.kernel.org/admin-guide/mm/soft-dirty.html + MEM_SOFT_DIRTY = mkIf (!stdenv.isx86_32) yes; }; misc = let @@ -800,6 +913,9 @@ let # enabled by default in x86_64 but not arm64, so we do that here HIDRAW = yes; + # Enable loading HID fixups as eBPF from userspace + HID_BPF = whenAtLeast "6.3" yes; + HID_ACRUX_FF = yes; DRAGONRISE_FF = yes; GREENASIA_FF = yes; @@ -827,7 +943,10 @@ let # Enable initrd support. BLK_DEV_INITRD = yes; - PM_TRACE_RTC = no; # Disable some expensive (?) features. + # Allows debugging systems that get stuck during suspend/resume + PM_TRACE = yes; + PM_TRACE_RTC = yes; + ACCESSIBILITY = yes; # Accessibility support AUXDISPLAY = yes; # Auxiliary Display support HIPPI = yes; @@ -852,6 +971,11 @@ let BLK_SED_OPAL = yes; + # Enable support for block layer inline encryption + BLK_INLINE_ENCRYPTION = whenAtLeast "5.8" yes; + # ...but fall back to CPU encryption if unavailable + BLK_INLINE_ENCRYPTION_FALLBACK = whenAtLeast "5.8" yes; + BSD_PROCESS_ACCT_V3 = yes; SERIAL_DEV_BUS = yes; # enables support for serial devices @@ -870,7 +994,6 @@ let # 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; FSCACHE_STATS = yes; @@ -966,7 +1089,7 @@ let # Disable the firmware helper fallback, udev doesn't implement it any more FW_LOADER_USER_HELPER_FALLBACK = option no; - FW_LOADER_COMPRESS = option yes; + FW_LOADER_COMPRESS = whenAtLeast "5.3" yes; HOTPLUG_PCI_ACPI = yes; # PCI hotplug using ACPI HOTPLUG_PCI_PCIE = yes; # PCI-Expresscard hotplug support @@ -1013,6 +1136,13 @@ let # Set system time from RTC on startup and resume RTC_HCTOSYS = option yes; + + # Expose watchdog information in sysfs + WATCHDOG_SYSFS = yes; + + # Enable generic kernel watch queues + # See https://docs.kernel.org/core-api/watch_queue.html + WATCH_QUEUE = whenAtLeast "5.8" yes; } // optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "aarch64-linux") { # Enable CPU/memory hotplug support # Allows you to dynamically add & remove CPUs/memory to a VM client running NixOS without requiring a reboot @@ -1043,6 +1173,10 @@ let # https://github.com/torvalds/linux/blob/856deb866d16e29bd65952e0289066f6078af773/kernel/dma/contiguous.c#L35-L44 CMA_SIZE_MBYTES = freeform "32"; + # Add debug interfaces for CMA + CMA_DEBUGFS = yes; + CMA_SYSFS = yes; + # Many ARM SBCs hand off a pre-configured framebuffer. # This always can can be replaced by the actual native driver. # Keeping it a built-in ensures it will be used if possible. @@ -1088,6 +1222,24 @@ let } // optionalAttrs (versionAtLeast version "5.4" && stdenv.hostPlatform.system == "x86_64-linux") { CHROMEOS_LAPTOP = module; CHROMEOS_PSTORE = module; + } // optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux") { + # Enable x86 resource control + X86_CPU_RESCTRL = whenAtLeast "5.0" yes; + + # Enable TSX on CPUs where it's not vulnerable + X86_INTEL_TSX_MODE_AUTO = yes; + + # Enable AMD Wi-Fi RF band mitigations + # See https://cateee.net/lkddb/web-lkddb/AMD_WBRF.html + AMD_WBRF = whenAtLeast "6.8" yes; + + # Enable Intel Turbo Boost Max 3.0 + INTEL_TURBO_MAX_3 = yes; + }; + + accel = { + # Build DRM accelerator devices + DRM_ACCEL = whenAtLeast "6.2" yes; }; }; in diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 14c863b459b1..ae602ee0c112 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -12,8 +12,10 @@ , rustc , rustPlatform , rust-bindgen +, nixosTests +}: -, # The kernel source tarball. +lib.makeOverridable ({ # The kernel source tarball. src , # The kernel version. @@ -66,7 +68,6 @@ , preferBuiltin ? stdenv.hostPlatform.linux-kernel.preferBuiltin or false , kernelArch ? stdenv.hostPlatform.linuxArch , kernelTests ? [] -, nixosTests , ... }@args: @@ -239,4 +240,4 @@ kernel.overrideAttrs (finalAttrs: previousAttrs: { in [ (nixosTests.kernel-generic.passthru.testsForKernel overridableKernel) ] ++ kernelTests; }; -}) +})) diff --git a/pkgs/os-specific/linux/kernel/hardened/patches.json b/pkgs/os-specific/linux/kernel/hardened/patches.json index cb825a1adbac..21772b2e03eb 100644 --- a/pkgs/os-specific/linux/kernel/hardened/patches.json +++ b/pkgs/os-specific/linux/kernel/hardened/patches.json @@ -2,52 +2,52 @@ "4.19": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-4.19.307-hardened1.patch", - "sha256": "01i15w3qzwag2v4r5r5bqyk337pidhmcfif228f286cnjnqz5d7h", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/4.19.307-hardened1/linux-hardened-4.19.307-hardened1.patch" + "name": "linux-hardened-4.19.309-hardened1.patch", + "sha256": "1hww72w5anmfr9czqbl31glzl70s34492k9qz9zax141zg1sf6sp", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/4.19.309-hardened1/linux-hardened-4.19.309-hardened1.patch" }, - "sha256": "0lp3fc7sqy48vpcl2g0n1bz7i1hp9k0nlz3i1xfh9l056ihzzvl3", - "version": "4.19.307" + "sha256": "1yc45kfiwdqsqa11sxafs82b0day6qvgjcll8rx9vipidsmagbcm", + "version": "4.19.309" }, "5.10": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-5.10.210-hardened1.patch", - "sha256": "1fdkkl303kvw9sg9lpzg83157xrl9jcl4jjli1gi2a4j0yz2479n", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.10.210-hardened1/linux-hardened-5.10.210-hardened1.patch" + "name": "linux-hardened-5.10.212-hardened1.patch", + "sha256": "0h04i94vshhcli5m4qpnqg4vsi5v1ifvdhhklk7c0bvkfk35cbml", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.10.212-hardened1/linux-hardened-5.10.212-hardened1.patch" }, - "sha256": "0vggj3a71awc1w803cdzrnkn88rxr7l1xh9mmdcw9hzxj1d3r9jf", - "version": "5.10.210" + "sha256": "14vll2bghd52wngjxy78hgglydcxka59yziji0w56dcdpmky9wqc", + "version": "5.10.212" }, "5.15": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-5.15.149-hardened1.patch", - "sha256": "1y56l5l50h673a4n2pb3i3wh494lpnlw9vvdfr6m0jr0vymldb57", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.15.149-hardened1/linux-hardened-5.15.149-hardened1.patch" + "name": "linux-hardened-5.15.151-hardened1.patch", + "sha256": "040jc5n9qsdz2wv5ksfvc28vd72nmya2i2f0ps0jiras6l2wlhjz", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.15.151-hardened1/linux-hardened-5.15.151-hardened1.patch" }, - "sha256": "1c01fnaghj55mkgsgddznq1zq4mswsa05rz00kmh1d3y6sd8115x", - "version": "5.15.149" + "sha256": "0jby224ncdardjwmf8c59s5j71inpvdlzah984ilf2b6y85pc7la", + "version": "5.15.151" }, "5.4": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-5.4.269-hardened1.patch", - "sha256": "06vf0mlp822i4bkpsxbyk1xjlbzabqpncy8qw9zajpjajwv87d7x", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.4.269-hardened1/linux-hardened-5.4.269-hardened1.patch" + "name": "linux-hardened-5.4.271-hardened1.patch", + "sha256": "0rw5il7885d0d3k2hmh46541svib6rp32g00fcl5bw37ydmq3z8b", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.4.271-hardened1/linux-hardened-5.4.271-hardened1.patch" }, - "sha256": "1kqqm4hpif3jy2ycnb0dfjgzyn18vqhm1i5q7d7rkisks33bwm7z", - "version": "5.4.269" + "sha256": "0l2qv4xlhnry9crs90rkihsxyny6jz8kxw08bfad7nys9hrn3g6d", + "version": "5.4.271" }, "6.1": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-6.1.79-hardened1.patch", - "sha256": "0inip6pmlwrj75vwjimkjgvh4jn6ldrq5312r02xh1i95qb0sg3a", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/6.1.79-hardened1/linux-hardened-6.1.79-hardened1.patch" + "name": "linux-hardened-6.1.81-hardened1.patch", + "sha256": "0af9dxdsa858zyqc0vsrzg098afhg5vpb2wpr6gj2ykwc13iaf07", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/6.1.81-hardened1/linux-hardened-6.1.81-hardened1.patch" }, - "sha256": "16xkd0hcslqlcf55d4ivzhf1fkhfs5yy0m9arbax8pmm5yi9r97s", - "version": "6.1.79" + "sha256": "0arl96yrqplbmp2gjyqcfma1lgc30kbn95m0sflv0yyldwf8dg8f", + "version": "6.1.81" }, "6.5": { "patch": { @@ -62,12 +62,12 @@ "6.6": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-6.6.18-hardened1.patch", - "sha256": "0svlck53b7bd38b9b0hzgppmhm59d35r2vqv30ga85ghkvc61byn", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/6.6.18-hardened1/linux-hardened-6.6.18-hardened1.patch" + "name": "linux-hardened-6.6.21-hardened1.patch", + "sha256": "0k35s5pj92lvfp6kw3isg78zc3gijsg0xbzcyvxdkmhzaq8j6i1i", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/6.6.21-hardened1/linux-hardened-6.6.21-hardened1.patch" }, - "sha256": "07cv97l5jiakmmv35n0ganvqfr0590b02f3qb617qkx1zg2xhhsf", - "version": "6.6.18" + "sha256": "0mz420w99agr7jv1jgqfr4fjhzbv005xif086sqx556s900l62zf", + "version": "6.6.21" }, "6.7": { "patch": { diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index c838d6371b6a..b9207f0ac2f5 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -4,35 +4,35 @@ "hash": "sha256:0q9isgv6lxzrmb4idl0spxv2l7fsk3nn4cdq0vdw9c8lyzrh5yy0" }, "6.1": { - "version": "6.1.81", - "hash": "sha256:0arl96yrqplbmp2gjyqcfma1lgc30kbn95m0sflv0yyldwf8dg8f" + "version": "6.1.82", + "hash": "sha256:01pcrcjp5mifjjmfz7j1jb8nhq8nkxspavxmv1l7d1qnskcx4l6i" }, "5.15": { - "version": "5.15.151", - "hash": "sha256:0jby224ncdardjwmf8c59s5j71inpvdlzah984ilf2b6y85pc7la" + "version": "5.15.152", + "hash": "sha256:0zm4wkryj4mim4fr7pf5g9rlzh31yb1c40lkp85lvcm5yhjm507h" }, "5.10": { - "version": "5.10.212", - "hash": "sha256:14vll2bghd52wngjxy78hgglydcxka59yziji0w56dcdpmky9wqc" + "version": "5.10.213", + "hash": "sha256:105df7w6m5a3fngi6ajqs5qblaq4lbxsgcppllrk7v1r68i31kw4" }, "5.4": { - "version": "5.4.271", - "hash": "sha256:0l2qv4xlhnry9crs90rkihsxyny6jz8kxw08bfad7nys9hrn3g6d" + "version": "5.4.272", + "hash": "sha256:0rp3waqrm489crcrms2ls7fxcw5jdkjhazvx82z68gj0kaaxb69m" }, "4.19": { - "version": "4.19.309", - "hash": "sha256:1yc45kfiwdqsqa11sxafs82b0day6qvgjcll8rx9vipidsmagbcm" + "version": "4.19.310", + "hash": "sha256:0sfy2g9jzxd8ia0idll72l7npi2kssdkz29h8jjxhilgmg299v4m" }, "6.6": { - "version": "6.6.21", - "hash": "sha256:0mz420w99agr7jv1jgqfr4fjhzbv005xif086sqx556s900l62zf" + "version": "6.6.22", + "hash": "sha256:1x52c6ywmspp3naishzsknhy7i0b7mv9baxx25a0y987cjsygqr3" }, "6.7": { - "version": "6.7.9", - "hash": "sha256:0inkvyrvq60j9lxgivkivq3qh94lsfc1dpv6vwgxmy3q0zy37mqg" + "version": "6.7.10", + "hash": "sha256:00vw90mypcliq0d72jdh1ql2dfmm7gpswln2qycxdz7rfsrrzfd9" }, "6.8": { - "version": "6.8", - "hash": "sha256:1wv5x7qhcd05m8m0myyqm2il6mha1sx11h7ppf8yjsxvx2jdwsf9" + "version": "6.8.1", + "hash": "sha256:0s7zgk9m545v8y7qjhv7cprrh58j46gpmb8iynyhy2hlwcv8j34d" } } diff --git a/pkgs/os-specific/linux/kernel/linux-libre.nix b/pkgs/os-specific/linux/kernel/linux-libre.nix index afdc6bb5fd01..01daee4015f0 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 = "19500"; - sha256 = "1xlicxwb1j5m4yjyw9ybyffmilzg7xh847jxfl4jy318vjpkmffr"; + rev = "19509"; + sha256 = "0dkjvpb075jdasvic8sfpy0dj48fsxgj2yl0zrply7gkaahgns8q"; } , ... }: 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 747d5aec7790..188ca24100b1 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.210-rt102"; # updated by ./update-rt.sh + version = "5.10.211-rt103"; # updated by ./update-rt.sh branch = lib.versions.majorMinor version; kversion = builtins.elemAt (lib.splitString "-" version) 0; in buildLinux (args // { @@ -17,14 +17,14 @@ in buildLinux (args // { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${kversion}.tar.xz"; - sha256 = "0vggj3a71awc1w803cdzrnkn88rxr7l1xh9mmdcw9hzxj1d3r9jf"; + sha256 = "1cir36s369fl6s46x16xnjg0wdlnkipsp2zhz11m9d3z205hly1s"; }; kernelPatches = let rt-patch = { name = "rt"; patch = fetchurl { url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz"; - sha256 = "1q4365ix990iw33a63cpn61qvgf8rkzf658xyi0hnr6292hlvajj"; + sha256 = "07br63p90gwmijxq8ad7iyi4d3fkm6jwwl2s2k1549bbaldchbk6"; }; }; 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 cd2f60d3921d..463385036292 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.264-rt88"; # updated by ./update-rt.sh + version = "5.4.271-rt89"; # 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 = "1c5n47dq9khb15hz24a000k3hj913vv1dda6famnm8wpjbfr176k"; + sha256 = "0l2qv4xlhnry9crs90rkihsxyny6jz8kxw08bfad7nys9hrn3g6d"; }; kernelPatches = let rt-patch = { name = "rt"; patch = fetchurl { url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz"; - sha256 = "1yzdiip1fm9szx2hhvq9ph7jq00qglb1skis6gv0184g0ls2qddg"; + sha256 = "15k9jja5yd9zf5yhd7hhydwh4hksg2mybk66jhdjsryh4w9jav7z"; }; }; in [ rt-patch ] ++ kernelPatches; diff --git a/pkgs/os-specific/linux/kernel/linux-rt-6.6.nix b/pkgs/os-specific/linux/kernel/linux-rt-6.6.nix index 514baa0ca598..4ff7e1c54b04 100644 --- a/pkgs/os-specific/linux/kernel/linux-rt-6.6.nix +++ b/pkgs/os-specific/linux/kernel/linux-rt-6.6.nix @@ -6,7 +6,7 @@ , ... } @ args: let - version = "6.6.20-rt25"; # updated by ./update-rt.sh + version = "6.6.21-rt26"; # 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/v6.x/linux-${kversion}.tar.xz"; - sha256 = "08nxv2240d2ak6p2vsbjasnp7askamswby3h6cclhhihkgrwgxp2"; + sha256 = "0mz420w99agr7jv1jgqfr4fjhzbv005xif086sqx556s900l62zf"; }; kernelPatches = let rt-patch = { name = "rt"; patch = fetchurl { url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz"; - sha256 = "1sfalbcfzzjmskxpix1850cypg4zixwzbd9rmpg37n8lclivn2gv"; + sha256 = "1sh2jkm3h52a5dkc72xgrw1kz1faw1kzhpbqg64gsxbivmxfvf21"; }; }; in [ rt-patch ] ++ kernelPatches; diff --git a/pkgs/os-specific/linux/kernel/perf/default.nix b/pkgs/os-specific/linux/kernel/perf/default.nix index 172965f2a78f..02f0407425d1 100644 --- a/pkgs/os-specific/linux/kernel/perf/default.nix +++ b/pkgs/os-specific/linux/kernel/perf/default.nix @@ -164,6 +164,7 @@ stdenv.mkDerivation { meta = with lib; { homepage = "https://perf.wiki.kernel.org/"; description = "Linux tools to profile with performance counters"; + mainProgram = "perf"; maintainers = with maintainers; [ viric ]; platforms = platforms.linux; broken = kernel.kernelOlder "5"; diff --git a/pkgs/os-specific/linux/kernel/xanmod-kernels.nix b/pkgs/os-specific/linux/kernel/xanmod-kernels.nix index ea0db48c75f3..08e6f83a2ffe 100644 --- a/pkgs/os-specific/linux/kernel/xanmod-kernels.nix +++ b/pkgs/os-specific/linux/kernel/xanmod-kernels.nix @@ -6,14 +6,14 @@ let # NOTE: When updating these, please also take a look at the changes done to # kernel config in the xanmod version commit ltsVariant = { - version = "6.6.21"; - hash = "sha256-DDkjrtKK7zIffVMuBtHvSWp0GtMA87YuOp8AhUw64+Y="; + version = "6.6.22"; + hash = "sha256-vpWUdzgI8i/1r5nMp0tx+x67GDTnjQF5ueITIl36lvA="; variant = "lts"; }; mainVariant = { - version = "6.7.9"; - hash = "sha256-/YoZTclMdJBQ8iwpfm/Ne/YLNQneN0hccy95o3fWvGM="; + version = "6.7.10"; + hash = "sha256-uwlvQh11uf1skSdlIz7XdjRkdI/wf3VqEeOP20JO5OU="; variant = "main"; }; diff --git a/pkgs/os-specific/linux/klibc/default.nix b/pkgs/os-specific/linux/klibc/default.nix index 3a044cf9d84d..2b010e5c8bce 100644 --- a/pkgs/os-specific/linux/klibc/default.nix +++ b/pkgs/os-specific/linux/klibc/default.nix @@ -50,6 +50,7 @@ stdenv.mkDerivation rec { meta = { description = "Minimalistic libc subset for initramfs usage"; + mainProgram = "klcc"; homepage = "https://kernel.org/pub/linux/libs/klibc/"; maintainers = with lib.maintainers; [ fpletz ]; license = lib.licenses.bsd3; diff --git a/pkgs/os-specific/linux/kmscon/default.nix b/pkgs/os-specific/linux/kmscon/default.nix index 2a60864ea6bf..18ac0370b855 100644 --- a/pkgs/os-specific/linux/kmscon/default.nix +++ b/pkgs/os-specific/linux/kmscon/default.nix @@ -79,6 +79,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "KMS/DRM based System Console"; + mainProgram = "kmscon"; homepage = "https://www.freedesktop.org/wiki/Software/kmscon/"; license = licenses.mit; maintainers = with maintainers; [ omasanori ]; diff --git a/pkgs/os-specific/linux/latencytop/default.nix b/pkgs/os-specific/linux/latencytop/default.nix index a48abf85831f..023140e1f482 100644 --- a/pkgs/os-specific/linux/latencytop/default.nix +++ b/pkgs/os-specific/linux/latencytop/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation rec { meta = { homepage = "http://latencytop.org"; description = "Tool to show kernel reports on latencies (LATENCYTOP option)"; + mainProgram = "latencytop"; license = lib.licenses.gpl2; maintainers = [ lib.maintainers.viric ]; platforms = lib.platforms.linux; diff --git a/pkgs/os-specific/linux/ldm/default.nix b/pkgs/os-specific/linux/ldm/default.nix index f8a519de847e..0dea0ce4e8b0 100644 --- a/pkgs/os-specific/linux/ldm/default.nix +++ b/pkgs/os-specific/linux/ldm/default.nix @@ -34,6 +34,7 @@ stdenv.mkDerivation rec { meta = { description = "A lightweight device mounter, with libudev as only dependency"; + mainProgram = "ldm"; license = lib.licenses.mit; platforms = lib.platforms.linux; }; diff --git a/pkgs/os-specific/linux/libselinux/default.nix b/pkgs/os-specific/linux/libselinux/default.nix index b42bffdc057d..c0711f693377 100644 --- a/pkgs/os-specific/linux/libselinux/default.nix +++ b/pkgs/os-specific/linux/libselinux/default.nix @@ -39,6 +39,11 @@ stdenv.mkDerivation rec { -i 'a/libselinux/*' --strip 1 <$TMPDIR/patch >"$out" ''; }) + + (fetchurl { + url = "https://git.yoctoproject.org/meta-selinux/plain/recipes-security/selinux/libselinux/0003-libselinux-restore-drop-the-obsolete-LSF-transitiona.patch?id=62b9c816a5000dc01b28e78213bde26b58cbca9d"; + sha256 = "sha256-RiEUibLVzfiRU6N/J187Cs1iPAih87gCZrlyRVI2abU="; + }) ]; nativeBuildInputs = [ pkg-config python3 ] ++ optionals enablePython [ @@ -53,7 +58,7 @@ stdenv.mkDerivation rec { # command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] hardeningDisable = [ "fortify" ]; - env.NIX_CFLAGS_COMPILE = "-Wno-error"; + env.NIX_CFLAGS_COMPILE = "-Wno-error -D_FILE_OFFSET_BITS=64"; makeFlags = [ "PREFIX=$(out)" diff --git a/pkgs/os-specific/linux/libtracefs/default.nix b/pkgs/os-specific/linux/libtracefs/default.nix index 2432a28e0c7b..3d99466c8f34 100644 --- a/pkgs/os-specific/linux/libtracefs/default.nix +++ b/pkgs/os-specific/linux/libtracefs/default.nix @@ -54,6 +54,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Linux kernel trace file system library"; + mainProgram = "sqlhist"; homepage = "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"; license = licenses.lgpl21Only; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/libzbd/default.nix b/pkgs/os-specific/linux/libzbd/default.nix index 0c77f73cf2fc..4675a1383758 100644 --- a/pkgs/os-specific/linux/libzbd/default.nix +++ b/pkgs/os-specific/linux/libzbd/default.nix @@ -32,6 +32,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Zoned block device manipulation library and tools"; + mainProgram = "zbd"; homepage = "https://github.com/westerndigitalcorporation/libzbd"; maintainers = [ maintainers.fogti ]; license = with licenses; [ lgpl3Plus gpl3Plus ]; diff --git a/pkgs/os-specific/linux/lightum/default.nix b/pkgs/os-specific/linux/lightum/default.nix index e9925b95bcd6..46dd76e0d277 100644 --- a/pkgs/os-specific/linux/lightum/default.nix +++ b/pkgs/os-specific/linux/lightum/default.nix @@ -34,6 +34,7 @@ stdenv.mkDerivation { meta = { description = "MacBook automatic light sensor daemon"; + mainProgram = "lightum"; homepage = "https://github.com/poliva/lightum"; license = lib.licenses.gpl2; maintainers = with lib.maintainers; [ puffnfresh ]; diff --git a/pkgs/os-specific/linux/lockdep/default.nix b/pkgs/os-specific/linux/lockdep/default.nix index 1ea2de63560b..be3967f0a858 100644 --- a/pkgs/os-specific/linux/lockdep/default.nix +++ b/pkgs/os-specific/linux/lockdep/default.nix @@ -59,6 +59,7 @@ stdenv.mkDerivation rec { meta = { description = "Userspace locking validation tool built on the Linux kernel"; + mainProgram = "lockdep"; homepage = "https://kernel.org/"; license = lib.licenses.gpl2; platforms = lib.platforms.linux; diff --git a/pkgs/os-specific/linux/lsb-release/default.nix b/pkgs/os-specific/linux/lsb-release/default.nix index 7ab10bfac124..f79c6527539a 100644 --- a/pkgs/os-specific/linux/lsb-release/default.nix +++ b/pkgs/os-specific/linux/lsb-release/default.nix @@ -14,6 +14,7 @@ substituteAll { meta = with lib; { description = "Prints certain LSB (Linux Standard Base) and Distribution information"; + mainProgram = "lsb_release"; license = [ licenses.mit ]; maintainers = with maintainers; [ primeos ]; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/lxcfs/default.nix b/pkgs/os-specific/linux/lxcfs/default.nix index 1388b5360f12..00c7f6f5edbd 100644 --- a/pkgs/os-specific/linux/lxcfs/default.nix +++ b/pkgs/os-specific/linux/lxcfs/default.nix @@ -67,6 +67,7 @@ stdenv.mkDerivation rec { meta = { description = "FUSE filesystem for LXC"; + mainProgram = "lxcfs"; homepage = "https://linuxcontainers.org/lxcfs"; changelog = "https://linuxcontainers.org/lxcfs/news/"; license = lib.licenses.asl20; diff --git a/pkgs/os-specific/linux/mbpfan/default.nix b/pkgs/os-specific/linux/mbpfan/default.nix index 50fc74d7fa0a..4992fdbf1d46 100644 --- a/pkgs/os-specific/linux/mbpfan/default.nix +++ b/pkgs/os-specific/linux/mbpfan/default.nix @@ -16,6 +16,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { description = "Daemon that uses input from coretemp module and sets the fan speed using the applesmc module"; + mainProgram = "mbpfan"; homepage = "https://github.com/dgraziotin/mbpfan"; license = licenses.gpl3; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/mceinject/default.nix b/pkgs/os-specific/linux/mceinject/default.nix index 524225763742..f7cd199a5e8b 100644 --- a/pkgs/os-specific/linux/mceinject/default.nix +++ b/pkgs/os-specific/linux/mceinject/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A tool to inject machine checks into x86 kernel for testing"; + mainProgram = "mce-inject"; longDescription = '' mce-inject allows to inject machine check errors on the software level into a running Linux kernel. This is intended for validation of the diff --git a/pkgs/os-specific/linux/mcelog/default.nix b/pkgs/os-specific/linux/mcelog/default.nix index 916c79a4298d..2a6727027f48 100644 --- a/pkgs/os-specific/linux/mcelog/default.nix +++ b/pkgs/os-specific/linux/mcelog/default.nix @@ -36,6 +36,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Log x86 machine checks: memory, IO, and CPU hardware errors"; + mainProgram = "mcelog"; longDescription = '' The mcelog daemon accounts memory and some other errors in various ways on modern x86 Linux systems. The daemon can be queried and/or execute diff --git a/pkgs/os-specific/linux/metastore/default.nix b/pkgs/os-specific/linux/metastore/default.nix index c9875297186e..76e4ae893287 100644 --- a/pkgs/os-specific/linux/metastore/default.nix +++ b/pkgs/os-specific/linux/metastore/default.nix @@ -16,6 +16,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Store and restore metadata from a filesystem"; + mainProgram = "metastore"; homepage = "https://software.przemoc.net/#metastore"; license = licenses.gpl2; maintainers = with maintainers; [ sstef ]; diff --git a/pkgs/os-specific/linux/microcode/intel.nix b/pkgs/os-specific/linux/microcode/intel.nix index de51beb2cc18..6953bbca8963 100644 --- a/pkgs/os-specific/linux/microcode/intel.nix +++ b/pkgs/os-specific/linux/microcode/intel.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "microcode-intel"; - version = "20231114"; + version = "20240312"; src = fetchFromGitHub { owner = "intel"; repo = "Intel-Linux-Processor-Microcode-Data-Files"; rev = "microcode-${version}"; - hash = "sha256-cZ7APDjwjarPCzk1HWxqIXdGwNOl6HG0KSCtffmEhx0="; + hash = "sha256-4ZSA+LVczfjZINXhImmFOCc/6kKNrrUQvrXPdOvMM8g="; }; nativeBuildInputs = [ iucode-tool libarchive ]; diff --git a/pkgs/os-specific/linux/microcode/iucode-tool.nix b/pkgs/os-specific/linux/microcode/iucode-tool.nix index d27e3ca6987b..316aaa22932d 100644 --- a/pkgs/os-specific/linux/microcode/iucode-tool.nix +++ b/pkgs/os-specific/linux/microcode/iucode-tool.nix @@ -27,6 +27,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Intel® 64 and IA-32 processor microcode tool"; + mainProgram = "iucode_tool"; homepage = "https://gitlab.com/iucode-tool/iucode-tool"; license = licenses.gpl2; maintainers = with maintainers; [ peterhoeg ]; diff --git a/pkgs/os-specific/linux/mmc-utils/default.nix b/pkgs/os-specific/linux/mmc-utils/default.nix index 0fea46da56d2..76b7d3ae1af1 100644 --- a/pkgs/os-specific/linux/mmc-utils/default.nix +++ b/pkgs/os-specific/linux/mmc-utils/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation { pname = "mmc-utils"; - version = "unstable-2023-10-10"; + version = "unstable-2024-03-07"; src = fetchzip rec { url = "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/snapshot/mmc-utils-${passthru.rev}.tar.gz"; - passthru.rev = "b5ca140312d279ad2f22068fd72a6230eea13436"; - sha256 = "QU4r8eajrrhT6u6WHEf1xtB1iyecBeHxu4vS+QcwAgM="; + passthru.rev = "e1281d4de9166b7254ba30bb58f9191fc2c9e7fb"; + sha256 = "/lkcZ/ArdBAStV9usavrbfjULXenqb+h2rbDJzxZjJk="; }; makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "prefix=$(out)" ]; @@ -28,6 +28,7 @@ stdenv.mkDerivation { meta = with lib; { description = "Configure MMC storage devices from userspace"; + mainProgram = "mmc"; homepage = "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/"; license = licenses.gpl2Only; maintainers = [ maintainers.dezgeg ]; diff --git a/pkgs/os-specific/linux/msr/default.nix b/pkgs/os-specific/linux/msr/default.nix index 0ffc46012096..630fc983690d 100644 --- a/pkgs/os-specific/linux/msr/default.nix +++ b/pkgs/os-specific/linux/msr/default.nix @@ -33,6 +33,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "http://www.etallen.com/msr.html"; description = "Linux tool to display or modify x86 model-specific registers (MSRs)"; + mainProgram = "msr"; license = licenses.bsd0; maintainers = with maintainers; [ AndersonTorres ]; platforms = [ "i686-linux" "x86_64-linux" ]; diff --git a/pkgs/os-specific/linux/netatop/default.nix b/pkgs/os-specific/linux/netatop/default.nix index d7d04e8368db..68386173ed50 100644 --- a/pkgs/os-specific/linux/netatop/default.nix +++ b/pkgs/os-specific/linux/netatop/default.nix @@ -47,6 +47,7 @@ stdenv.mkDerivation { meta = { description = "Network monitoring module for atop"; + mainProgram = "netatopd"; homepage = "https://www.atoptool.nl/downloadnetatop.php"; license = lib.licenses.gpl2; platforms = lib.platforms.linux; diff --git a/pkgs/os-specific/linux/nmon/default.nix b/pkgs/os-specific/linux/nmon/default.nix index 30285f9c5b25..9e3a6667d705 100644 --- a/pkgs/os-specific/linux/nmon/default.nix +++ b/pkgs/os-specific/linux/nmon/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "AIX & Linux Performance Monitoring tool"; + mainProgram = "nmon"; homepage = "https://nmon.sourceforge.net"; license = licenses.gpl3Plus; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/nsncd/default.nix b/pkgs/os-specific/linux/nsncd/default.nix index 01cb6695b330..0ad11ee8b79f 100644 --- a/pkgs/os-specific/linux/nsncd/default.nix +++ b/pkgs/os-specific/linux/nsncd/default.nix @@ -26,6 +26,7 @@ rustPlatform.buildRustPackage rec { meta = with lib; { description = "the name service non-caching daemon"; + mainProgram = "nsncd"; longDescription = '' nsncd is a nscd-compatible daemon that proxies lookups, without caching. ''; diff --git a/pkgs/os-specific/linux/numad/default.nix b/pkgs/os-specific/linux/numad/default.nix index 24fc9e188741..2eabbc95fa13 100644 --- a/pkgs/os-specific/linux/numad/default.nix +++ b/pkgs/os-specific/linux/numad/default.nix @@ -23,6 +23,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A user-level daemon that monitors NUMA topology and processes resource consumption to facilitate good NUMA resource access"; + mainProgram = "numad"; homepage = "https://fedoraproject.org/wiki/Features/numad"; license = licenses.lgpl21; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/numatop/default.nix b/pkgs/os-specific/linux/numatop/default.nix index f4995264b09e..159afa467dc3 100644 --- a/pkgs/os-specific/linux/numatop/default.nix +++ b/pkgs/os-specific/linux/numatop/default.nix @@ -33,6 +33,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Tool for runtime memory locality characterization and analysis of processes and threads on a NUMA system"; + mainProgram = "numatop"; homepage = "https://01.org/numatop"; license = licenses.bsd3; maintainers = with maintainers; [ dtzWill ]; diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 449ff8042a70..9bfbe18f16ab 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -33,14 +33,12 @@ rec { stable = if stdenv.hostPlatform.system == "i686-linux" then legacy_390 else latest; production = generic { - version = "535.154.05"; - sha256_64bit = "sha256-fpUGXKprgt6SYRDxSCemGXLrEsIA6GOinp+0eGbqqJg="; - sha256_aarch64 = "sha256-G0/GiObf/BZMkzzET8HQjdIcvCSqB1uhsinro2HLK9k="; - openSha256 = "sha256-wvRdHguGLxS0mR06P5Qi++pDJBCF8pJ8hr4T8O6TJIo="; - settingsSha256 = "sha256-9wqoDEWY4I7weWW05F4igj1Gj9wjHsREFMztfEmqm10="; - persistencedSha256 = "sha256-d0Q3Lk80JqkS1B54Mahu2yY/WocOqFFbZVBh+ToGhaE="; - - patches = [ rcu_patch ]; + version = "550.67"; + sha256_64bit = "sha256-mSAaCccc/w/QJh6w8Mva0oLrqB+cOSO1YMz1Se/32uI="; + sha256_aarch64 = "sha256-+UuK0UniAsndN15VDb/xopjkdlc6ZGk5LIm/GNs5ivA="; + openSha256 = "sha256-M/1qAQxTm61bznAtCoNQXICfThh3hLqfd0s1n1BFj2A="; + settingsSha256 = "sha256-FUEwXpeUMH1DYH77/t76wF1UslkcW721x9BHasaRUaM="; + persistencedSha256 = "sha256-ojHbmSAOYl3lOi2X6HOBlokTXhTCK6VNsH6+xfGQsyo="; }; latest = selectHighestVersion production (generic { diff --git a/pkgs/os-specific/linux/nvmet-cli/default.nix b/pkgs/os-specific/linux/nvmet-cli/default.nix index 4196efeae672..eafa8501cdb7 100644 --- a/pkgs/os-specific/linux/nvmet-cli/default.nix +++ b/pkgs/os-specific/linux/nvmet-cli/default.nix @@ -18,6 +18,7 @@ python3Packages.buildPythonApplication rec { meta = with lib; { description = "NVMe target CLI"; + mainProgram = "nvmetcli"; license = licenses.asl20; platforms = platforms.linux; maintainers = with maintainers; [ hoverbear ]; 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 61a27bd51f02..4f499197fbfd 100644 --- a/pkgs/os-specific/linux/oci-seccomp-bpf-hook/default.nix +++ b/pkgs/os-specific/linux/oci-seccomp-bpf-hook/default.nix @@ -53,6 +53,7 @@ buildGoModule rec { description = '' OCI hook to trace syscalls and generate a seccomp profile ''; + mainProgram = "oci-seccomp-bpf-hook"; license = licenses.asl20; maintainers = with maintainers; [ saschagrunert ]; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/odp-dpdk/default.nix b/pkgs/os-specific/linux/odp-dpdk/default.nix index 7ac560824db8..bc8bf488def9 100644 --- a/pkgs/os-specific/linux/odp-dpdk/default.nix +++ b/pkgs/os-specific/linux/odp-dpdk/default.nix @@ -10,8 +10,9 @@ , numactl , openssl , zlib +, zstd , libbsd -, libelf +, elfutils , jansson , libnl }: @@ -37,8 +38,9 @@ stdenv.mkDerivation rec { numactl openssl zlib + zstd libbsd - libelf + elfutils jansson libbpf libnl diff --git a/pkgs/os-specific/linux/openrazer/driver.nix b/pkgs/os-specific/linux/openrazer/driver.nix index f98fe5cfc743..a2116797824c 100644 --- a/pkgs/os-specific/linux/openrazer/driver.nix +++ b/pkgs/os-specific/linux/openrazer/driver.nix @@ -45,6 +45,7 @@ stdenv.mkDerivation (common // { meta = common.meta // { description = "An entirely open source Linux driver that allows you to manage your Razer peripherals on GNU/Linux"; + mainProgram = "razer_mount"; broken = kernel.kernelOlder "4.19"; }; }) diff --git a/pkgs/os-specific/linux/otpw/default.nix b/pkgs/os-specific/linux/otpw/default.nix index c379c149a358..45d0b77906d3 100644 --- a/pkgs/os-specific/linux/otpw/default.nix +++ b/pkgs/os-specific/linux/otpw/default.nix @@ -47,6 +47,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A one-time password login package"; + mainProgram = "otpw-gen"; homepage = "http://www.cl.cam.ac.uk/~mgk25/otpw.html"; license = licenses.gpl2Plus; maintainers = with maintainers; [ ]; diff --git a/pkgs/os-specific/linux/pagemon/default.nix b/pkgs/os-specific/linux/pagemon/default.nix index 2ce723913578..c05bd6183fc4 100644 --- a/pkgs/os-specific/linux/pagemon/default.nix +++ b/pkgs/os-specific/linux/pagemon/default.nix @@ -21,6 +21,7 @@ stdenv.mkDerivation rec { meta = with lib; { inherit (src.meta) homepage; description = "Interactive memory/page monitor for Linux"; + mainProgram = "pagemon"; longDescription = '' pagemon is an ncurses based interactive memory/page monitoring tool allowing one to browse the memory map of an active running process diff --git a/pkgs/os-specific/linux/pam_ccreds/default.nix b/pkgs/os-specific/linux/pam_ccreds/default.nix index 4b2cc7a3822b..359636e74281 100644 --- a/pkgs/os-specific/linux/pam_ccreds/default.nix +++ b/pkgs/os-specific/linux/pam_ccreds/default.nix @@ -17,6 +17,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://www.padl.com/OSS/pam_ccreds.html"; description = "PAM module to locally authenticate using an enterprise identity when the network is unavailable"; + mainProgram = "ccreds_chkpwd"; license = licenses.gpl2; platforms = platforms.linux; }; diff --git a/pkgs/os-specific/linux/pam_tmpdir/default.nix b/pkgs/os-specific/linux/pam_tmpdir/default.nix index 859ebedc3340..2eee7c92f5c3 100644 --- a/pkgs/os-specific/linux/pam_tmpdir/default.nix +++ b/pkgs/os-specific/linux/pam_tmpdir/default.nix @@ -29,6 +29,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://tracker.debian.org/pkg/pam-tmpdir"; description = "PAM module for creating safe per-user temporary directories"; + mainProgram = "pam-tmpdir-helper"; license = licenses.gpl2Only; maintainers = with maintainers; [ peterhoeg ]; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/paxctl/default.nix b/pkgs/os-specific/linux/paxctl/default.nix index da9928a66e3b..fbb0e00ebe91 100644 --- a/pkgs/os-specific/linux/paxctl/default.nix +++ b/pkgs/os-specific/linux/paxctl/default.nix @@ -26,6 +26,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A tool for controlling PaX flags on a per binary basis"; + mainProgram = "paxctl"; homepage = "https://pax.grsecurity.net"; license = licenses.gpl2; platforms = platforms.all; diff --git a/pkgs/os-specific/linux/paxtest/default.nix b/pkgs/os-specific/linux/paxtest/default.nix index aae8c1296c63..acea7cbe49f7 100644 --- a/pkgs/os-specific/linux/paxtest/default.nix +++ b/pkgs/os-specific/linux/paxtest/default.nix @@ -17,6 +17,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Test various memory protection measures"; + mainProgram = "paxtest"; license = licenses.gpl2; platforms = platforms.linux; maintainers = with maintainers; [ copumpkin joachifm ]; diff --git a/pkgs/os-specific/linux/pcimem/default.nix b/pkgs/os-specific/linux/pcimem/default.nix index dda4d0fff0b9..2f41e4c7395e 100644 --- a/pkgs/os-specific/linux/pcimem/default.nix +++ b/pkgs/os-specific/linux/pcimem/default.nix @@ -22,6 +22,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Simple method of reading and writing to memory registers on a PCI card"; + mainProgram = "pcimem"; homepage = "https://github.com/billfarrow/pcimem"; license = licenses.gpl2Only; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/pcm/default.nix b/pkgs/os-specific/linux/pcm/default.nix index 7a86a58ffa12..e464d113e2f7 100644 --- a/pkgs/os-specific/linux/pcm/default.nix +++ b/pkgs/os-specific/linux/pcm/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "pcm"; - version = "202401"; + version = "202403"; src = fetchFromGitHub { owner = "opcm"; repo = "pcm"; rev = version; - hash = "sha256-S4E9q4pdF9pT0ehKkeOMbJEFlTV9zB15BZA0R+cjVi8="; + hash = "sha256-qefqtuxRaQEsWpXNAuGxuIT3LiH2b8xQb54B0RkzKGA="; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/os-specific/linux/pflask/default.nix b/pkgs/os-specific/linux/pflask/default.nix index 1270a9b9494f..0394a3311ba2 100644 --- a/pkgs/os-specific/linux/pflask/default.nix +++ b/pkgs/os-specific/linux/pflask/default.nix @@ -30,6 +30,7 @@ stdenv.mkDerivation rec { meta = { description = "Lightweight process containers for Linux"; + mainProgram = "pflask"; homepage = "https://ghedo.github.io/pflask/"; license = lib.licenses.bsd2; platforms = lib.platforms.linux; diff --git a/pkgs/os-specific/linux/piper/default.nix b/pkgs/os-specific/linux/piper/default.nix index 39b0eaf5325e..b1508dcb6a3e 100644 --- a/pkgs/os-specific/linux/piper/default.nix +++ b/pkgs/os-specific/linux/piper/default.nix @@ -33,6 +33,7 @@ python3.pkgs.buildPythonApplication rec { meta = with lib; { description = "GTK frontend for ratbagd mouse config daemon"; + mainProgram = "piper"; homepage = "https://github.com/libratbag/piper"; license = licenses.gpl2; maintainers = with maintainers; [ mvnetbiz ]; diff --git a/pkgs/os-specific/linux/pipework/default.nix b/pkgs/os-specific/linux/pipework/default.nix index 3591303a8d0c..56d192ad308b 100644 --- a/pkgs/os-specific/linux/pipework/default.nix +++ b/pkgs/os-specific/linux/pipework/default.nix @@ -19,6 +19,7 @@ stdenv.mkDerivation { ''; meta = with lib; { description = "Software-Defined Networking tools for LXC"; + mainProgram = "pipework"; homepage = "https://github.com/jpetazzo/pipework"; license = licenses.asl20; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/pktgen/default.nix b/pkgs/os-specific/linux/pktgen/default.nix index b81bf74a3d9e..66971444e71a 100644 --- a/pkgs/os-specific/linux/pktgen/default.nix +++ b/pkgs/os-specific/linux/pktgen/default.nix @@ -18,23 +18,15 @@ stdenv.mkDerivation rec { pname = "pktgen"; - version = "22.07.1"; + version = "23.10.0"; src = fetchFromGitHub { owner = "pktgen"; repo = "Pktgen-DPDK"; rev = "pktgen-${version}"; - sha256 = "sha256-wBLGwVdn3ymUTVv7J/kbQYz4WNIgV246PHg51+FStUo="; + sha256 = "sha256-eujVEU+XkxF1kIGQJoBW3oXXNSqBEzx6mwR2XYoHinM="; }; - patches = [ - (fetchpatch { - # Ealier DPDK deprecated some macros, which were finally removed in >= 22.11 - url = "https://github.com/pktgen/Pktgen-DPDK/commit/089ef94ac04629f7380f5e618443bcacb2cef5ab.patch"; - sha256 = "sha256-ITU/dIfu7QPpdIVYuCuDhDG9rVF+n8i1YYn9bFmQUME="; - }) - ]; - nativeBuildInputs = [ meson ninja pkg-config ]; buildInputs = [ @@ -47,9 +39,7 @@ stdenv.mkDerivation rec { GUI = lib.optionalString withGtk "true"; env.NIX_CFLAGS_COMPILE = toString [ - # Needed with GCC 12 - "-Wno-error=address" - "-Wno-error=use-after-free" + "-Wno-error=sign-compare" ]; # requires symbols from this file diff --git a/pkgs/os-specific/linux/ply/default.nix b/pkgs/os-specific/linux/ply/default.nix index dbd8925a5cb3..0c8e323b4349 100644 --- a/pkgs/os-specific/linux/ply/default.nix +++ b/pkgs/os-specific/linux/ply/default.nix @@ -32,6 +32,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Dynamic tracing in Linux"; + mainProgram = "ply"; homepage = "https://wkz.github.io/ply/"; license = [ licenses.gpl2Only ]; maintainers = with maintainers; [ mic92 mbbx6spp ]; diff --git a/pkgs/os-specific/linux/pommed-light/default.nix b/pkgs/os-specific/linux/pommed-light/default.nix index 113cedfab2e9..f92a9c1b5d1d 100644 --- a/pkgs/os-specific/linux/pommed-light/default.nix +++ b/pkgs/os-specific/linux/pommed-light/default.nix @@ -63,6 +63,7 @@ stdenv.mkDerivation rec { meta = { description = "A trimmed version of the pommed hotkey handler for MacBooks"; + mainProgram = "pommed"; longDescription = '' This is a stripped-down version of pommed with client, dbus, and ambient light sensor support removed, optimized for use with dwm diff --git a/pkgs/os-specific/linux/power-calibrate/default.nix b/pkgs/os-specific/linux/power-calibrate/default.nix index d4ae90cddd7c..d2ce5d4d4fa7 100644 --- a/pkgs/os-specific/linux/power-calibrate/default.nix +++ b/pkgs/os-specific/linux/power-calibrate/default.nix @@ -19,6 +19,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Tool to calibrate power consumption"; + mainProgram = "power-calibrate"; homepage = "https://github.com/ColinIanKing/power-calibrate"; license = licenses.gpl2; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/power-profiles-daemon/default.nix b/pkgs/os-specific/linux/power-profiles-daemon/default.nix index dcf146a01fa6..2ea7a06b46e1 100644 --- a/pkgs/os-specific/linux/power-profiles-daemon/default.nix +++ b/pkgs/os-specific/linux/power-profiles-daemon/default.nix @@ -109,6 +109,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://gitlab.freedesktop.org/hadess/power-profiles-daemon"; description = "Makes user-selected power profiles handling available over D-Bus"; + mainProgram = "powerprofilesctl"; platforms = platforms.linux; license = licenses.gpl3Plus; maintainers = with maintainers; [ mvnetbiz ]; diff --git a/pkgs/os-specific/linux/powerstat/default.nix b/pkgs/os-specific/linux/powerstat/default.nix index 23378b67b4b5..83f0aa634efa 100644 --- a/pkgs/os-specific/linux/powerstat/default.nix +++ b/pkgs/os-specific/linux/powerstat/default.nix @@ -19,6 +19,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Laptop power measuring tool"; + mainProgram = "powerstat"; homepage = "https://github.com/ColinIanKing/powerstat"; license = licenses.gpl2; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/powertop/default.nix b/pkgs/os-specific/linux/powertop/default.nix index 481cf1cd3bb5..756bd99816fb 100644 --- a/pkgs/os-specific/linux/powertop/default.nix +++ b/pkgs/os-specific/linux/powertop/default.nix @@ -50,6 +50,7 @@ stdenv.mkDerivation rec { inherit (src.meta) homepage; changelog = "https://github.com/fenrus75/powertop/releases/tag/v${version}"; description = "Analyze power consumption on Intel-based laptops"; + mainProgram = "powertop"; license = licenses.gpl2Only; maintainers = with maintainers; [ fpletz anthonyroussel ]; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/prl-tools/default.nix b/pkgs/os-specific/linux/prl-tools/default.nix index f8196dba6157..6acb8eba3863 100644 --- a/pkgs/os-specific/linux/prl-tools/default.nix +++ b/pkgs/os-specific/linux/prl-tools/default.nix @@ -36,13 +36,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "prl-tools"; - version = "19.2.1-54832"; + version = "19.3.0-54924"; # We download the full distribution to extract prl-tools-lin.iso from # => ${dmg}/Parallels\ Desktop.app/Contents/Resources/Tools/prl-tools-lin.iso src = fetchurl { url = "https://download.parallels.com/desktop/v${lib.versions.major finalAttrs.version}/${finalAttrs.version}/ParallelsDesktop-${finalAttrs.version}.dmg"; - hash = "sha256-PmQSGoJbB0+Q7t56FOFxOVQ86CJLqAa6PTnWLx5CzpA="; + hash = "sha256-Hj1manQSZHiht6mmWes44RVk2Bdqp6QdNCdK322bzWc="; }; hardeningDisable = [ "pic" "format" ]; diff --git a/pkgs/os-specific/linux/procdump/default.nix b/pkgs/os-specific/linux/procdump/default.nix index 05ec4b90ed70..0d648782e38c 100644 --- a/pkgs/os-specific/linux/procdump/default.nix +++ b/pkgs/os-specific/linux/procdump/default.nix @@ -53,6 +53,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A Linux version of the ProcDump Sysinternals tool"; + mainProgram = "procdump"; homepage = "https://github.com/Microsoft/ProcDump-for-Linux"; license = licenses.mit; maintainers = with maintainers; [ c0bw3b ]; diff --git a/pkgs/os-specific/linux/pscircle/default.nix b/pkgs/os-specific/linux/pscircle/default.nix index a7ee92beb52b..712eea0c3651 100644 --- a/pkgs/os-specific/linux/pscircle/default.nix +++ b/pkgs/os-specific/linux/pscircle/default.nix @@ -24,6 +24,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://gitlab.com/mildlyparallel/pscircle"; description = "Visualize Linux processes in a form of a radial tree"; + mainProgram = "pscircle"; license = licenses.gpl2; maintainers = [ maintainers.ldesgoui ]; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/psmisc/default.nix b/pkgs/os-specific/linux/psmisc/default.nix index f269c9146df4..0f920eeafb5d 100644 --- a/pkgs/os-specific/linux/psmisc/default.nix +++ b/pkgs/os-specific/linux/psmisc/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "psmisc"; - version = "23.6"; + version = "23.7"; src = fetchFromGitLab { owner = pname; repo = pname; rev = "v${version}"; - hash = "sha256-TjnOn8a7HAgt11zcM0i5DM5ERmsvLJHvo1e5FOsl6IA="; + hash = "sha256-49YpdIh0DxLHfxos4sw1HUkV0XQBqmm4M9b0T4eN2xI="; }; nativeBuildInputs = [ autoconf automake gettext ]; diff --git a/pkgs/os-specific/linux/qperf/default.nix b/pkgs/os-specific/linux/qperf/default.nix index a074cde448d9..896b5f5c1ff4 100644 --- a/pkgs/os-specific/linux/qperf/default.nix +++ b/pkgs/os-specific/linux/qperf/default.nix @@ -35,6 +35,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Measure RDMA and IP performance"; + mainProgram = "qperf"; homepage = "https://github.com/linux-rdma/qperf"; license = licenses.gpl2Only; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/radeontop/default.nix b/pkgs/os-specific/linux/radeontop/default.nix index 9e9cb5845e4e..49e2fdfd90b5 100644 --- a/pkgs/os-specific/linux/radeontop/default.nix +++ b/pkgs/os-specific/linux/radeontop/default.nix @@ -31,6 +31,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Top-like tool for viewing AMD Radeon GPU utilization"; + mainProgram = "radeontop"; longDescription = '' View GPU utilization, both for the total activity percent and individual blocks. Supports R600 and later cards: even Southern Islands should work. diff --git a/pkgs/os-specific/linux/rasdaemon/default.nix b/pkgs/os-specific/linux/rasdaemon/default.nix index c65a11fe8525..35478732fb8c 100644 --- a/pkgs/os-specific/linux/rasdaemon/default.nix +++ b/pkgs/os-specific/linux/rasdaemon/default.nix @@ -2,6 +2,7 @@ , autoreconfHook, pkg-config , glibcLocales, kmod, coreutils, perl , dmidecode, hwdata, sqlite, libtraceevent +, fetchpatch , nixosTests }: @@ -16,6 +17,14 @@ stdenv.mkDerivation rec { sha256 = "sha256-BX3kc629FOh5cnD6Sa/69wKdhmhT3Rpz5ZvhnD4MclQ="; }; + patches = [ + (fetchpatch { # fix #295002 (segfault on AMD), will be in the release after 0.8.0 + name = "fix crash on AMD"; + url = "https://github.com/mchehab/rasdaemon/commit/f1ea76375281001cdf4a048c1a4a24d86c6fbe48.patch"; + hash = "sha256-1VPDTrAsvZGiGbh52EUdG6tYV/n6wUS0mphOSXzran0="; + }) + ]; + nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ diff --git a/pkgs/os-specific/linux/reap/default.nix b/pkgs/os-specific/linux/reap/default.nix index fbbabc96c781..79bfe2936276 100644 --- a/pkgs/os-specific/linux/reap/default.nix +++ b/pkgs/os-specific/linux/reap/default.nix @@ -20,6 +20,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://github.com/leahneukirchen/reap"; description = "run process until all its spawned processes are dead "; + mainProgram = "reap"; license = with licenses; [ publicDomain ]; platforms = platforms.linux; maintainers = [ maintainers.leahneukirchen ]; diff --git a/pkgs/os-specific/linux/regionset/default.nix b/pkgs/os-specific/linux/regionset/default.nix index f685eec19488..07154a1fc9a1 100644 --- a/pkgs/os-specific/linux/regionset/default.nix +++ b/pkgs/os-specific/linux/regionset/default.nix @@ -19,6 +19,7 @@ stdenv.mkDerivation { inherit version; homepage = "http://linvdr.org/projects/regionset/"; description = "Tool for changing the region code setting of DVD players"; + mainProgram = "regionset"; license = licenses.gpl2Plus; platforms = platforms.linux; }; diff --git a/pkgs/os-specific/linux/reptyr/default.nix b/pkgs/os-specific/linux/reptyr/default.nix index fadb9df98086..5a9e58c3f6f9 100644 --- a/pkgs/os-specific/linux/reptyr/default.nix +++ b/pkgs/os-specific/linux/reptyr/default.nix @@ -40,6 +40,7 @@ in stdenv.mkDerivation rec { maintainers = with lib.maintainers; [raskin]; license = lib.licenses.mit; description = "Reparent a running program to a new terminal"; + mainProgram = "reptyr"; homepage = "https://github.com/nelhage/reptyr"; }; } diff --git a/pkgs/os-specific/linux/rfkill/udev.nix b/pkgs/os-specific/linux/rfkill/udev.nix index e1a14a80162c..53cbf68330c6 100644 --- a/pkgs/os-specific/linux/rfkill/udev.nix +++ b/pkgs/os-specific/linux/rfkill/udev.nix @@ -50,6 +50,7 @@ in stdenv.mkDerivation { meta = with lib; { homepage = "http://wireless.kernel.org/en/users/Documentation/rfkill"; description = "Rules+hook for udev to catch rfkill state changes"; + mainProgram = "rfkill-hook.sh"; platforms = platforms.linux; license = licenses.mit; }; diff --git a/pkgs/os-specific/linux/rtkit/default.nix b/pkgs/os-specific/linux/rtkit/default.nix index 69d32079d5c7..c6bb4e0cbfcd 100644 --- a/pkgs/os-specific/linux/rtkit/default.nix +++ b/pkgs/os-specific/linux/rtkit/default.nix @@ -50,6 +50,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://github.com/heftig/rtkit"; description = "A daemon that hands out real-time priority to processes"; + mainProgram = "rtkitctl"; license = with licenses; [ gpl3 bsd0 ]; # lib is bsd license platforms = platforms.linux; }; diff --git a/pkgs/os-specific/linux/rtl8814au/default.nix b/pkgs/os-specific/linux/rtl8814au/default.nix index 0b1522c96972..bef60b52814d 100644 --- a/pkgs/os-specific/linux/rtl8814au/default.nix +++ b/pkgs/os-specific/linux/rtl8814au/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation { pname = "rtl8814au"; - version = "${kernel.version}-unstable-2023-03-21"; + version = "${kernel.version}-unstable-2024-03-19"; src = fetchFromGitHub { owner = "morrownr"; repo = "8814au"; - rev = "6f80699e68fd2a9f2bba3f1a56ca06d1b7992bd8"; - hash = "sha256-7dv+8vNI1OLLA4SdZQPL87pTS9HR6mGijzWo9WL7vc0="; + rev = "d7945c1e0244c83cbbad4da331648246f12eaee9"; + hash = "sha256-idjHlvyFpQgLGfNAPpZKRnLdXnAogUW3qGHC1WzGVmA="; }; nativeBuildInputs = kernel.moduleBuildDependencies; diff --git a/pkgs/os-specific/linux/ryzenadj/default.nix b/pkgs/os-specific/linux/ryzenadj/default.nix index 0744ed2896ff..ef671b2f16c4 100644 --- a/pkgs/os-specific/linux/ryzenadj/default.nix +++ b/pkgs/os-specific/linux/ryzenadj/default.nix @@ -1,13 +1,13 @@ { lib, stdenv, fetchFromGitHub, pciutils, cmake }: stdenv.mkDerivation rec { pname = "ryzenadj"; - version = "0.14.0"; + version = "0.15.0"; src = fetchFromGitHub { owner = "FlyGoat"; repo = "RyzenAdj"; rev = "v${version}"; - sha256 = "sha256-Lqq4LNRmqQyeIJfr/+tYdKMEk+P54VnwZAQZcE0ev8Y="; + sha256 = "sha256-aNkVP1fuPcb41Qk5YI1loJnqVmamSzoMFyTGkJtrnvg="; }; nativeBuildInputs = [ pciutils cmake ]; @@ -19,6 +19,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Adjust power management settings for Ryzen Mobile Processors."; + mainProgram = "ryzenadj"; homepage = "https://github.com/FlyGoat/RyzenAdj"; license = licenses.lgpl3Only; maintainers = with maintainers; [ rhendric ]; diff --git a/pkgs/os-specific/linux/schedtool/default.nix b/pkgs/os-specific/linux/schedtool/default.nix index 98d9248e3f42..d3d009db1714 100644 --- a/pkgs/os-specific/linux/schedtool/default.nix +++ b/pkgs/os-specific/linux/schedtool/default.nix @@ -15,6 +15,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Query or alter a process' scheduling policy under Linux"; + mainProgram = "schedtool"; homepage = "https://freequaos.host.sk/schedtool/"; license = licenses.gpl2; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/sd-switch/default.nix b/pkgs/os-specific/linux/sd-switch/default.nix index b231f32d42a1..7750862c34c2 100644 --- a/pkgs/os-specific/linux/sd-switch/default.nix +++ b/pkgs/os-specific/linux/sd-switch/default.nix @@ -19,6 +19,7 @@ in rustPlatform.buildRustPackage { meta = with lib; { description = "A systemd unit switcher for Home Manager"; + mainProgram = "sd-switch"; homepage = "https://gitlab.com/rycee/sd-switch"; license = licenses.gpl3Plus; maintainers = with maintainers; [ rycee ]; diff --git a/pkgs/os-specific/linux/service-wrapper/default.nix b/pkgs/os-specific/linux/service-wrapper/default.nix index 381f0699697a..e7aa3ea9d49d 100644 --- a/pkgs/os-specific/linux/service-wrapper/default.nix +++ b/pkgs/os-specific/linux/service-wrapper/default.nix @@ -14,6 +14,7 @@ runCommand name { meta = with lib; { description = "A convenient wrapper for the systemctl commands, borrow from Ubuntu"; + mainProgram = "service"; license = licenses.gpl2Plus; platforms = platforms.linux; maintainers = with maintainers; [ DerTim1 ]; diff --git a/pkgs/os-specific/linux/seturgent/default.nix b/pkgs/os-specific/linux/seturgent/default.nix index 6d83e322ce8f..b8c02f47d0ee 100644 --- a/pkgs/os-specific/linux/seturgent/default.nix +++ b/pkgs/os-specific/linux/seturgent/default.nix @@ -23,6 +23,7 @@ stdenv.mkDerivation rec { meta = with lib; { platforms = platforms.linux; description = "Set an application's urgency hint (or not)"; + mainProgram = "seturgent"; maintainers = with maintainers; [ yarr ]; homepage = "https://codemadness.org/seturgent-set-urgency-hints-for-x-applications.html"; license = licenses.mit; diff --git a/pkgs/os-specific/linux/shadow/default.nix b/pkgs/os-specific/linux/shadow/default.nix index 946299366c0a..8329e9e8f966 100644 --- a/pkgs/os-specific/linux/shadow/default.nix +++ b/pkgs/os-specific/linux/shadow/default.nix @@ -17,13 +17,13 @@ in stdenv.mkDerivation rec { pname = "shadow"; - version = "4.14.5"; + version = "4.14.6"; src = fetchFromGitHub { owner = "shadow-maint"; repo = pname; rev = version; - hash = "sha256-ogkPp6dxWHdvJvWcb5iauH81CVTH7BbonFXG1gGysUE="; + hash = "sha256-+klU1a0cSgHPwZkDnbCSjKnBUKIm2Z3OGUvR/zrqQxo="; }; outputs = [ "out" "su" "dev" "man" ]; diff --git a/pkgs/os-specific/linux/sinit/default.nix b/pkgs/os-specific/linux/sinit/default.nix index a412461bfd51..3bf73a8f495e 100644 --- a/pkgs/os-specific/linux/sinit/default.nix +++ b/pkgs/os-specific/linux/sinit/default.nix @@ -21,6 +21,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A very minimal Linux init implementation from suckless.org"; + mainProgram = "sinit"; license = licenses.mit; maintainers = with maintainers; [ raskin ]; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/smemstat/default.nix b/pkgs/os-specific/linux/smemstat/default.nix index e5d7fb1a13b6..05ad1ddb0335 100644 --- a/pkgs/os-specific/linux/smemstat/default.nix +++ b/pkgs/os-specific/linux/smemstat/default.nix @@ -20,6 +20,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Memory usage monitoring tool"; + mainProgram = "smemstat"; homepage = "https://github.com/ColinIanKing/smemstat"; license = licenses.gpl2; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/statifier/default.nix b/pkgs/os-specific/linux/statifier/default.nix index eefd95d1153a..6aa11cad4f25 100644 --- a/pkgs/os-specific/linux/statifier/default.nix +++ b/pkgs/os-specific/linux/statifier/default.nix @@ -18,6 +18,7 @@ multiStdenv.mkDerivation rec { meta = with lib; { description = "Tool for creating static Linux binaries"; + mainProgram = "statifier"; platforms = platforms.linux; license = licenses.gpl2; }; diff --git a/pkgs/os-specific/linux/swapview/default.nix b/pkgs/os-specific/linux/swapview/default.nix index 8eb455501052..3ef2426fad93 100644 --- a/pkgs/os-specific/linux/swapview/default.nix +++ b/pkgs/os-specific/linux/swapview/default.nix @@ -15,6 +15,7 @@ rustPlatform.buildRustPackage rec { meta = with lib; { description = "A simple program to view processes' swap usage on Linux"; + mainProgram = "swapview"; homepage = "https://github.com/lilydjwg/swapview"; platforms = platforms.linux; license = with licenses; [ bsd3 ]; diff --git a/pkgs/os-specific/linux/switcheroo-control/default.nix b/pkgs/os-specific/linux/switcheroo-control/default.nix index a749168f5bc4..a6993af54910 100644 --- a/pkgs/os-specific/linux/switcheroo-control/default.nix +++ b/pkgs/os-specific/linux/switcheroo-control/default.nix @@ -46,6 +46,7 @@ python3Packages.buildPythonApplication rec { meta = with lib; { description = "D-Bus service to check the availability of dual-GPU"; + mainProgram = "switcherooctl"; homepage = "https://gitlab.freedesktop.org/hadess/switcheroo-control/"; changelog = "https://gitlab.freedesktop.org/hadess/switcheroo-control/-/blob/${version}/NEWS"; license = licenses.gpl3Plus; diff --git a/pkgs/os-specific/linux/system76-power/default.nix b/pkgs/os-specific/linux/system76-power/default.nix index f1a4c9b7bb3b..6a5456080f59 100644 --- a/pkgs/os-specific/linux/system76-power/default.nix +++ b/pkgs/os-specific/linux/system76-power/default.nix @@ -24,6 +24,7 @@ rustPlatform.buildRustPackage rec { meta = with lib; { description = "System76 Power Management"; + mainProgram = "system76-power"; homepage = "https://github.com/pop-os/system76-power"; license = licenses.gpl3Plus; platforms = [ "i686-linux" "x86_64-linux" ]; diff --git a/pkgs/os-specific/linux/system76-scheduler/default.nix b/pkgs/os-specific/linux/system76-scheduler/default.nix index 99c54900cf71..0608fd1c10d0 100644 --- a/pkgs/os-specific/linux/system76-scheduler/default.nix +++ b/pkgs/os-specific/linux/system76-scheduler/default.nix @@ -35,6 +35,7 @@ in rustPlatform.buildRustPackage { meta = with lib; { description = "System76 Scheduler"; + mainProgram = "system76-scheduler"; homepage = "https://github.com/pop-os/system76-scheduler"; license = licenses.mpl20; platforms = [ "x86_64-linux" "x86-linux" "aarch64-linux" ]; diff --git a/pkgs/os-specific/linux/systemd-wait/default.nix b/pkgs/os-specific/linux/systemd-wait/default.nix index 348549a1bc64..99e07ebbf49c 100644 --- a/pkgs/os-specific/linux/systemd-wait/default.nix +++ b/pkgs/os-specific/linux/systemd-wait/default.nix @@ -19,6 +19,7 @@ python3Packages.buildPythonApplication rec { homepage = "https://github.com/Stebalien/systemd-wait"; license = lib.licenses.gpl3; description = "Wait for a systemd unit to enter a specific state"; + mainProgram = "systemd-wait"; maintainers = [ lib.maintainers.benley ]; platforms = lib.platforms.linux; }; diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 135d61fd71d7..05e66dd704af 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -866,7 +866,7 @@ stdenv.mkDerivation (finalAttrs: { # needed - and therefore `interfaceVersion` should be incremented. interfaceVersion = 2; - inherit withBootloader withCryptsetup withHostnamed withImportd withKmod + inherit withBootloader withCryptsetup withEfi withHostnamed withImportd withKmod withLocaled withMachined withPortabled withTimedated withUtmp util-linux kmod kbd; tests = { diff --git a/pkgs/os-specific/linux/tailor-gui/default.nix b/pkgs/os-specific/linux/tailor-gui/default.nix index 69367ca6c255..531b956f1128 100644 --- a/pkgs/os-specific/linux/tailor-gui/default.nix +++ b/pkgs/os-specific/linux/tailor-gui/default.nix @@ -48,6 +48,7 @@ stdenv.mkDerivation { meta = with lib; { description = "Rust GUI for interacting with hardware from TUXEDO Computers"; + mainProgram = "tailor_gui"; longDescription = '' An alternative to the TUXEDO Control Center (https://www.tuxedocomputers.com/en/TUXEDO-Control-Center.tuxedo), written in Rust. diff --git a/pkgs/os-specific/linux/target-isns/default.nix b/pkgs/os-specific/linux/target-isns/default.nix index fdc0c52a0bf7..397e414490c2 100644 --- a/pkgs/os-specific/linux/target-isns/default.nix +++ b/pkgs/os-specific/linux/target-isns/default.nix @@ -28,6 +28,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "iSNS client for the Linux LIO iSCSI target"; + mainProgram = "target-isns"; homepage = "https://github.com/open-iscsi/target-isns"; maintainers = [ maintainers.markuskowa ]; license = licenses.gpl2Only; diff --git a/pkgs/os-specific/linux/tiscamera/0001-cmake-find-aravis-fix-pkg-cfg-include-dirs.patch b/pkgs/os-specific/linux/tiscamera/0001-cmake-find-aravis-fix-pkg-cfg-include-dirs.patch deleted file mode 100644 index 0e9821467850..000000000000 --- a/pkgs/os-specific/linux/tiscamera/0001-cmake-find-aravis-fix-pkg-cfg-include-dirs.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 90b540bd135de2587352719b14c385b20aa572be Mon Sep 17 00:00:00 2001 -From: Raymond Gauthier <jraygauthier@gmail.com> -Date: Wed, 15 Jun 2022 16:09:58 -0400 -Subject: [PATCH] cmake-find-aravis: fix pkg cfg include dirs - ---- - cmake/modules/FindAravis.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmake/modules/FindAravis.cmake b/cmake/modules/FindAravis.cmake -index 5dab5431..811302b9 100644 ---- a/cmake/modules/FindAravis.cmake -+++ b/cmake/modules/FindAravis.cmake -@@ -20,7 +20,7 @@ find_path(aravis_INCLUDE_DIR - arv.h - PATHS - ${aravis_PKGCONF_INCLUDE_DIRS} -- ${aravis0_6_PKGCONF_INCLUDE_DIRS} -+ ${aravis0_8_PKGCONF_INCLUDE_DIRS} - /usr/local/include - # /usr/local/include/aravis-0.4 - /usr/local/include/aravis-0.8 --- -2.31.1 - diff --git a/pkgs/os-specific/linux/tiscamera/0001-tcamconvert-tcamsrc-add-missing-include-lib-dirs.patch b/pkgs/os-specific/linux/tiscamera/0001-tcamconvert-tcamsrc-add-missing-include-lib-dirs.patch deleted file mode 100644 index 3d1e5503bcd3..000000000000 --- a/pkgs/os-specific/linux/tiscamera/0001-tcamconvert-tcamsrc-add-missing-include-lib-dirs.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 5e7146e176cb1b01b47d16a66763469dccd87f25 Mon Sep 17 00:00:00 2001 -From: Raymond Gauthier <jraygauthier@gmail.com> -Date: Thu, 9 Jun 2022 19:45:30 -0400 -Subject: [PATCH] tcamconvert&tcamsrc: add missing include/lib dirs - -These were building libraries with dependencies on gstreamer-video -and gstreamer-base but weren't adding the proper include and -lib directories which resulted in build failure on systems -where video and base aren't installed in the same location -as gstreamer itself (e.g: nix, nixos). ---- - src/gstreamer-1.0/tcamconvert/CMakeLists.txt | 2 ++ - src/gstreamer-1.0/tcamsrc/CMakeLists.txt | 11 +++++++++++ - 2 files changed, 13 insertions(+) - -diff --git a/src/gstreamer-1.0/tcamconvert/CMakeLists.txt b/src/gstreamer-1.0/tcamconvert/CMakeLists.txt -index 30563c38..066cb5d7 100644 ---- a/src/gstreamer-1.0/tcamconvert/CMakeLists.txt -+++ b/src/gstreamer-1.0/tcamconvert/CMakeLists.txt -@@ -28,6 +28,8 @@ add_library(tcamconvert SHARED - target_include_directories(tcamconvert - PRIVATE - ${GSTREAMER_INCLUDE_DIRS} -+ ${GSTREAMER_BASE_INCLUDE_DIRS} -+ ${GSTREAMER_VIDEO_INCLUDE_DIRS} - ) - - set_project_warnings(tcamconvert) -diff --git a/src/gstreamer-1.0/tcamsrc/CMakeLists.txt b/src/gstreamer-1.0/tcamsrc/CMakeLists.txt -index 3bc7ed97..ed5be37f 100644 ---- a/src/gstreamer-1.0/tcamsrc/CMakeLists.txt -+++ b/src/gstreamer-1.0/tcamsrc/CMakeLists.txt -@@ -21,12 +21,15 @@ add_library(gsttcamstatistics SHARED - target_include_directories(gsttcamstatistics - PRIVATE - ${GSTREAMER_INCLUDE_DIRS} -+ ${GSTREAMER_BASE_INCLUDE_DIRS} -+ ${GSTREAMER_VIDEO_INCLUDE_DIRS} - ) - - target_link_libraries( gsttcamstatistics - PRIVATE - ${GSTREAMER_LIBRARIES} - ${GSTREAMER_BASE_LIBRARIES} -+ ${GSTREAMER_VIDEO_LIBRARIES} - ) - - -@@ -53,10 +56,18 @@ add_library(gsttcamsrc SHARED - tcambind.cpp - ) - -+ target_include_directories(gsttcamsrc -+ PRIVATE -+ ${GSTREAMER_INCLUDE_DIRS} -+ ${GSTREAMER_BASE_INCLUDE_DIRS} -+ ${GSTREAMER_VIDEO_INCLUDE_DIRS} -+ ) -+ - target_link_libraries( gsttcamsrc - PRIVATE - ${GSTREAMER_LIBRARIES} - ${GSTREAMER_BASE_LIBRARIES} -+ ${GSTREAMER_VIDEO_LIBRARIES} - - tcamgstbase - tcam::gst-helper --- -2.31.1 - diff --git a/pkgs/os-specific/linux/tiscamera/0001-udev-rules-fix-install-location.patch b/pkgs/os-specific/linux/tiscamera/0001-udev-rules-fix-install-location.patch deleted file mode 100644 index 9b373516aa9b..000000000000 --- a/pkgs/os-specific/linux/tiscamera/0001-udev-rules-fix-install-location.patch +++ /dev/null @@ -1,25 +0,0 @@ -From fdbc0b74812b9afd663226715375b5688e5408b5 Mon Sep 17 00:00:00 2001 -From: Raymond Gauthier <jraygauthier@gmail.com> -Date: Thu, 9 Jun 2022 20:23:02 -0400 -Subject: [PATCH] udev/rules: fix install location - ---- - CMakeInstall.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeInstall.cmake b/CMakeInstall.cmake -index 4773091f..962c9b09 100644 ---- a/CMakeInstall.cmake -+++ b/CMakeInstall.cmake -@@ -92,7 +92,7 @@ else() - - else() - -- set(TCAM_INSTALL_UDEV "${CMAKE_INSTALL_PREFIX}/udev/rules.d" CACHE PATH "udev rules installation path" FORCE) -+ set(TCAM_INSTALL_UDEV "${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d" CACHE PATH "udev rules installation path" FORCE) - set(TCAM_INSTALL_SYSTEMD "${CMAKE_INSTALL_PREFIX}/lib/systemd/system/" CACHE PATH "systemd unit installation path" FORCE) - - set(TCAM_INSTALL_PKGCONFIG "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" CACHE PATH "pkgconfig installation path" FORCE) --- -2.31.1 - diff --git a/pkgs/os-specific/linux/tiscamera/default.nix b/pkgs/os-specific/linux/tiscamera/default.nix index ce59cea368b1..600655c447f7 100644 --- a/pkgs/os-specific/linux/tiscamera/default.nix +++ b/pkgs/os-specific/linux/tiscamera/default.nix @@ -19,7 +19,8 @@ , gobject-introspection , gst_all_1 , wrapGAppsHook -, withDoc ? true + # needs pkg_resources +, withDoc ? false , sphinx , graphviz , withAravis ? true @@ -32,21 +33,15 @@ stdenv.mkDerivation rec { pname = "tiscamera"; - version = "1.0.0"; + version = "1.1.1"; src = fetchFromGitHub { owner = "TheImagingSource"; - repo = pname; - rev = "v-${pname}-${version}"; - sha256 = "0msz33wvqrji11kszdswcvljqnjflmjpk0aqzmsv6i855y8xn6cd"; + repo = "tiscamera"; + rev = "v-tiscamera-${version}"; + hash = "sha256-33U/8CbqNWIRwfDHXCZSN466WEQj9fip+Z5EJ7kIwRM="; }; - patches = [ - ./0001-tcamconvert-tcamsrc-add-missing-include-lib-dirs.patch - ./0001-udev-rules-fix-install-location.patch - ./0001-cmake-find-aravis-fix-pkg-cfg-include-dirs.patch - ]; - postPatch = '' cp ${catch2}/include/catch2/catch.hpp external/catch/catch.hpp @@ -110,6 +105,8 @@ stdenv.mkDerivation rec { "-DTCAM_INSTALL_FORCE_PREFIX=ON" ]; + env.CXXFLAGS = "-include cstdint"; + doCheck = true; # gstreamer tests requires, besides gst-plugins-bad, plugins installed by this expression. diff --git a/pkgs/os-specific/linux/tmon/default.nix b/pkgs/os-specific/linux/tmon/default.nix index 3a2697e0a712..a80724f19eb5 100644 --- a/pkgs/os-specific/linux/tmon/default.nix +++ b/pkgs/os-specific/linux/tmon/default.nix @@ -19,6 +19,7 @@ stdenv.mkDerivation { meta = with lib; { description = "Monitoring and Testing Tool for Linux kernel thermal subsystem"; + mainProgram = "tmon"; homepage = "https://www.kernel.org/"; license = licenses.gpl2; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/tpacpi-bat/default.nix b/pkgs/os-specific/linux/tpacpi-bat/default.nix index 455a36eb7aeb..42d8a0f9dbcf 100644 --- a/pkgs/os-specific/linux/tpacpi-bat/default.nix +++ b/pkgs/os-specific/linux/tpacpi-bat/default.nix @@ -29,6 +29,7 @@ stdenv.mkDerivation rec { maintainers = [lib.maintainers.orbekk]; platforms = lib.platforms.linux; description = "Tool to set battery charging thresholds on Lenovo Thinkpad"; + mainProgram = "tpacpi-bat"; license = lib.licenses.gpl3Plus; }; } diff --git a/pkgs/os-specific/linux/trace-cmd/default.nix b/pkgs/os-specific/linux/trace-cmd/default.nix index d19754cdb5e0..80b20c555b4e 100644 --- a/pkgs/os-specific/linux/trace-cmd/default.nix +++ b/pkgs/os-specific/linux/trace-cmd/default.nix @@ -63,6 +63,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "User-space tools for the Linux kernel ftrace subsystem"; + mainProgram = "trace-cmd"; homepage = "https://www.trace-cmd.org/"; license = with licenses; [ lgpl21Only gpl2Only ]; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/trinity/default.nix b/pkgs/os-specific/linux/trinity/default.nix index e0ab2b2802f1..370620eef252 100644 --- a/pkgs/os-specific/linux/trinity/default.nix +++ b/pkgs/os-specific/linux/trinity/default.nix @@ -22,6 +22,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A Linux System call fuzz tester"; + mainProgram = "trinity"; homepage = "https://github.com/kernelslacker/trinity"; license = licenses.gpl2Only; maintainers = [ maintainers.dezgeg ]; diff --git a/pkgs/os-specific/linux/tuna/default.nix b/pkgs/os-specific/linux/tuna/default.nix index e3101cded09f..b57169369ca7 100644 --- a/pkgs/os-specific/linux/tuna/default.nix +++ b/pkgs/os-specific/linux/tuna/default.nix @@ -53,6 +53,7 @@ buildPythonApplication rec { meta = with lib; { description = "Thread and IRQ affinity setting GUI and cmd line tool"; + mainProgram = "tuna"; homepage = "https://git.kernel.org/pub/scm/utils/tuna/tuna.git"; license = licenses.gpl2Plus; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/tunctl/default.nix b/pkgs/os-specific/linux/tunctl/default.nix index e71e349a2516..5e7fea75b6ab 100644 --- a/pkgs/os-specific/linux/tunctl/default.nix +++ b/pkgs/os-specific/linux/tunctl/default.nix @@ -18,6 +18,7 @@ stdenv.mkDerivation rec { meta = { homepage = "https://tunctl.sourceforge.net/"; description = "Utility to set up and maintain TUN/TAP network interfaces"; + mainProgram = "tunctl"; license = lib.licenses.gpl2; platforms = lib.platforms.linux; }; diff --git a/pkgs/os-specific/linux/turbostat/default.nix b/pkgs/os-specific/linux/turbostat/default.nix index fb1bcf582fba..4c51bca386d2 100644 --- a/pkgs/os-specific/linux/turbostat/default.nix +++ b/pkgs/os-specific/linux/turbostat/default.nix @@ -13,6 +13,7 @@ stdenv.mkDerivation { meta = with lib; { description = "Report processor frequency and idle statistics"; + mainProgram = "turbostat"; homepage = "https://www.kernel.org/"; license = licenses.gpl2; platforms = [ "i686-linux" "x86_64-linux" ]; # x86-specific diff --git a/pkgs/os-specific/linux/ulogd/default.nix b/pkgs/os-specific/linux/ulogd/default.nix index a79a38389e4a..533db8f19c84 100644 --- a/pkgs/os-specific/linux/ulogd/default.nix +++ b/pkgs/os-specific/linux/ulogd/default.nix @@ -57,6 +57,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Userspace logging daemon for netfilter/iptables"; + mainProgram = "ulogd"; longDescription = '' Logging daemon that reads event messages coming from the Netfilter diff --git a/pkgs/os-specific/linux/ultrablue-server/default.nix b/pkgs/os-specific/linux/ultrablue-server/default.nix index bb162f1693ba..1d3cc69fae10 100644 --- a/pkgs/os-specific/linux/ultrablue-server/default.nix +++ b/pkgs/os-specific/linux/ultrablue-server/default.nix @@ -23,6 +23,7 @@ buildGoModule rec { meta = with lib; { description = "User-friendly Lightweight TPM Remote Attestation over Bluetooth"; + mainProgram = "ultrablue-server"; homepage = "https://github.com/ANSSI-FR/ultrablue"; license = licenses.asl20; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/undervolt/default.nix b/pkgs/os-specific/linux/undervolt/default.nix index 4b9758494dca..d720031eb8ac 100644 --- a/pkgs/os-specific/linux/undervolt/default.nix +++ b/pkgs/os-specific/linux/undervolt/default.nix @@ -14,6 +14,7 @@ python3Packages.buildPythonApplication rec { meta = with lib; { homepage = "https://github.com/georgewhewell/undervolt/"; description = "A program for undervolting Intel CPUs on Linux"; + mainProgram = "undervolt"; longDescription = '' Undervolt is a program for undervolting Intel CPUs under Linux. It works in a similar diff --git a/pkgs/os-specific/linux/unscd/default.nix b/pkgs/os-specific/linux/unscd/default.nix index 82b8c7076271..9f77fa01b0ee 100644 --- a/pkgs/os-specific/linux/unscd/default.nix +++ b/pkgs/os-specific/linux/unscd/default.nix @@ -69,6 +69,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://busybox.net/~vda/unscd/"; description = "Less buggy replacement for the glibc name service cache daemon"; + mainProgram = "nscd"; license = licenses.gpl2Only; platforms = platforms.linux; maintainers = with maintainers; [ ]; diff --git a/pkgs/os-specific/linux/unstick/default.nix b/pkgs/os-specific/linux/unstick/default.nix index ee82679de4ea..3c61e26b335b 100644 --- a/pkgs/os-specific/linux/unstick/default.nix +++ b/pkgs/os-specific/linux/unstick/default.nix @@ -19,6 +19,7 @@ stdenv.mkDerivation rec { meta = { homepage = "https://github.com/kwohlfahrt/unstick"; description = "Silently eats chmod commands forbidden by Nix"; + mainProgram = "unstick"; license = lib.licenses.gpl3; platforms = lib.platforms.linux; maintainers = with lib.maintainers; [ kwohlfahrt ]; diff --git a/pkgs/os-specific/linux/untie/default.nix b/pkgs/os-specific/linux/untie/default.nix index 947ae2ca8d8b..7d96631deb86 100644 --- a/pkgs/os-specific/linux/untie/default.nix +++ b/pkgs/os-specific/linux/untie/default.nix @@ -12,6 +12,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A tool to run processes untied from some of the namespaces"; + mainProgram = "untie"; maintainers = with maintainers; [ raskin ]; platforms = platforms.linux; license = licenses.gpl2Plus; diff --git a/pkgs/os-specific/linux/upower/default.nix b/pkgs/os-specific/linux/upower/default.nix index b0b7b4f6776c..3b08318c965e 100644 --- a/pkgs/os-specific/linux/upower/default.nix +++ b/pkgs/os-specific/linux/upower/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitLab +, fetchpatch , makeWrapper , pkg-config , libxslt @@ -51,6 +52,10 @@ stdenv.mkDerivation (finalAttrs: { ./i686-test-remove-battery-check.patch ] ++ [ ./installed-tests-path.patch + (fetchpatch { + url = "https://gitlab.freedesktop.org/upower/upower/-/merge_requests/207.diff"; + hash = "sha256-ldr1bKbSAdYpwbbe/Iq9i0Q9zQrHWvIvBGym/F3+vxs="; + }) ]; strictDeps = true; @@ -211,6 +216,7 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://upower.freedesktop.org/"; changelog = "https://gitlab.freedesktop.org/upower/upower/-/blob/v${finalAttrs.version}/NEWS"; description = "A D-Bus service for power management"; + mainProgram = "upower"; maintainers = teams.freedesktop.members; platforms = platforms.linux; license = licenses.gpl2Plus; diff --git a/pkgs/os-specific/linux/usbrelay/default.nix b/pkgs/os-specific/linux/usbrelay/default.nix index 670de2028c4f..656808d8389b 100644 --- a/pkgs/os-specific/linux/usbrelay/default.nix +++ b/pkgs/os-specific/linux/usbrelay/default.nix @@ -30,6 +30,7 @@ stdenv.mkDerivation (finalAttrs: { meta = with lib; { description = "Tool to control USB HID relays"; + mainProgram = "usbrelay"; homepage = "https://github.com/darrylb123/usbrelay"; license = licenses.gpl2Plus; maintainers = with maintainers; [ wentasah ]; diff --git a/pkgs/os-specific/linux/usbtop/default.nix b/pkgs/os-specific/linux/usbtop/default.nix index fb3d32df09a0..ba97cae68bd0 100644 --- a/pkgs/os-specific/linux/usbtop/default.nix +++ b/pkgs/os-specific/linux/usbtop/default.nix @@ -19,6 +19,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://github.com/aguinet/usbtop"; description = "A top utility that shows an estimated instantaneous bandwidth on USB buses and devices"; + mainProgram = "usbtop"; maintainers = with maintainers; [ ]; license = licenses.bsd3; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/usermount/default.nix b/pkgs/os-specific/linux/usermount/default.nix index 475ccd848eb1..73135da548ed 100644 --- a/pkgs/os-specific/linux/usermount/default.nix +++ b/pkgs/os-specific/linux/usermount/default.nix @@ -24,6 +24,7 @@ stdenv.mkDerivation { meta = { homepage = "https://github.com/tom5760/usermount"; description = "A simple tool to automatically mount removable drives using UDisks2 and D-Bus"; + mainProgram = "usermount"; license = lib.licenses.mit; platforms = lib.platforms.linux; }; diff --git a/pkgs/os-specific/linux/v4l2-relayd/default.nix b/pkgs/os-specific/linux/v4l2-relayd/default.nix index a089ce8c77f8..77d7034b863b 100644 --- a/pkgs/os-specific/linux/v4l2-relayd/default.nix +++ b/pkgs/os-specific/linux/v4l2-relayd/default.nix @@ -39,6 +39,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Streaming relay for v4l2loopback using GStreamer"; + mainProgram = "v4l2-relayd"; homepage = "https://git.launchpad.net/v4l2-relayd"; license = licenses.gpl2; maintainers = with maintainers; [ betaboon ]; diff --git a/pkgs/os-specific/linux/v4l2loopback/default.nix b/pkgs/os-specific/linux/v4l2loopback/default.nix index 3d16748f05a2..6fe83fd09eff 100644 --- a/pkgs/os-specific/linux/v4l2loopback/default.nix +++ b/pkgs/os-specific/linux/v4l2loopback/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation { pname = "v4l2loopback"; - version = "unstable-2023-11-23-${kernel.version}"; + version = "0.12.7-unstable-2024-02-12-${kernel.version}"; src = fetchFromGitHub { owner = "umlaeute"; repo = "v4l2loopback"; - rev = "850a2e36849f6ad3c9bf74f2ae3f603452bd8a71"; - hash = "sha256-LqP5R3oKbjUQUfDZUWpkrmyopWhOt4wlgSgGywTPJXM="; + rev = "5d72c17f92ee0e38efbb7eb85e34443ecbf1a80c"; + hash = "sha256-ggmYH5MUXhMPvA8UZ2EAG+eGoPTNbw7B8UxmmgP6CsE="; }; hardeningDisable = [ "format" "pic" ]; @@ -33,6 +33,7 @@ stdenv.mkDerivation { meta = with lib; { description = "A kernel module to create V4L2 loopback devices"; + mainProgram = "v4l2loopback-ctl"; homepage = "https://github.com/umlaeute/v4l2loopback"; license = licenses.gpl2Only; maintainers = with maintainers; [ moni ]; diff --git a/pkgs/os-specific/linux/v4l2loopback/revert-pr518.patch b/pkgs/os-specific/linux/v4l2loopback/revert-pr518.patch deleted file mode 100644 index d5d2564c32c4..000000000000 --- a/pkgs/os-specific/linux/v4l2loopback/revert-pr518.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff --git a/v4l2loopback.c b/v4l2loopback.c -index 2ab1f76..2514f09 100644 ---- a/v4l2loopback.c -+++ b/v4l2loopback.c -@@ -92,17 +92,6 @@ MODULE_LICENSE("GPL"); - } \ - } while (0) - --/* TODO: Make sure that function is never interrupted. */ --static inline int mod_inc(int *number, int mod) --{ -- int result; -- result = (*number + 1) % mod; -- if (unlikely(result < 0)) -- result += mod; -- *number = result; -- return result; --} -- - static inline void v4l2l_get_timestamp(struct v4l2_buffer *b) - { - /* ktime_get_ts is considered deprecated, so use ktime_get_ts64 if possible */ -@@ -1424,8 +1413,9 @@ static int vidioc_reqbufs(struct file *file, void *fh, - i = dev->write_position; - list_for_each_entry(pos, &dev->outbufs_list, - list_head) { -- dev->bufpos2index[mod_inc(&i, b->count)] = -+ dev->bufpos2index[i % b->count] = - pos->buffer.index; -+ ++i; - } - } - -@@ -1489,9 +1479,10 @@ static void buffer_written(struct v4l2_loopback_device *dev, - del_timer_sync(&dev->timeout_timer); - spin_lock_bh(&dev->lock); - -- dev->bufpos2index[mod_inc(&dev->write_position, dev->used_buffers)] = -+ dev->bufpos2index[dev->write_position % dev->used_buffers] = - buf->buffer.index; - list_move_tail(&buf->list_head, &dev->outbufs_list); -+ ++dev->write_position; - dev->reread_count = 0; - - check_timers(dev); -@@ -1586,7 +1577,8 @@ static int get_capture_buffer(struct file *file) - if (dev->write_position > - opener->read_position + dev->used_buffers) - opener->read_position = dev->write_position - 1; -- pos = mod_inc(&opener->read_position, dev->used_buffers); -+ pos = opener->read_position % dev->used_buffers; -+ ++opener->read_position; - } - timeout_happened = dev->timeout_happened; - dev->timeout_happened = 0; diff --git a/pkgs/os-specific/linux/v86d/default.nix b/pkgs/os-specific/linux/v86d/default.nix index dbc98344c5ec..8597cc5ac9f9 100644 --- a/pkgs/os-specific/linux/v86d/default.nix +++ b/pkgs/os-specific/linux/v86d/default.nix @@ -39,6 +39,7 @@ in stdenv.mkDerivation rec { meta = with lib; { description = "A daemon to run x86 code in an emulated environment"; + mainProgram = "v86d"; homepage = "https://github.com/mjanusz/v86d"; license = licenses.gpl2; maintainers = with maintainers; [ codyopel ]; diff --git a/pkgs/os-specific/linux/waydroid/default.nix b/pkgs/os-specific/linux/waydroid/default.nix index 97818ba9c4d4..ae42c206280d 100644 --- a/pkgs/os-specific/linux/waydroid/default.nix +++ b/pkgs/os-specific/linux/waydroid/default.nix @@ -86,6 +86,7 @@ python3Packages.buildPythonApplication rec { meta = { description = "Waydroid is a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu"; + mainProgram = "waydroid"; homepage = "https://github.com/waydroid/waydroid"; license = lib.licenses.gpl3; platforms = lib.platforms.linux; diff --git a/pkgs/os-specific/linux/wpa_supplicant/gui.nix b/pkgs/os-specific/linux/wpa_supplicant/gui.nix index 82e104cac3aa..ac1de01af974 100644 --- a/pkgs/os-specific/linux/wpa_supplicant/gui.nix +++ b/pkgs/os-specific/linux/wpa_supplicant/gui.nix @@ -24,6 +24,7 @@ mkDerivation { meta = with lib; { description = "Qt-based GUI for wpa_supplicant"; + mainProgram = "wpa_gui"; homepage = "https://hostap.epitest.fi/wpa_supplicant/"; license = licenses.bsd3; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/x86_energy_perf_policy/default.nix b/pkgs/os-specific/linux/x86_energy_perf_policy/default.nix index d636f928f249..cbe2a8134e60 100644 --- a/pkgs/os-specific/linux/x86_energy_perf_policy/default.nix +++ b/pkgs/os-specific/linux/x86_energy_perf_policy/default.nix @@ -19,6 +19,7 @@ stdenv.mkDerivation { meta = with lib; { description = "Set the energy versus performance policy preference bias on recent X86 processors"; + mainProgram = "x86_energy_perf_policy"; homepage = "https://www.kernel.org/"; license = licenses.gpl2; platforms = [ "i686-linux" "x86_64-linux" ]; # x86-specific diff --git a/pkgs/os-specific/linux/xf86-input-wacom/default.nix b/pkgs/os-specific/linux/xf86-input-wacom/default.nix index 614831c057d2..eb5a5eae8032 100644 --- a/pkgs/os-specific/linux/xf86-input-wacom/default.nix +++ b/pkgs/os-specific/linux/xf86-input-wacom/default.nix @@ -19,13 +19,13 @@ stdenv.mkDerivation rec { pname = "xf86-input-wacom"; - version = "1.2.0"; + version = "1.2.1"; src = fetchFromGitHub { owner = "linuxwacom"; repo = pname; rev = "${pname}-${version}"; - sha256 = "sha256-PuIfeHlkcoin7w2v822P8uhWBNhYQGuOA7yD62L3qto="; + sha256 = "sha256-ldPNGa1ACjLivs2CVtkvKLsBZSzRuOM8Q7bvMdx0EWA="; }; nativeBuildInputs = [ autoreconfHook pkg-config ]; diff --git a/pkgs/os-specific/linux/xone/default.nix b/pkgs/os-specific/linux/xone/default.nix index 104b7952f2be..b1e2ce570a2d 100644 --- a/pkgs/os-specific/linux/xone/default.nix +++ b/pkgs/os-specific/linux/xone/default.nix @@ -1,27 +1,18 @@ { stdenv, lib, fetchFromGitHub, kernel, fetchurl, fetchpatch }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "xone"; - version = "0.3"; + version = "0.3-unstable-2024-03-16"; src = fetchFromGitHub { owner = "medusalix"; - repo = pname; - rev = "refs/tags/v${version}"; - sha256 = "sha256-h+j4xCV9R6hp9trsv1NByh9m0UBafOz42ZuYUjclILE="; + repo = "xone"; + rev = "948d2302acdd6333295eaba4da06d96677290ad3"; + hash = "sha256-srAEw1ai5KT0rmVUL3Dut9R2mNb00AAZVCcINikh2sM="; }; - patches = [ - # Fix build on kernel 6.3 - (fetchpatch { - name = "kernel-6.3.patch"; - url = "https://github.com/medusalix/xone/commit/bbf0dcc484c3f5611f4e375da43e0e0ef08f3d18.patch"; - hash = "sha256-A2OzRRk4XT++rS6k6EIyiPy/LJptvVRUxoP7CIGrPWU="; - }) - ]; - setSourceRoot = '' - export sourceRoot=$(pwd)/${src.name} + export sourceRoot=$(pwd)/${finalAttrs.src.name} ''; nativeBuildInputs = kernel.moduleBuildDependencies; @@ -30,7 +21,7 @@ stdenv.mkDerivation rec { "-C" "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "M=$(sourceRoot)" - "VERSION=${version}" + "VERSION=${finalAttrs.version}" ]; buildFlags = [ "modules" ]; @@ -45,4 +36,4 @@ stdenv.mkDerivation rec { platforms = platforms.linux; }; } - +) diff --git a/pkgs/os-specific/linux/xsos/default.nix b/pkgs/os-specific/linux/xsos/default.nix index 56516aee8b7b..8d2dd747ffb6 100644 --- a/pkgs/os-specific/linux/xsos/default.nix +++ b/pkgs/os-specific/linux/xsos/default.nix @@ -44,6 +44,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Summarize system info from sosreports"; + mainProgram = "xsos"; homepage = "https://github.com/ryran/xsos"; license = licenses.gpl3; platforms = [ "i686-linux" "x86_64-linux" ]; diff --git a/pkgs/os-specific/linux/zenmonitor/default.nix b/pkgs/os-specific/linux/zenmonitor/default.nix index 8414ac7a1e14..e8fce959c8dc 100644 --- a/pkgs/os-specific/linux/zenmonitor/default.nix +++ b/pkgs/os-specific/linux/zenmonitor/default.nix @@ -18,6 +18,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Monitoring software for AMD Zen-based CPUs"; + mainProgram = "zenmonitor"; homepage = "https://github.com/Ta180m/zenmonitor3"; license = licenses.mit; platforms = [ "i686-linux" "x86_64-linux" ]; diff --git a/pkgs/os-specific/linux/zenstates/default.nix b/pkgs/os-specific/linux/zenstates/default.nix index 8e31073151ba..a320e959f021 100644 --- a/pkgs/os-specific/linux/zenstates/default.nix +++ b/pkgs/os-specific/linux/zenstates/default.nix @@ -44,6 +44,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Linux utility for Ryzen processors and motherboards"; + mainProgram = "zenstates"; homepage = "https://github.com/r4m0n/ZenStates-Linux"; license = licenses.mit; maintainers = with maintainers; [ savannidgerinel ]; diff --git a/pkgs/os-specific/linux/zfs/unstable.nix b/pkgs/os-specific/linux/zfs/unstable.nix index 052dd0cd74c9..b75de560b1d5 100644 --- a/pkgs/os-specific/linux/zfs/unstable.nix +++ b/pkgs/os-specific/linux/zfs/unstable.nix @@ -22,13 +22,13 @@ callPackage ./generic.nix args { # 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.2.3-unstable-2024-02-12"; - rev = "4635453d9f06771678b2125d5b45852b4d2eb04f"; + version = "2.2.3-unstable-2024-03-21"; + rev = "58211157bf866bbcdd8720e92c27297db3ba75d6"; isUnstable = true; tests = [ nixosTests.zfs.unstable ]; - hash = "sha256-ch1/R61cn1BtWkkH2IViWjVp22XFz4/WbByquN+vybs="; + hash = "sha256-zTTzHo/UDsTGp/b7BmCmy/m115HVipSG8Id/pnkUrvQ="; } |