read-edid: Only depend on libx86 on x86

This commit is contained in:
Tuomas Tynkkynen 2017-10-22 23:45:00 +03:00
parent acf1ae02dc
commit 681c8006f5

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, libx86 }:
{ stdenv, lib, fetchurl, cmake, libx86 }:
stdenv.mkDerivation rec {
name = "read-edid-${version}";
@ -9,7 +9,10 @@ stdenv.mkDerivation rec {
sha256 = "0vqqmwsgh2gchw7qmpqk6idgzcm5rqf2fab84y7gk42v1x2diin7";
};
buildInputs = [ cmake libx86 ];
nativeBuildInputs = [ cmake ];
buildInputs = lib.optional (stdenv.isi686 || stdenv.isx86_64) libx86;
cmakeFlags = [ "-DCLASSICBUILD=${if stdenv.isi686 || stdenv.isx86_64 then "ON" else "OFF"}" ];
patchPhase = ''
substituteInPlace CMakeLists.txt --replace 'COPYING' 'LICENSE'