diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index 37a0c35b18606..cbadaa10ef6a6 100644 --- a/pkgs/os-specific/bsd/netbsd/default.nix +++ b/pkgs/os-specific/bsd/netbsd/default.nix @@ -679,6 +679,13 @@ in makeScopeWithSplicing ## ## START LIBRARIES ## + libarch = mkDerivation { + path = "lib/libarch"; + version = "9.2"; + sha256 = "6ssenRhuSwp0Jn71ErT0PrEoCJ+cIYRztwdL4QTDZsQ="; + meta.platforms = lib.platforms.netbsd; + }; + libutil = mkDerivation { path = "lib/libutil"; version = "9.2"; @@ -808,6 +815,16 @@ in makeScopeWithSplicing meta.platforms = lib.platforms.netbsd; }; + libpci = mkDerivation { + pname = "libpci"; + path = "lib/libpci"; + version = "9.2"; + sha256 = "+IOEO1Bw3/H3iCp3uk3bwsFZbvCqN5Ciz70irnPl8E8="; + NIX_CFLAGS_COMPILE = [ "-I." ]; + meta.platforms = lib.platforms.netbsd; + extraPaths = with self; [ sys.src ]; + }; + libpthread-headers = mkDerivation { pname = "libpthread-headers"; path = "lib/libpthread"; diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 6de759498b21c..9c4f62e3d2446 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -3,7 +3,7 @@ lib, stdenv, makeWrapper, fetchurl, fetchpatch, fetchFromGitLab, buildPackages, automake, autoconf, libiconv, libtool, intltool, freetype, tradcpp, fontconfig, meson, ninja, ed, fontforge, - libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm, + libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm, netbsd, mesa, udev, bootstrap_cmds, bison, flex, clangStdenv, autoreconfHook, mcpp, libepoxy, openssl, pkg-config, llvm, libxslt, libxcrypt, ApplicationServices, Carbon, Cocoa, Xplugin, @@ -328,7 +328,13 @@ self: super: }); libpciaccess = super.libpciaccess.overrideAttrs (attrs: { - meta = attrs.meta // { platforms = lib.platforms.linux; }; + buildInputs = lib.optionals stdenv.hostPlatform.isNetBSD (with netbsd; [ libarch libpci ]); + + meta = attrs.meta // { + # https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/blob/master/configure.ac#L108-114 + platforms = lib.fold (os: ps: ps ++ lib.platforms.${os}) [] + [ "cygwin" "freebsd" "linux" "netbsd" "openbsd" "illumos" ]; + }; }); setxkbmap = super.setxkbmap.overrideAttrs (attrs: {