Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvidia-x11.legacy_390: fix bug #277694

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkgs/os-specific/linux/nvidia-x11/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ unpackFile() {


buildPhase() {
runHook preBuild

if [ -n "$bin" ]; then
# Create the module.
echo "Building linux driver against kernel: $kernel";
Expand All @@ -23,10 +25,14 @@ buildPhase() {

cd ..
fi

runHook postBuild
}


installPhase() {
runHook preInstall

# Install libGL and friends.

# since version 391, 32bit libraries are bundled in the 32/ sub-directory
Expand Down Expand Up @@ -214,6 +220,8 @@ installPhase() {
# FIXME: needs PATH and other fixes
# install -Dm755 nvidia-bug-report.sh $bin/bin/nvidia-bug-report.sh
fi

runHook postInstall
}

genericBuild
16 changes: 16 additions & 0 deletions pkgs/os-specific/linux/nvidia-x11/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ rec {
persistencedSha256 = "sha256-NuqUQbVt80gYTXgIcu0crAORfsj9BCRooyH3Gp1y1ns=";

broken = kernel.kernelAtLeast "6.2";

# fixes the bug described in https://bbs.archlinux.org/viewtopic.php?pid=2083439#p2083439
# see https://bbs.archlinux.org/viewtopic.php?pid=2083651#p2083651
# and https://bbs.archlinux.org/viewtopic.php?pid=2083699#p2083699
postInstall = ''
mv $out/lib/tls/* $out/lib
rmdir $out/lib/tls
'';
};

legacy_340 = let
Expand Down Expand Up @@ -153,5 +161,13 @@ rec {

broken = kernel.kernelAtLeast "6.6";
patches = map (patch: "${aurPatches}/${patch}") patchset;

# fixes the bug described in https://bbs.archlinux.org/viewtopic.php?pid=2083439#p2083439
# see https://bbs.archlinux.org/viewtopic.php?pid=2083651#p2083651
# and https://bbs.archlinux.org/viewtopic.php?pid=2083699#p2083699
postInstall = ''
mv $out/lib/tls/* $out/lib
rmdir $out/lib/tls
'';
};
}
5 changes: 4 additions & 1 deletion pkgs/os-specific/linux/nvidia-x11/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
, useFabricmanager ? false
, ibtSupport ? false

, prePatch ? ""
, prePatch ? null
, postPatch ? null
, patchFlags ? null
, patches ? [ ]
, preInstall ? null
, postInstall ? null
, broken ? false
, brokenOpen ? broken
}@args:
Expand Down Expand Up @@ -144,6 +146,7 @@ let

patches = if libsOnly then null else patches;
inherit prePatch postPatch patchFlags;
inherit preInstall postInstall;
inherit version useGLVND useProfiles;
inherit (stdenv.hostPlatform) system;
inherit i686bundled;
Expand Down