Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xorg.libpciaccess: fix build on NetBSD #210485

Merged
merged 4 commits into from
Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions pkgs/os-specific/bsd/netbsd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand Down
10 changes: 8 additions & 2 deletions pkgs/servers/x11/xorg/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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: {
Expand Down