libxt: refactor, move to pkgs/by-name and rename from xorg.libXt
relevant changes: - removes the `sed 's,^as_dummy.*,as_dummy="\$PATH",' -i configure` because as in libx11 it probably doesn't do anything
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
buildPackages,
|
||||
pkg-config,
|
||||
xorgproto,
|
||||
libx11,
|
||||
libsm,
|
||||
writeScript,
|
||||
testers,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libxt";
|
||||
version = "1.3.1";
|
||||
|
||||
outputDoc = "devdoc";
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
"devdoc"
|
||||
];
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/lib/libXt-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-4Kd0szMk9NTAWxmepFBQ+HIGWG2BZV+L7026Q02TEog=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
xorgproto
|
||||
libx11
|
||||
libsm
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
xorgproto
|
||||
libx11
|
||||
# needs to be propagated because of header file dependencies
|
||||
libsm
|
||||
];
|
||||
|
||||
configureFlags =
|
||||
lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "--enable-malloc0returnsnull"
|
||||
++ lib.optional (stdenv.targetPlatform.useLLVM or false) "ac_cv_path_RAWCPP=cpp";
|
||||
|
||||
env = {
|
||||
CPP = if stdenv.hostPlatform.isDarwin then "clang -E -" else "${stdenv.cc.targetPrefix}cc -E -";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update-${finalAttrs.pname}" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts
|
||||
version="$(list-directory-versions --pname libXt \
|
||||
--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 = "X Toolkit Intrinsics library";
|
||||
homepage = "https://gitlab.freedesktop.org/xorg/lib/libxt";
|
||||
license = with lib.licenses; [
|
||||
mit
|
||||
hpndSellVariant
|
||||
hpnd
|
||||
mitOpenGroup
|
||||
x11
|
||||
];
|
||||
maintainers = [ ];
|
||||
pkgConfigModules = [ "xt" ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
@@ -25,6 +25,7 @@
|
||||
libxfixes,
|
||||
libxrandr,
|
||||
libxrender,
|
||||
libxt,
|
||||
libxv,
|
||||
lndir,
|
||||
luit,
|
||||
@@ -102,6 +103,7 @@ self: with self; {
|
||||
libXfixes = libxfixes;
|
||||
libXrandr = libxrandr;
|
||||
libXrender = libxrender;
|
||||
libXt = libxt;
|
||||
libXv = libxv;
|
||||
utilmacros = util-macros;
|
||||
xcbproto = xcb-proto;
|
||||
@@ -2395,46 +2397,6 @@ self: with self; {
|
||||
})
|
||||
) { };
|
||||
|
||||
# THIS IS A GENERATED FILE. DO NOT EDIT!
|
||||
libXt = callPackage (
|
||||
{
|
||||
stdenv,
|
||||
pkg-config,
|
||||
fetchurl,
|
||||
libICE,
|
||||
xorgproto,
|
||||
libSM,
|
||||
libX11,
|
||||
testers,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libXt";
|
||||
version = "1.3.1";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/lib/libXt-1.3.1.tar.xz";
|
||||
sha256 = "120jjd6l7fjdxy5myrc1dmc0cwpqa18a97hrbg0d9x146frp99z0";
|
||||
};
|
||||
hardeningDisable = [
|
||||
"bindnow"
|
||||
"relro"
|
||||
];
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
libICE
|
||||
xorgproto
|
||||
libSM
|
||||
libX11
|
||||
];
|
||||
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
meta = {
|
||||
pkgConfigModules = [ "xt" ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
) { };
|
||||
|
||||
# THIS IS A GENERATED FILE. DO NOT EDIT!
|
||||
libXtst = callPackage (
|
||||
{
|
||||
|
||||
@@ -55,6 +55,7 @@ $pcMap{"xext"} = "libXext";
|
||||
$pcMap{"xfixes"} = "libXfixes";
|
||||
$pcMap{"xrandr"} = "libXrandr";
|
||||
$pcMap{"xrender"} = "libXrender";
|
||||
$pcMap{"xt"} = "libXt";
|
||||
$pcMap{"xtrans"} = "xtrans";
|
||||
$pcMap{"xv"} = "libXv";
|
||||
$pcMap{"\$PIXMAN"} = "pixman";
|
||||
@@ -320,6 +321,7 @@ print OUT <<EOF;
|
||||
libxfixes,
|
||||
libxrandr,
|
||||
libxrender,
|
||||
libxt,
|
||||
libxv,
|
||||
lndir,
|
||||
luit,
|
||||
@@ -397,6 +399,7 @@ self: with self; {
|
||||
libXfixes = libxfixes;
|
||||
libXrandr = libxrandr;
|
||||
libXrender = libxrender;
|
||||
libXt = libxt;
|
||||
libXv = libxv;
|
||||
utilmacros = util-macros;
|
||||
xcbproto = xcb-proto;
|
||||
|
||||
@@ -217,28 +217,6 @@ self: super:
|
||||
};
|
||||
});
|
||||
|
||||
# Propagate some build inputs because of header file dependencies.
|
||||
# Note: most of these are in Requires.private, so maybe builder.sh
|
||||
# should propagate them automatically.
|
||||
libXt = super.libXt.overrideAttrs (attrs: {
|
||||
preConfigure = ''
|
||||
sed 's,^as_dummy.*,as_dummy="\$PATH",' -i configure
|
||||
'';
|
||||
configureFlags =
|
||||
attrs.configureFlags or [ ]
|
||||
++ malloc0ReturnsNullCrossFlag
|
||||
++ lib.optional (stdenv.targetPlatform.useLLVM or false) "ac_cv_path_RAWCPP=cpp";
|
||||
propagatedBuildInputs = attrs.propagatedBuildInputs or [ ] ++ [ xorg.libSM ];
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
CPP = if stdenv.hostPlatform.isDarwin then "clang -E -" else "${stdenv.cc.targetPrefix}cc -E -";
|
||||
outputDoc = "devdoc";
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
"devdoc"
|
||||
];
|
||||
});
|
||||
|
||||
libXcomposite = super.libXcomposite.overrideAttrs (attrs: {
|
||||
outputs = [
|
||||
"out"
|
||||
|
||||
@@ -159,7 +159,6 @@ mirror://xorg/individual/lib/libXres-1.2.2.tar.xz
|
||||
mirror://xorg/individual/lib/libXScrnSaver-1.2.4.tar.xz
|
||||
mirror://xorg/individual/lib/libxshmfence-1.3.3.tar.xz
|
||||
mirror://xorg/individual/lib/libXTrap-1.0.1.tar.bz2
|
||||
mirror://xorg/individual/lib/libXt-1.3.1.tar.xz
|
||||
mirror://xorg/individual/lib/libXtst-1.2.5.tar.xz
|
||||
mirror://xorg/individual/lib/libXvMC-1.0.14.tar.xz
|
||||
mirror://xorg/individual/lib/libXxf86dga-1.1.6.tar.xz
|
||||
|
||||
Reference in New Issue
Block a user