mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 06:03:40 +00:00
ca5d91aa60
I was trying to cross compile SDL. Many dependencies work, but I ended seeing libX11 not ready for cross compilation. Other xorg libraries cross-compile well. libX11 may need a small patch. The problem is the usual "configure test cannot be run in cross compilation", so the configure script halts. I made the pkgconfig expression always return buildDrv, as I think it rarely will be needed as buildInput. So to avoid rewriting all its mentions to use it as buildNativeInput, I prefered this small change. svn path=/nixpkgs/branches/stdenv-updates/; revision=18500
26 lines
637 B
Nix
26 lines
637 B
Nix
{stdenv, fetchurl, pkgconfig, libpthreadstubs}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "libdrm-2.4.15";
|
|
|
|
src = fetchurl {
|
|
url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
|
|
sha256 = "1pm7iddv3yjwvqmlbdmj9m55bmkfcfzq0wvqpgx4gkmdjfd8kzxw";
|
|
};
|
|
|
|
buildInputs = [ pkgconfig libpthreadstubs ];
|
|
|
|
preConfigure = ''
|
|
# General case: non intel.
|
|
if test -n "$crossConfig"; then
|
|
configureFlags="$configureFlags --disable-intel";
|
|
fi
|
|
'';
|
|
|
|
meta = {
|
|
homepage = http://dri.freedesktop.org/libdrm/;
|
|
description = "Library for accessing the kernel's Direct Rendering Manager";
|
|
license = "bsd";
|
|
};
|
|
}
|