Merge release-22.05 into staging-next-22.05

This commit is contained in:
github-actions[bot]
2022-08-04 00:14:37 +00:00
committed by GitHub
10 changed files with 150 additions and 91 deletions

View File

@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchurl
, autoreconfHook
, gettext
, help2man
, pkg-config
@@ -40,6 +41,7 @@ in stdenv.mkDerivation rec {
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
gettext
pkg-config
texinfo
@@ -108,7 +110,6 @@ in stdenv.mkDerivation rec {
license = licenses.gpl3Plus;
maintainers = with maintainers; [ AndersonTorres kira-bruneau ];
platforms = platforms.unix;
badPlatforms = [ "aarch64-darwin" ]; # Undefined symbols for architecture arm64
};
}

View File

@@ -39,14 +39,14 @@
buildPythonPackage rec {
pname = "Django";
version = "4.0.6";
version = "4.0.7";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-pnp5P/aCf9NzVVU33KDaKTpjoxb+NMt/Nn+JjMyjw64=";
hash = "sha256-nG1a02vnmOVi3cqmsXscP/LTxPUppHQytp+5ow+EdGE=";
};
patches = lib.optional withGdal

View File

@@ -0,0 +1,18 @@
{ lib, buildPackages, fetchurl, perl, buildLinux, nixosTests, modDirVersionArg ? null, ... } @ args:
with lib;
buildLinux (args // rec {
version = "5.19";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
# branchVersion needs to be x.y
extraMeta.branch = versions.majorMinor version;
src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "1a05a3hw4w3k530mxhns96xw7hag743xw5w967yazqcykdbhq97z";
};
} // (args.argsOverride or { }))

View File

