libpciaccess: refactored and moved to pkgs/by-name from xorg namespace
This commit is contained in:
parent
2e8f4f8531
commit
2461fe141e
81
pkgs/by-name/li/libpciaccess/package.nix
Normal file
81
pkgs/by-name/li/libpciaccess/package.nix
Normal file
@ -0,0 +1,81 @@
|
||||
{
|
||||
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
|
||||
];
|
||||
};
|
||||
})
|
@ -4,6 +4,7 @@
|
||||
font-alias,
|
||||
font-util,
|
||||
gccmakedep,
|
||||
libpciaccess,
|
||||
luit,
|
||||
pixman,
|
||||
}:
|
||||
@ -12,6 +13,7 @@ self: with self; {
|
||||
|
||||
inherit
|
||||
gccmakedep
|
||||
libpciaccess
|
||||
luit
|
||||
pixman
|
||||
;
|
||||
@ -3197,37 +3199,6 @@ self: with self; {
|
||||
})
|
||||
) { };
|
||||
|
||||
# THIS IS A GENERATED FILE. DO NOT EDIT!
|
||||
libpciaccess = callPackage (
|
||||
{
|
||||
stdenv,
|
||||
pkg-config,
|
||||
fetchurl,
|
||||
testers,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libpciaccess";
|
||||
version = "0.18.1";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/lib/libpciaccess-0.18.1.tar.xz";
|
||||
sha256 = "0xpslrjnfrc1a7y8f8qwnd3wq24ndpj2q77ds12mbnwand239x2a";
|
||||
};
|
||||
hardeningDisable = [
|
||||
"bindnow"
|
||||
"relro"
|
||||
];
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ ];
|
||||
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
meta = {
|
||||
pkgConfigModules = [ "pciaccess" ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
) { };
|
||||
|
||||
# THIS IS A GENERATED FILE. DO NOT EDIT!
|
||||
libpthreadstubs = callPackage (
|
||||
{
|
||||
|
@ -37,6 +37,7 @@ $pcMap{"GL"} = "libGL";
|
||||
$pcMap{"gbm"} = "libgbm";
|
||||
$pcMap{"hwdata"} = "hwdata";
|
||||
$pcMap{"fontutil"} = "fontutil";
|
||||
$pcMap{"pciaccess"} = "libpciaccess";
|
||||
$pcMap{"\$PIXMAN"} = "pixman";
|
||||
$pcMap{"\$RENDERPROTO"} = "xorgproto";
|
||||
$pcMap{"\$DRI3PROTO"} = "xorgproto";
|
||||
@ -264,6 +265,7 @@ print OUT <<EOF;
|
||||
font-alias,
|
||||
font-util,
|
||||
gccmakedep,
|
||||
libpciaccess,
|
||||
luit,
|
||||
pixman,
|
||||
}:
|
||||
@ -272,6 +274,7 @@ self: with self; {
|
||||
|
||||
inherit
|
||||
gccmakedep
|
||||
libpciaccess
|
||||
luit
|
||||
pixman
|
||||
;
|
||||
|
@ -620,38 +620,6 @@ self: super:
|
||||
]; # mainly to avoid propagation
|
||||
});
|
||||
|
||||
libpciaccess = super.libpciaccess.overrideAttrs (attrs: {
|
||||
nativeBuildInputs = attrs.nativeBuildInputs ++ [
|
||||
meson
|
||||
ninja
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
attrs.buildInputs
|
||||
++ [ zlib ]
|
||||
++ lib.optionals stdenv.hostPlatform.isNetBSD [
|
||||
netbsd.libarch
|
||||
netbsd.libpci
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
(lib.mesonOption "pci-ids" "${hwdata}/share/hwdata")
|
||||
(lib.mesonEnable "zlib" true)
|
||||
];
|
||||
|
||||
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" ];
|
||||
badPlatforms = [
|
||||
# mandatory shared library
|
||||
lib.systems.inspect.platformPatterns.isStatic
|
||||
];
|
||||
};
|
||||
});
|
||||
|
||||
libpthreadstubs = super.libpthreadstubs.overrideAttrs (attrs: {
|
||||
# only contains a pkgconfig file on linux and windows
|
||||
meta = attrs.meta // {
|
||||
|
@ -167,7 +167,6 @@ mirror://xorg/individual/lib/libdmx-1.1.5.tar.xz
|
||||
mirror://xorg/individual/lib/libfontenc-1.1.8.tar.xz
|
||||
mirror://xorg/individual/lib/libFS-1.0.10.tar.xz
|
||||
mirror://xorg/individual/lib/libICE-1.1.2.tar.xz
|
||||
mirror://xorg/individual/lib/libpciaccess-0.18.1.tar.xz
|
||||
mirror://xorg/individual/lib/libSM-1.2.5.tar.xz
|
||||
mirror://xorg/individual/lib/libWindowsWM-1.0.1.tar.bz2
|
||||
mirror://xorg/individual/lib/libX11-1.8.12.tar.xz
|
||||
|
Loading…
x
Reference in New Issue
Block a user