summary refs log tree commit diff
path: root/pkgs/development/libraries/libdrm/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-05-31 09:59:33 +0000
committerAlyssa Ross <hi@alyssa.is>2022-05-31 09:59:57 +0000
commit9ff36293d1e428cd7bf03e8d4b03611b6d361c28 (patch)
tree1ab51a42b868c55b83f6ccdb80371b9888739dd9 /pkgs/development/libraries/libdrm/default.nix
parent1c4fcd0d4b0541e674ee56ace1053e23e562cc80 (diff)
parentddc3c396a51918043bb0faa6f676abd9562be62c (diff)
downloadnixpkgs-archive.tar
nixpkgs-archive.tar.gz
nixpkgs-archive.tar.bz2
nixpkgs-archive.tar.lz
nixpkgs-archive.tar.xz
nixpkgs-archive.tar.zst
nixpkgs-archive.zip
Last good Nixpkgs for Weston+nouveau? archive
I came this commit hash to terwiz[m] on IRC, who is trying to figure out
what the last version of Spectrum that worked on their NUC with Nvidia
graphics is.
Diffstat (limited to 'pkgs/development/libraries/libdrm/default.nix')
-rw-r--r--pkgs/development/libraries/libdrm/default.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix
new file mode 100644
index 00000000000..e08a4673248
--- /dev/null
+++ b/pkgs/development/libraries/libdrm/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, lib, fetchurl, pkg-config, meson, ninja, docutils
+, libpthreadstubs, libpciaccess
+, withValgrind ? valgrind-light.meta.available, valgrind-light
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libdrm";
+  version = "2.4.110";
+
+  src = fetchurl {
+    url = "https://dri.freedesktop.org/${pname}/${pname}-${version}.tar.xz";
+    sha256 = "0dwpry9m5l27dlhq48j4bsiqwm0247cxdqwv3b7ddmkynk2f9kpf";
+  };
+
+  outputs = [ "out" "dev" "bin" ];
+
+  nativeBuildInputs = [ pkg-config meson ninja docutils ];
+  buildInputs = [ libpthreadstubs libpciaccess ]
+    ++ lib.optional withValgrind valgrind-light;
+
+  patches = [ ./cross-build-nm-path.patch ];
+
+  mesonFlags = [
+    "-Dnm-path=${stdenv.cc.targetPrefix}nm"
+    "-Dinstall-test-programs=true"
+    "-Domap=true"
+  ] ++ lib.optionals (stdenv.isAarch32 || stdenv.isAarch64) [
+    "-Dtegra=true"
+    "-Detnaviv=true"
+  ];
+
+  meta = with lib; {
+    homepage = "https://gitlab.freedesktop.org/mesa/drm";
+    downloadPage = "https://dri.freedesktop.org/libdrm/";
+    description = "Direct Rendering Manager library and headers";
+    longDescription = ''
+      A userspace library for accessing the DRM (Direct Rendering Manager) on
+      Linux, BSD and other operating systems that support the ioctl interface.
+      The library provides wrapper functions for the ioctls to avoid exposing
+      the kernel interface directly, and for chipsets with drm memory manager,
+      support for tracking relocations and buffers.
+      New functionality in the kernel DRM drivers typically requires a new
+      libdrm, but a new libdrm will always work with an older kernel.
+
+      libdrm is a low-level library, typically used by graphics drivers such as
+      the Mesa drivers, the X drivers, libva and similar projects.
+    '';
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ primeos ];
+  };
+}