nvidia-x11: Fix the library-only build
Also, introduce a function ‘versionAtLeast’ which is probably more natural than ‘versionOlder’.
This commit is contained in:
parent
9f347eba61
commit
329a705005
|
@ -163,6 +163,10 @@ rec {
|
||||||
versionOlder = v1: v2: builtins.compareVersions v2 v1 == 1;
|
versionOlder = v1: v2: builtins.compareVersions v2 v1 == 1;
|
||||||
|
|
||||||
|
|
||||||
|
# Return true iff string v1 denotes a version equal to or newer than v2.
|
||||||
|
versionAtLeast = v1: v2: !versionOlder v1 v2;
|
||||||
|
|
||||||
|
|
||||||
# Get the version of the specified derivation, as specified in its
|
# Get the version of the specified derivation, as specified in its
|
||||||
# ‘name’ attribute.
|
# ‘name’ attribute.
|
||||||
getVersion = drv: (builtins.parseDrvName drv.name).version;
|
getVersion = drv: (builtins.parseDrvName drv.name).version;
|
||||||
|
|
|
@ -25,7 +25,7 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
patches =
|
patches =
|
||||||
[ ./version-test.patch ]
|
[ ./version-test.patch ]
|
||||||
++ optional (!versionOlder kernelDev.version "3.10") kernel310patch;
|
++ optional (!libsOnly && versionAtLeast kernelDev.version "3.10") kernel310patch;
|
||||||
|
|
||||||
src =
|
src =
|
||||||
if stdenv.system == "i686-linux" then
|
if stdenv.system == "i686-linux" then
|
||||||
|
|
Loading…
Reference in New Issue