xorg: generate python into nativeBuildInputs
This commit is contained in:
parent
602efddc24
commit
2d0fad757a
@ -1248,7 +1248,7 @@ lib.makeScope newScope (self: with self; {
|
|||||||
meta.platforms = stdenv.lib.platforms.unix;
|
meta.platforms = stdenv.lib.platforms.unix;
|
||||||
}) {};
|
}) {};
|
||||||
|
|
||||||
libxcb = callPackage ({ stdenv, pkgconfig, fetchurl, libxslt, libpthreadstubs, python, libXau, xcbproto, libXdmcp }: stdenv.mkDerivation {
|
libxcb = callPackage ({ stdenv, pkgconfig, fetchurl, libxslt, libpthreadstubs, libXau, xcbproto, libXdmcp, python }: stdenv.mkDerivation {
|
||||||
name = "libxcb-1.13.1";
|
name = "libxcb-1.13.1";
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
@ -1256,8 +1256,8 @@ lib.makeScope newScope (self: with self; {
|
|||||||
sha256 = "1i27lvrcsygims1pddpl5c4qqs6z715lm12ax0n3vx0igapvg7x8";
|
sha256 = "1i27lvrcsygims1pddpl5c4qqs6z715lm12ax0n3vx0igapvg7x8";
|
||||||
};
|
};
|
||||||
hardeningDisable = [ "bindnow" "relro" ];
|
hardeningDisable = [ "bindnow" "relro" ];
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig python ];
|
||||||
buildInputs = [ libxslt libpthreadstubs python libXau xcbproto libXdmcp ];
|
buildInputs = [ libxslt libpthreadstubs libXau xcbproto libXdmcp ];
|
||||||
meta.platforms = stdenv.lib.platforms.unix;
|
meta.platforms = stdenv.lib.platforms.unix;
|
||||||
}) {};
|
}) {};
|
||||||
|
|
||||||
@ -1594,8 +1594,8 @@ lib.makeScope newScope (self: with self; {
|
|||||||
sha256 = "1qdxw9syhbvswiqj5dvj278lrmfhs81apzmvx6205s4vcqg7563v";
|
sha256 = "1qdxw9syhbvswiqj5dvj278lrmfhs81apzmvx6205s4vcqg7563v";
|
||||||
};
|
};
|
||||||
hardeningDisable = [ "bindnow" "relro" ];
|
hardeningDisable = [ "bindnow" "relro" ];
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig python ];
|
||||||
buildInputs = [ python ];
|
buildInputs = [ ];
|
||||||
meta.platforms = stdenv.lib.platforms.unix;
|
meta.platforms = stdenv.lib.platforms.unix;
|
||||||
}) {};
|
}) {};
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ my %pkgURLs;
|
|||||||
my %pkgHashes;
|
my %pkgHashes;
|
||||||
my %pkgNames;
|
my %pkgNames;
|
||||||
my %pkgRequires;
|
my %pkgRequires;
|
||||||
|
my %pkgNativeRequires;
|
||||||
|
|
||||||
my %pcMap;
|
my %pcMap;
|
||||||
|
|
||||||
@ -106,6 +107,7 @@ while (<>) {
|
|||||||
my $provides = `find $pkgDir -name "*.pc.in"`;
|
my $provides = `find $pkgDir -name "*.pc.in"`;
|
||||||
my @provides2 = split '\n', $provides;
|
my @provides2 = split '\n', $provides;
|
||||||
my @requires = ();
|
my @requires = ();
|
||||||
|
my @nativeRequires = ();
|
||||||
|
|
||||||
foreach my $pcFile (@provides2) {
|
foreach my $pcFile (@provides2) {
|
||||||
my $pc = $pcFile;
|
my $pc = $pcFile;
|
||||||
@ -163,7 +165,7 @@ while (<>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($file =~ /AM_PATH_PYTHON/) {
|
if ($file =~ /AM_PATH_PYTHON/) {
|
||||||
push @requires, "python";
|
push @nativeRequires, "python";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($file =~ /AC_PATH_PROG\(FCCACHE/) {
|
if ($file =~ /AC_PATH_PROG\(FCCACHE/) {
|
||||||
@ -230,7 +232,9 @@ while (<>) {
|
|||||||
push @requires, "gperf", "m4", "xproto" if $pkg =~ /xcbutil/;
|
push @requires, "gperf", "m4", "xproto" if $pkg =~ /xcbutil/;
|
||||||
|
|
||||||
print "REQUIRES $pkg => @requires\n";
|
print "REQUIRES $pkg => @requires\n";
|
||||||
|
print "NATIVE_REQUIRES $pkg => @nativeRequires\n";
|
||||||
$pkgRequires{$pkg} = \@requires;
|
$pkgRequires{$pkg} = \@requires;
|
||||||
|
$pkgNativeRequires{$pkg} = \@nativeRequires;
|
||||||
|
|
||||||
print "done\n";
|
print "done\n";
|
||||||
}
|
}
|
||||||
@ -255,6 +259,20 @@ EOF
|
|||||||
foreach my $pkg (sort (keys %pkgURLs)) {
|
foreach my $pkg (sort (keys %pkgURLs)) {
|
||||||
print "$pkg\n";
|
print "$pkg\n";
|
||||||
|
|
||||||
|
my %nativeRequires = ();
|
||||||
|
my @nativeBuildInputs;
|
||||||
|
foreach my $req (sort @{$pkgNativeRequires{$pkg}}) {
|
||||||
|
if (defined $pcMap{$req}) {
|
||||||
|
# Some packages have .pc that depends on itself.
|
||||||
|
next if $pcMap{$req} eq $pkg;
|
||||||
|
if (!defined $nativeRequires{$pcMap{$req}}) {
|
||||||
|
push @nativeBuildInputs, $pcMap{$req};
|
||||||
|
$nativeRequires{$pcMap{$req}} = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print " NOT FOUND: $req\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
my %requires = ();
|
my %requires = ();
|
||||||
my @buildInputs;
|
my @buildInputs;
|
||||||
foreach my $req (sort @{$pkgRequires{$pkg}}) {
|
foreach my $req (sort @{$pkgRequires{$pkg}}) {
|
||||||
@ -270,9 +288,11 @@ foreach my $pkg (sort (keys %pkgURLs)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $nativeBuildInputsStr = join "", map { $_ . " " } @nativeBuildInputs;
|
||||||
my $buildInputsStr = join "", map { $_ . " " } @buildInputs;
|
my $buildInputsStr = join "", map { $_ . " " } @buildInputs;
|
||||||
|
|
||||||
my @arguments = @buildInputs;
|
my @arguments = @buildInputs;
|
||||||
|
push @arguments, @nativeBuildInputs;
|
||||||
unshift @arguments, "stdenv", "pkgconfig", "fetchurl";
|
unshift @arguments, "stdenv", "pkgconfig", "fetchurl";
|
||||||
my $argumentsStr = join ", ", @arguments;
|
my $argumentsStr = join ", ", @arguments;
|
||||||
|
|
||||||
@ -290,7 +310,7 @@ foreach my $pkg (sort (keys %pkgURLs)) {
|
|||||||
sha256 = "$pkgHashes{$pkg}";
|
sha256 = "$pkgHashes{$pkg}";
|
||||||
};
|
};
|
||||||
hardeningDisable = [ "bindnow" "relro" ];
|
hardeningDisable = [ "bindnow" "relro" ];
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig $nativeBuildInputsStr];
|
||||||
buildInputs = [ $buildInputsStr];$extraAttrsStr
|
buildInputs = [ $buildInputsStr];$extraAttrsStr
|
||||||
meta.platforms = stdenv.lib.platforms.unix;
|
meta.platforms = stdenv.lib.platforms.unix;
|
||||||
}) {};
|
}) {};
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
stdenv, makeWrapper, lib, fetchurl, fetchpatch, buildPackages,
|
stdenv, makeWrapper, lib, fetchurl, fetchpatch, buildPackages,
|
||||||
|
|
||||||
automake, autoconf, libtool, intltool, mtdev, libevdev, libinput,
|
automake, autoconf, libtool, intltool, mtdev, libevdev, libinput,
|
||||||
python, freetype, tradcpp, fontconfig,
|
freetype, tradcpp, fontconfig,
|
||||||
libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm,
|
libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm,
|
||||||
mesa_noglu, udev, bootstrap_cmds, bison, flex, clangStdenv, autoreconfHook,
|
mesa_noglu, udev, bootstrap_cmds, bison, flex, clangStdenv, autoreconfHook,
|
||||||
mcpp, epoxy, openssl, pkgconfig, llvm_6,
|
mcpp, epoxy, openssl, pkgconfig, llvm_6,
|
||||||
@ -85,15 +85,10 @@ self: super:
|
|||||||
});
|
});
|
||||||
|
|
||||||
libxcb = super.libxcb.overrideAttrs (attrs: {
|
libxcb = super.libxcb.overrideAttrs (attrs: {
|
||||||
nativeBuildInputs = attrs.nativeBuildInputs ++ [ python ];
|
|
||||||
configureFlags = [ "--enable-xkb" "--enable-xinput" ];
|
configureFlags = [ "--enable-xkb" "--enable-xinput" ];
|
||||||
outputs = [ "out" "dev" "man" "doc" ];
|
outputs = [ "out" "dev" "man" "doc" ];
|
||||||
});
|
});
|
||||||
|
|
||||||
xcbproto = super.xcbproto.overrideAttrs (attrs: {
|
|
||||||
nativeBuildInputs = attrs.nativeBuildInputs ++ [ python ];
|
|
||||||
});
|
|
||||||
|
|
||||||
libX11 = super.libX11.overrideAttrs (attrs: {
|
libX11 = super.libX11.overrideAttrs (attrs: {
|
||||||
outputs = [ "out" "dev" "man" ];
|
outputs = [ "out" "dev" "man" ];
|
||||||
configureFlags = attrs.configureFlags or []
|
configureFlags = attrs.configureFlags or []
|
||||||
|
@ -13941,7 +13941,6 @@ with pkgs;
|
|||||||
inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa;
|
inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa;
|
||||||
inherit (darwin.apple_sdk.libs) Xplugin;
|
inherit (darwin.apple_sdk.libs) Xplugin;
|
||||||
bootstrap_cmds = if stdenv.isDarwin then darwin.bootstrap_cmds else null;
|
bootstrap_cmds = if stdenv.isDarwin then darwin.bootstrap_cmds else null;
|
||||||
python = python2; # Incompatible with Python 3x
|
|
||||||
udev = if stdenv.isLinux then udev else null;
|
udev = if stdenv.isLinux then udev else null;
|
||||||
libdrm = if stdenv.isLinux then libdrm else null;
|
libdrm = if stdenv.isLinux then libdrm else null;
|
||||||
abiCompat = config.xorg.abiCompat # `config` because we have no `xorg.override`
|
abiCompat = config.xorg.abiCompat # `config` because we have no `xorg.override`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user