Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
83 lines
1.8 KiB
Nix
83 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
testers,
|
|
writeScript,
|
|
pkg-config,
|
|
meson,
|
|
ninja,
|
|
zlib,
|
|
netbsd,
|
|
hwdata,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "libpciaccess";
|
|
version = "0.18.1";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://xorg/individual/lib/libpciaccess-${finalAttrs.version}.tar.xz";
|
|
hash = "sha256-SvQ0RLOK21VF0O0cLORtlgjMR7McI4f8UYFlZ2Wm+nY=";
|
|
};
|
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
meson
|
|
ninja
|
|
];
|
|
|
|
buildInputs = [
|
|
zlib
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isNetBSD [
|
|
netbsd.libarch
|
|
netbsd.libpci
|
|
];
|
|
|
|
mesonFlags = [
|
|
(lib.mesonOption "pci-ids" "${hwdata}/share/hwdata")
|
|
(lib.mesonEnable "zlib" true)
|
|
];
|
|
|
|
passthru = {
|
|
updateScript = writeScript "update-${finalAttrs.pname}" ''
|
|
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p common-updater-scripts
|
|
|
|
version="$(list-directory-versions --pname ${finalAttrs.pname} \
|
|
--url https://xorg.freedesktop.org/releases/individual/lib/ \
|
|
| sort -V | tail -n1)"
|
|
|
|
update-source-version ${finalAttrs.pname} "$version"
|
|
'';
|
|
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
};
|
|
|
|
meta = {
|
|
description = "Generic PCI access library";
|
|
homepage = "https://gitlab.freedesktop.org/xorg/lib/libpciaccess";
|
|
license = with lib.licenses; [
|
|
mit
|
|
isc
|
|
x11
|
|
];
|
|
pkgConfigModules = [ "pciaccess" ];
|
|
# https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/blob/6cd5a4afbb70868c7746de8d50dea59e02e9acf2/configure.ac#L108-114
|
|
platforms =
|
|
with lib.platforms;
|
|
cygwin
|
|
++ freebsd
|
|
++ illumos
|
|
++ linux
|
|
++ lib.platforms.netbsd # otherwise netbsd from the function arguments is used
|
|
++ openbsd;
|
|
badPlatforms = [
|
|
# mandatory shared library
|
|
lib.systems.inspect.platformPatterns.isStatic
|
|
];
|
|
};
|
|
})
|