Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0b8efd8724e5
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d1226bff8ec0
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Jun 15, 2019

  1. nvidia-x11: Set 32-bit library paths for 32-bit libraries.

    Patchelf was being called to point RUNPATH to 64-bit library paths even for 32-bit libraries.
    ambrop72 authored and FRidh committed Jun 15, 2019
    Copy the full SHA
    d1226bf View commit details
Showing with 11 additions and 4 deletions.
  1. +5 −1 pkgs/os-specific/linux/nvidia-x11/builder.sh
  2. +6 −3 pkgs/os-specific/linux/nvidia-x11/generic.nix
6 changes: 5 additions & 1 deletion pkgs/os-specific/linux/nvidia-x11/builder.sh
Original file line number Diff line number Diff line change
@@ -102,7 +102,11 @@ installPhase() {
do
# I'm lazy to differentiate needed libs per-library, as the closure is the same.
# Unfortunately --shrink-rpath would strip too much.
patchelf --set-rpath "$out/lib:$libPath" "$libname"
if [[ -n $lib32 && $libname == "$lib32/lib/"* ]]; then
patchelf --set-rpath "$lib32/lib:$libPath32" "$libname"
else
patchelf --set-rpath "$out/lib:$libPath" "$libname"
fi

libname_short=`echo -n "$libname" | sed 's/so\..*/so/'`

9 changes: 6 additions & 3 deletions pkgs/os-specific/linux/nvidia-x11/generic.nix
Original file line number Diff line number Diff line change
@@ -13,8 +13,8 @@
, broken ? false
}:

{ stdenv, callPackage, pkgsi686Linux, fetchurl
, kernel ? null, xorg, zlib, perl, nukeReferences
{ stdenv, callPackage, pkgs, pkgsi686Linux, fetchurl
, kernel ? null, perl, nukeReferences
, # Whether to build the libraries only (i.e. not the kernel module or
# nvidia-settings). Used to support 32-bit binaries on 64-bit
# Linux.
@@ -32,6 +32,8 @@ let
pkgSuffix = optionalString (versionOlder version "304") "-pkg0";
i686bundled = versionAtLeast version "391";

libPathFor = pkgs: pkgs.lib.makeLibraryPath [ pkgs.xorg.libXext pkgs.xorg.libX11
pkgs.xorg.libXv pkgs.xorg.libXrandr pkgs.xorg.libxcb pkgs.zlib pkgs.stdenv.cc.cc ];

self = stdenv.mkDerivation {
name = "nvidia-x11-${version}${nameSuffix}";
@@ -70,7 +72,8 @@ let
dontStrip = true;
dontPatchELF = true;

libPath = makeLibraryPath [ xorg.libXext xorg.libX11 xorg.libXv xorg.libXrandr xorg.libxcb zlib stdenv.cc.cc ];
libPath = libPathFor pkgs;
libPath32 = optionalString i686bundled (libPathFor pkgsi686Linux);

nativeBuildInputs = [ perl nukeReferences ]
++ optionals (!libsOnly) kernel.moduleBuildDependencies;