mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 12:15:34 +03:00
libpthread-stubs: refactored, moved to pkgs/by-name and renamed from xorg.libpthreadstubs
This commit is contained in:
parent
2461fe141e
commit
4cc23fda05
5 changed files with 48 additions and 39 deletions
43
pkgs/by-name/li/libpthread-stubs/package.nix
Normal file
43
pkgs/by-name/li/libpthread-stubs/package.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
testers,
|
||||
writeScript,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libpthread-stubs";
|
||||
version = "0.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/lib/libpthread-stubs-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-WdpWbezOunwqeXCkoDtI2ZBfEmL/lEEKZJIk4z0kQrw=";
|
||||
};
|
||||
|
||||
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 = "Provides a pkg-config file `pthread-stubs.pc` containing the Cflags/Libs flags applicable to programs/libraries that use only lightweight pthread API";
|
||||
homepage = "https://gitlab.freedesktop.org/xorg/lib/pthread-stubs";
|
||||
# gitlab says x11-distribute-modifications but it's not
|
||||
# maybe due to https://github.com/spdx/spdx-online-tools/issues/540
|
||||
license = lib.licenses.x11;
|
||||
maintainers = [ ];
|
||||
pkgConfigModules = [ "pthread-stubs" ];
|
||||
# on these platforms according to the readme
|
||||
platforms = with lib.platforms; linux ++ cygwin ++ darwin ++ [ "x86_64-solaris" ];
|
||||
};
|
||||
})
|
|
@ -5,6 +5,7 @@
|
|||
font-util,
|
||||
gccmakedep,
|
||||
libpciaccess,
|
||||
libpthread-stubs,
|
||||
luit,
|
||||
pixman,
|
||||
}:
|
||||
|
@ -19,6 +20,7 @@ self: with self; {
|
|||
;
|
||||
fontalias = font-alias;
|
||||
fontutil = font-util;
|
||||
libpthreadstubs = libpthread-stubs;
|
||||
|
||||
# THIS IS A GENERATED FILE. DO NOT EDIT!
|
||||
appres = callPackage (
|
||||
|
@ -3199,37 +3201,6 @@ self: with self; {
|
|||
})
|
||||
) { };
|
||||
|
||||
# THIS IS A GENERATED FILE. DO NOT EDIT!
|
||||
libpthreadstubs = callPackage (
|
||||
{
|
||||
stdenv,
|
||||
pkg-config,
|
||||
fetchurl,
|
||||
testers,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libpthread-stubs";
|
||||
version = "0.5";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/xcb/libpthread-stubs-0.5.tar.xz";
|
||||
sha256 = "1g224hyy694jch54357zc895z46r90xs193hg4m7rfnfxinmdnjr";
|
||||
};
|
||||
hardeningDisable = [
|
||||
"bindnow"
|
||||
"relro"
|
||||
];
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ ];
|
||||
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
meta = {
|
||||
pkgConfigModules = [ "pthread-stubs" ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
) { };
|
||||
|
||||
# THIS IS A GENERATED FILE. DO NOT EDIT!
|
||||
libxcb = callPackage (
|
||||
{
|
||||
|
|
|
@ -38,6 +38,7 @@ $pcMap{"gbm"} = "libgbm";
|
|||
$pcMap{"hwdata"} = "hwdata";
|
||||
$pcMap{"fontutil"} = "fontutil";
|
||||
$pcMap{"pciaccess"} = "libpciaccess";
|
||||
$pcMap{"pthread-stubs"} = "libpthreadstubs";
|
||||
$pcMap{"\$PIXMAN"} = "pixman";
|
||||
$pcMap{"\$RENDERPROTO"} = "xorgproto";
|
||||
$pcMap{"\$DRI3PROTO"} = "xorgproto";
|
||||
|
@ -266,6 +267,7 @@ print OUT <<EOF;
|
|||
font-util,
|
||||
gccmakedep,
|
||||
libpciaccess,
|
||||
libpthread-stubs,
|
||||
luit,
|
||||
pixman,
|
||||
}:
|
||||
|
@ -280,6 +282,7 @@ self: with self; {
|
|||
;
|
||||
fontalias = font-alias;
|
||||
fontutil = font-util;
|
||||
libpthreadstubs = libpthread-stubs;
|
||||
|
||||
EOF
|
||||
|
||||
|
|
|
@ -620,13 +620,6 @@ self: super:
|
|||
]; # mainly to avoid propagation
|
||||
});
|
||||
|
||||
libpthreadstubs = super.libpthreadstubs.overrideAttrs (attrs: {
|
||||
# only contains a pkgconfig file on linux and windows
|
||||
meta = attrs.meta // {
|
||||
platforms = lib.platforms.unix ++ lib.platforms.windows;
|
||||
};
|
||||
});
|
||||
|
||||
setxkbmap = super.setxkbmap.overrideAttrs (attrs: {
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/man/man7
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
mirror://xorg/individual/xcb/libpthread-stubs-0.5.tar.xz
|
||||
mirror://xorg/individual/xcb/xcb-util-0.4.1.tar.xz
|
||||
mirror://xorg/individual/xcb/xcb-util-errors-1.0.1.tar.xz
|
||||
mirror://xorg/individual/xcb/xcb-util-image-0.4.1.tar.xz
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue