Skip to content

Commit

Permalink
Build libdrm, mesa, mesa-glu and kmscube from git.
Browse files Browse the repository at this point in the history
To include as-yet-unreleased changes to make panfrost driver work.
  • Loading branch information
Thra11 committed Aug 22, 2019
1 parent d8fbf35 commit 4aa261f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
9 changes: 5 additions & 4 deletions pkgs/development/libraries/libdrm/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{ stdenv, fetchurl, pkgconfig, meson, ninja, libpthreadstubs, libpciaccess, valgrind-light }:
{ stdenv, fetchgit, pkgconfig, meson, ninja, libpthreadstubs, libpciaccess, valgrind-light }:

stdenv.mkDerivation rec {
pname = "libdrm";
version = "2.4.99";

src = fetchurl {
url = "https://dri.freedesktop.org/${pname}/${pname}-${version}.tar.bz2";
sha256 = "0pnsw4bmajzdbz8pk4wswdmw93shhympf2q9alhbnpfjgsf57gsd";
src = fetchgit {
url = "https://gitlab.freedesktop.org/mesa/drm.git";
rev = "14922551aa33e7592d2421cc89cf20a860a65310";
sha256 = "1aly2bbmp64f9yaj5pnj1nw25vgb0rzpw1n3kif6ngxxsq1x5r19";
};

outputs = [ "out" "dev" "bin" ];
Expand Down
17 changes: 11 additions & 6 deletions pkgs/development/libraries/mesa-glu/default.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
{ stdenv, fetchurl, pkgconfig, libGL, ApplicationServices }:
{ stdenv, fetchgit, pkgconfig, libGL, ApplicationServices, autoconf, automake, libtool }:

stdenv.mkDerivation rec {
name = "glu-${version}";
version = "9.0.0";
version = "9.0.1";

src = fetchurl {
url = "ftp://ftp.freedesktop.org/pub/mesa/glu/${name}.tar.bz2";
sha256 = "04nzlil3a6fifcmb95iix3yl8mbxdl66b99s62yzq8m7g79x0yhz";
src = fetchgit {
url = "https://gitlab.freedesktop.org/mesa/glu.git";
rev = "dd4e18eb7557a31a3c8318d6612801329877c745";
sha256 = "12ds0l9lasabzkqfm65ihhjc0zq9w2rgz2ijkcfr3njgpzjs367n";
};
postPatch = ''
echo 'Cflags: -I''${includedir}' >> glu.pc.in
'';

nativeBuildInputs = [ pkgconfig ];
preConfigure = ''
./autogen.sh
'';

nativeBuildInputs = [ pkgconfig autoconf automake libtool ];
propagatedBuildInputs = [ libGL ]
++ stdenv.lib.optional stdenv.isDarwin ApplicationServices;

Expand Down
16 changes: 6 additions & 10 deletions pkgs/development/libraries/mesa/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, fetchpatch
{ stdenv, lib, fetchgit, fetchpatch
, pkgconfig, intltool, ninja, meson
, file, flex, bison, expat, libdrm, xorg, wayland, wayland-protocols, openssl
, llvmPackages, libffi, libomxil-bellagio, libva-minimal
Expand Down Expand Up @@ -35,14 +35,10 @@ stdenv.mkDerivation rec {
pname = "mesa";
inherit version;

src = fetchurl {
urls = [
"ftp://ftp.freedesktop.org/pub/mesa/mesa-${version}.tar.xz"
"ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz"
"ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
"https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz"
];
sha256 = "1q5p4mw7zrklwx1is09knnb762zzk33xwhwp99fw25ax4ar60m44";
src = fetchgit {
url = "https://gitlab.freedesktop.org/mesa/mesa.git";
rev = "74a7e3ed3b297f441b406ff62ef9ba504ba3b06c";
sha256 = "1lrnfgrs3qpg1awqsw15vaj70fq5z8yksfzr0cfqnvif8ia8j78m";
};

prePatch = "patchShebangs .";
Expand Down Expand Up @@ -167,7 +163,7 @@ stdenv.mkDerivation rec {
substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace "$drivers" "${libglvnd.driverLink}"
# remove pkgconfig files for GL/EGL; they are provided by libGL.
rm $dev/lib/pkgconfig/{gl,egl}.pc
rm $dev/lib/pkgconfig/gl.pc
# Update search path used by pkg-config
for pc in $dev/lib/pkgconfig/{d3d,dri,xatracker}.pc; do
Expand Down
4 changes: 2 additions & 2 deletions pkgs/os-specific/linux/kmscube/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ stdenv.mkDerivation rec {

src = fetchgit {
url = git://anongit.freedesktop.org/mesa/kmscube;
rev = "9dcce71e603616ee7a54707e932f962cdf8fb20a";
sha256 = "1q5b5yvyfj3127385mp1bfmcbnpnbdswdk8gspp7g4541xk4k933";
rev = "f632b23a528ed6b4e1fddd774db005c30ab65568";
sha256 = "0rr58h8g1nj94ng13hdd6nn44155xg48xafyi0v843lvh09k88vh";
};

nativeBuildInputs = [ autoreconfHook pkgconfig ];
Expand Down

0 comments on commit 4aa261f

Please sign in to comment.