@@ -1,19 +1,23 @@
{ lib, stdenv, fetchFromGitHub, buildLinux, ... } @ args:
let
stableVariant = {
version = "5.15.53";
suffix = "xanmod1";
hash = "sha256-mLgzaXG6QaJ0hfzfNlLbAEldxHK6iHuMVUv6p8zqRBo=";
ltsVariant = {
version = "5.15.54";
hash = "sha256-0Odo+ZrQok3MMPl/512F8kIQ31mGZH6e9FyVVpXrYf0=";
};
edgeVariant = {
version = "5.18.10";
suffix = "xanmod1";
hash = "sha256-RtvrJujd854bKf1YPiPavTh9oplpFN9ykr624K17vKE=";
version = "5.18.11";
hash = "sha256-UPLwaEWhBu1yriCUJu9L/B8yy+1zxnTQzHaKlT507UY=";
};
xanmodKernelFor = { version, suffix, hash }: buildLinux (args // rec {
ttVariant = {
version = "5.15.54";
suffix = "xanmod1-tt";
hash = "sha256-4ck9PAFuIt/TxA/U+moGlVfCudJnzSuAw7ooFG3OJis=";
};
xanmodKernelFor = { version, suffix ? "xanmod1", hash }: buildLinux (args // rec {
inherit version;
modDirVersion = "${version}-${suffix}";
@@ -24,51 +28,45 @@ let
inherit hash;
};
structuredExtraConfig =
with lib.kernel;
with (lib.kernel.whenHelpers version);
{
# TODO: remove this once https://github.com/NixOS/nixpkgs/pull/175433 is in master
WERROR = no;
structuredExtraConfig = with lib.kernel; {
# removed options
CFS_BANDWIDTH = lib.mkForce (option no);
RT_GROUP_SCHED = lib.mkForce (option no);
SCHED_AUTOGROUP = lib.mkForce (option no);
# removed options
CFS_BANDWIDTH = lib.mkForce (option no);
RT_GROUP_SCHED = lib.mkForce (option no);
SCHED_AUTOGROUP = lib.mkForce (option no);
# AMD P-state driver
X86_AMD_PSTATE = yes;
# AMD P-state driver
X86_AMD_PSTATE = yes;
# Paragon's NTFS3 driver
NTFS3_FS = module;
NTFS3_LZX_XPRESS = yes;
NTFS3_FS_POSIX_ACL = yes;
# Paragon's NTFS3 driver
NTFS3_FS = module;
NTFS3_LZX_XPRESS = yes;
NTFS3_FS_POSIX_ACL = yes;
# Preemptive Full Tickless Kernel at 500Hz
SCHED_CORE = lib.mkForce (option no);
PREEMPT_VOLUNTARY = lib.mkForce no;
PREEMPT = lib.mkForce yes;
NO_HZ_FULL = yes;
HZ_500 = yes;
# Preemptive Full Tickless Kernel at 500Hz
SCHED_CORE = lib.mkForce (option no);
PREEMPT_VOLUNTARY = lib.mkForce no;
PREEMPT = lib.mkForce yes;
NO_HZ_FULL = yes;
HZ_500 = yes;
# Google's BBRv2 TCP congestion Control
TCP_CONG_BBR2 = yes;
DEFAULT_BBR2 = yes;
# Google's BBRv2 TCP congestion Control
TCP_CONG_BBR2 = yes;
DEFAULT_BBR2 = yes;
# FQ-PIE Packet Scheduling
NET_SCH_DEFAULT = yes;
DEFAULT_FQ_PIE = yes;
# FQ-PIE Packet Scheduling
NET_SCH_DEFAULT = yes;
DEFAULT_FQ_PIE = yes;
# Graysky's additional CPU optimizations
CC_OPTIMIZE_FOR_PERFORMANCE_O3 = yes;
# Graysky's additional CPU optimizations
CC_OPTIMIZE_FOR_PERFORMANCE_O3 = yes;
# Futex WAIT_MULTIPLE implementation for Wine / Proton Fsync.
FUTEX = yes;
FUTEX_PI = yes;
# Futex WAIT_MULTIPLE implementation for Wine / Proton Fsync.
FUTEX = yes;
FUTEX_PI = yes;
# WineSync driver for fast kernel-backed Wine
WINESYNC = module;
};
# WineSync driver for fast kernel-backed Wine
WINESYNC = module;
};
extraMeta = {
branch = lib.versions.majorMinor version;
@@ -79,6 +77,7 @@ let
} // (args.argsOverride or { }));
in
{
stable = xanmodKernelFor stableVariant;
lts = xanmodKernelFor ltsVariant;
edge = xanmodKernelFor edgeVariant;
tt = xanmodKernelFor ttVariant;
}

View File

@@ -26,6 +26,7 @@
, vulkan-loader
, libXNVCtrl
, wayland
, spdlog
, addOpenGLRunpath
}:
@@ -46,14 +47,14 @@ let
};
in stdenv.mkDerivation rec {
pname = "mangohud";
version = "0.6.5";
version = "0.6.7-1";
src = fetchFromGitHub {
owner = "flightlessmango";
repo = "MangoHud";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "sha256-RRtti0VnB6SXrpFYaEqANvpgvP/Dkvc+x/I40AXaspU=";
sha256 = "sha256-60cZYo+d679KRggLBGbpLYM5Iu1XySEEGp+MxZs6wF0=";
};
outputs = [ "out" "doc" "man" ];
@@ -103,6 +104,7 @@ in stdenv.mkDerivation rec {
"-Duse_system_vulkan=enabled"
"-Dvulkan_datadir=${vulkan-headers}/share"
"-Dwith_wayland=enabled"
"-Duse_system_spdlog=enabled"
];
nativeBuildInputs = [
@@ -122,6 +124,7 @@ in stdenv.mkDerivation rec {
libX11
libXNVCtrl
wayland
spdlog
];
# Support 32bit Vulkan applications by linking in 32bit Vulkan layer

View File

@@ -1,57 +1,75 @@
From 56a191f6db6d530c2bc89d9d3395b4c9768d108f Mon Sep 17 00:00:00 2001
From: Atemu <atemu.main@gmail.com>
Date: Tue, 17 May 2022 16:58:08 +0200
Subject: [PATCH 1/2] hardcode dependencies
---
src/dbus.cpp | 2 +-
src/loaders/loader_x11.cpp | 2 +-
src/logging.cpp | 7 +++++++
src/pci_ids.cpp | 6 ++----
4 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/dbus.cpp b/src/dbus.cpp
index 44ffafc..9baf57b 100644
index 3b3cccb..1405725 100644
--- a/src/dbus.cpp
+++ b/src/dbus.cpp
@@ -162,7 +162,7 @@ bool dbus_manager::init(const std::string& requested_player) {
return true;
}
@@ -152,7 +152,7 @@ bool dbus_manager::get_media_player_metadata(metadata& meta, std::string name) {
}
bool dbus_manager::init_internal() {
- if (!m_dbus_ldr.IsLoaded() && !m_dbus_ldr.Load("libdbus-1.so.3")) {
+ if (!m_dbus_ldr.IsLoaded() && !m_dbus_ldr.Load("@libdbus@/lib/libdbus-1.so.3")) {
std::cerr << "MANGOHUD: Could not load libdbus-1.so.3\n";
SPDLOG_ERROR("Could not load libdbus-1.so.3");
return false;
}
diff --git a/src/loaders/loader_x11.cpp b/src/loaders/loader_x11.cpp
index 25c65bf..87488d5 100644
index 4db6f78..c60d08c 100644
--- a/src/loaders/loader_x11.cpp
+++ b/src/loaders/loader_x11.cpp
@@ -88,4 +88,4 @@ void libx11_loader::CleanUp(bool unload) {
@@ -89,4 +89,4 @@ void libx11_loader::CleanUp(bool unload) {
}
-std::shared_ptr<libx11_loader> g_x11(new libx11_loader("libX11.so.6"));
+std::shared_ptr<libx11_loader> g_x11(new libx11_loader("@libX11@/lib/libX11.so.6"));
diff --git a/src/logging.cpp b/src/logging.cpp
index ee8600b..c7c91a0 100644
index b27f21e..48f5e03 100644
--- a/src/logging.cpp
+++ b/src/logging.cpp
@@ -19,7 +19,10 @@ string exec(string command) {
#ifdef __gnu_linux__
// Open pipe to file
+ char* originalPath = getenv("PATH");
+ setenv("PATH", "@path@", 1);
FILE* pipe = popen(command.c_str(), "r");
+ setenv("PATH", originalPath, 1);
if (!pipe) {
@@ -22,7 +22,14 @@ string exec(string command) {
#endif
std::array<char, 128> buffer;
std::string result;
+
+ char* originalPath = getenv("PATH");
+ setenv("PATH", "@path@", 1);
+
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(command.c_str(), "r"), pclose);
+
+ setenv("PATH", originalPath, 1);
+
if (!pipe) {
return "popen failed!";
}
}
diff --git a/src/pci_ids.cpp b/src/pci_ids.cpp
index 4e2a6d2..9490869 100644
index feec222..6baa707 100644
--- a/src/pci_ids.cpp
+++ b/src/pci_ids.cpp
@@ -22,12 +22,9 @@ std::istream& get_uncommented_line(std::istream& is, std::string &line)
@@ -24,11 +24,9 @@ std::istream& get_uncommented_line(std::istream& is, std::string &line)
void parse_pciids()
{
- std::ifstream file("/usr/share/hwdata/pci.ids");
+ std::ifstream file("@hwdata@/share/hwdata/pci.ids");
if(file.fail()){
- std::ifstream file("/usr/share/misc/pci.ids");
std::ifstream file;
- file.open("/usr/share/hwdata/pci.ids");
+ file.open("@hwdata@/share/hwdata/pci.ids");
if (file.fail()){
- file.open("/usr/share/misc/pci.ids");
- if (file.fail())
- printf("MANGOHUD: can't find file pci.ids\n");
-
+ printf("MANGOHUD: can't find file pci.ids\n");
- SPDLOG_ERROR("can't find file pci.ids");
+ SPDLOG_ERROR("can't find file pci.ids");
}
std::string line;
--
2.36.0

View File

@@ -1,3 +1,12 @@
From 1ac93cbf0eed951af6967a81f731a0f418ea0b3d Mon Sep 17 00:00:00 2001
From: Atemu <atemu.main@gmail.com>
Date: Tue, 17 May 2022 16:58:45 +0200
Subject: [PATCH 2/2] opengl32 nix workaround
---
bin/mangohud.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/mangohud.in b/bin/mangohud.in
index 8ec21de..f65304a 100755
--- a/bin/mangohud.in
@@ -10,3 +19,6 @@ index 8ec21de..f65304a 100755
+LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@ld_libdir_mangohud@:@mangohud32@/lib/mangohud"
exec env MANGOHUD=1 LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" LD_PRELOAD="${LD_PRELOAD}" "$@"
--
2.36.0

View File

@@ -734,6 +734,7 @@ mapAliases ({
linuxPackages_5_16 = linuxKernel.packages.linux_5_16;
linuxPackages_5_17 = linuxKernel.packages.linux_5_17;
linuxPackages_5_18 = linuxKernel.packages.linux_5_18;
linuxPackages_5_19 = linuxKernel.packages.linux_5_19;
linuxPackages_5_4 = linuxKernel.packages.linux_5_4;
linuxPackages_hardkernel_4_14 = linuxKernel.packages.hardkernel_4_14;
linuxPackages_rpi0 = linuxKernel.packages.linux_rpi1;
@@ -753,6 +754,7 @@ mapAliases ({
linux_5_16 = linuxKernel.kernels.linux_5_16;
linux_5_17 = linuxKernel.kernels.linux_5_17;
linux_5_18 = linuxKernel.kernels.linux_5_18;
linux_5_19 = linuxKernel.kernels.linux_5_19;
linux_5_4 = linuxKernel.kernels.linux_5_4;
linux_mptcp_95 = linuxKernel.kernels.linux_mptcp_95;
linux_rpi0 = linuxKernel.kernels.linux_rpi1;

View File

@@ -23370,6 +23370,8 @@ with pkgs;
linux_xanmod = linuxKernel.kernels.linux_xanmod;
linuxPackages_xanmod_latest = linuxKernel.packages.linux_xanmod_latest;
linux_xanmod_latest = linuxKernel.kernels.linux_xanmod_latest;
linuxPackages_xanmod_tt = linuxKernel.packages.linux_xanmod_tt;
linux_xanmod_tt = linuxKernel.kernels.linux_xanmod_tt;
cryptodev = linuxKernel.packages.linux_4_9.cryptodev;

View File

@@ -171,6 +171,13 @@ in {
];
};
linux_5_19 = callPackage ../os-specific/linux/kernel/linux-5.19.nix {
kernelPatches = [
kernelPatches.bridge_stp_helper
kernelPatches.request_key_helper
];
};
linux_testing = let
testing = callPackage ../os-specific/linux/kernel/linux-testing.nix {
kernelPatches = [
@@ -214,22 +221,17 @@ in {
];
}).lqx;
# This contains both the STABLE and EDGE variants of the XanMod kernel
xanmodKernels = callPackage ../os-specific/linux/kernel/xanmod-kernels.nix;
linux_xanmod = (xanmodKernels {
# This contains the variants of the XanMod kernel
xanmodKernels = callPackage ../os-specific/linux/kernel/xanmod-kernels.nix {
kernelPatches = [
kernelPatches.bridge_stp_helper
kernelPatches.request_key_helper
];
}).stable;
};
linux_xanmod_latest = (xanmodKernels {
kernelPatches = [
kernelPatches.bridge_stp_helper
kernelPatches.request_key_helper
];
}).edge;
linux_xanmod = xanmodKernels.lts;
linux_xanmod_latest = xanmodKernels.edge;
linux_xanmod_tt = xanmodKernels.tt;
linux_libre = deblobKernel packageAliases.linux_default.kernel;
@@ -509,6 +511,7 @@ in {
linux_5_16 = throw "linux 5.16 was removed because it reached its end of life upstream"; # Added 2022-04-23
linux_5_17 = throw "linux 5.17 was removed because it reached its end of life upstream"; # Added 2022-06-23
linux_5_18 = recurseIntoAttrs (packagesFor kernels.linux_5_18);
linux_5_19 = recurseIntoAttrs (packagesFor kernels.linux_5_19);
};
rtPackages = {
@@ -553,6 +556,7 @@ in {
linux_lqx = recurseIntoAttrs (packagesFor kernels.linux_lqx);
linux_xanmod = recurseIntoAttrs (packagesFor kernels.linux_xanmod);
linux_xanmod_latest = recurseIntoAttrs (packagesFor kernels.linux_xanmod_latest);
linux_xanmod_tt = recurseIntoAttrs (packagesFor kernels.linux_xanmod_tt);
hardkernel_4_14 = recurseIntoAttrs (packagesFor kernels.linux_hardkernel_4_14);
@@ -564,7 +568,7 @@ in {
packageAliases = {
linux_default = if stdenv.hostPlatform.isi686 then packages.linux_5_10 else packages.linux_5_15;
# Update this when adding the newest kernel major version!
linux_latest = packages.linux_5_18;
linux_latest = packages.linux_5_19;
linux_mptcp = packages.linux_mptcp_95;
linux_rt_default = packages.linux_rt_5_4;
linux_rt_latest = packages.linux_rt_5_10;