mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 04:12:44 +03:00
* X.org generator: specify overrides in a Nix expression rather than
in the generator script. This makes it easier to change the X.org packages. * Added xfs, twm. svn path=/nixpkgs/trunk/; revision=15375
This commit is contained in:
parent
54d3ce4b61
commit
c718ec217b
@ -170,9 +170,12 @@ splashutils_15 = ...;</programlisting>
|
||||
|
||||
<para>The Nix expressions for the X.org packages reside in
|
||||
<filename>pkgs/servers/x11/xorg/default.nix</filename>. This file is
|
||||
automatically generated from lists of tarballs in an X.org
|
||||
release. As such it should not be modified directly; rather, you
|
||||
should modify the lists or the generator script.</para>
|
||||
automatically generated from lists of tarballs in an X.org release.
|
||||
As such it should not be modified directly; rather, you should modify
|
||||
the lists, the generator script or the file
|
||||
<filename>pkgs/servers/x11/xorg/overrides.nix</filename>, in which you
|
||||
can override or add to the derivations produced by the
|
||||
generator.</para>
|
||||
|
||||
<para>The generator is invoked as follows:
|
||||
|
||||
@ -212,8 +215,8 @@ some people or by other packages (such as
|
||||
<para>If the expression for a package requires derivation attributes
|
||||
that the generator cannot figure out automatically (say,
|
||||
<varname>patches</varname> or a <varname>postInstall</varname> hook),
|
||||
you should modify the generator script
|
||||
(<varname>generate-expr-from-tarballs.pl</varname>).</para>
|
||||
you should modify
|
||||
<filename>pkgs/servers/x11/xorg/overrides.nix</filename>.</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -32,27 +32,6 @@ $pcMap{"\$PIXMAN"} = "pixman";
|
||||
$pcMap{"\$RENDERPROTO"} = "renderproto";
|
||||
|
||||
|
||||
$extraAttrs{"xorgserver"} = " patches = [./xorgserver-dri-path.patch ./xorgserver-xkbcomp-path.patch ]; propagatedBuildInputs = [libpciaccess]; ";
|
||||
|
||||
$extraAttrs{"imake"} = " inherit xorgcffiles; x11BuildHook = ./imake.sh; patches = [./imake.patch]; ";
|
||||
|
||||
$extraAttrs{"setxkbmap"} = " postInstall = \"ensureDir \$out/share; ln -sfn \${xkeyboard_config}/etc/X11 \$out/share/X11\";";
|
||||
|
||||
$extraAttrs{"fontmiscmisc"} = " postInstall = \"ln -s \${fontalias}/lib/X11/fonts/misc/fonts.alias \$out/lib/X11/fonts/misc/fonts.alias\"; ";
|
||||
|
||||
$extraAttrs{"mkfontdir"} = " preBuild = \"substituteInPlace mkfontdir.cpp --replace BINDIR \${mkfontscale}/bin\"; ";
|
||||
|
||||
$extraAttrs{"xf86inputevdev"} = "
|
||||
preBuild = \"
|
||||
sed -e '/motion_history_proc/d; /history_size/d;' -i src/*.c
|
||||
\";";
|
||||
|
||||
$extraAttrs{"libXpm"} = "
|
||||
patchPhase = \"sed -i '/USE_GETTEXT_TRUE/d' sxpm/Makefile.in cxpm/Makefile.in\";";
|
||||
|
||||
$extraAttrs{"xkbcomp"} = " NIX_CFLAGS_COMPILE = \"-DDFLT_XKB_CONFIG_ROOT=\\\"/etc/X11/xkb\\\"\"; ";
|
||||
|
||||
|
||||
my $downloadCache = "./download-cache";
|
||||
$ENV{'NIX_DOWNLOAD_CACHE'} = $downloadCache;
|
||||
mkdir $downloadCache, 0755;
|
||||
@ -198,10 +177,6 @@ while (<>) {
|
||||
process \@requires, $1 while $file =~ /NEEDED=\"(.*)\"/g;
|
||||
process \@requires, $1 while $file =~ /XORG_DRIVER_CHECK_EXT\([^,]*,([^\)]*)\)/g;
|
||||
|
||||
push @requires, "glproto", "gl" if $pkg =~ /xf86videosis/;
|
||||
push @requires, "glproto", "gl" if $pkg =~ /xf86videointel/;
|
||||
push @requires, "zlib" if $pkg =~ /xorgserver/;
|
||||
push @requires, "xf86bigfontproto" if $pkg =~ /xorgserver/;
|
||||
push @requires, "libxslt" if $pkg =~ /libxcb/;
|
||||
push @requires, "gperf", "m4", "xproto" if $pkg =~ /xcbutil/;
|
||||
|
||||
@ -218,10 +193,14 @@ open OUT, ">default.nix";
|
||||
|
||||
print OUT "";
|
||||
print OUT <<EOF;
|
||||
# This is a generated file. Do not edit!
|
||||
# THIS IS A GENERATED FILE. DO NOT EDIT!
|
||||
args: with args;
|
||||
|
||||
rec {
|
||||
let
|
||||
|
||||
overrides = import ./overrides.nix {inherit args xorg;};
|
||||
|
||||
xorg = rec {
|
||||
|
||||
EOF
|
||||
|
||||
@ -248,7 +227,7 @@ foreach my $pkg (sort (keys %pkgURLs)) {
|
||||
$extraAttrs = "" unless defined $extraAttrs;
|
||||
|
||||
print OUT <<EOF
|
||||
$pkg = (stdenv.mkDerivation {
|
||||
$pkg = (stdenv.mkDerivation ((if overrides ? $pkg then overrides.$pkg else x: x) {
|
||||
name = "$pkgNames{$pkg}";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
@ -256,11 +235,11 @@ foreach my $pkg (sort (keys %pkgURLs)) {
|
||||
sha256 = "$pkgHashes{$pkg}";
|
||||
};
|
||||
buildInputs = [pkgconfig $inputs];$extraAttrs
|
||||
}) // {inherit $inputs;};
|
||||
})) // {inherit $inputs;};
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
print OUT "}\n";
|
||||
print OUT "}; in xorg\n";
|
||||
|
||||
close OUT;
|
||||
|
@ -8,3 +8,5 @@ mirror://xorg/individual/util/gccmakedep-1.0.2.tar.bz2
|
||||
mirror://xorg/individual/app/xmessage-1.0.2.tar.bz2
|
||||
mirror://xorg/individual/app/xeyes-1.0.1.tar.bz2
|
||||
mirror://xorg/individual/app/xclock-1.0.3.tar.bz2
|
||||
mirror://xorg/individual/app/xfs-1.0.8.tar.bz2
|
||||
mirror://xorg/individual/app/twm-1.0.4.tar.bz2
|
||||
|
64
pkgs/servers/x11/xorg/overrides.nix
Normal file
64
pkgs/servers/x11/xorg/overrides.nix
Normal file
@ -0,0 +1,64 @@
|
||||
{args, xorg}:
|
||||
|
||||
{
|
||||
|
||||
fontmiscmisc = attrs: attrs // {
|
||||
postInstall =
|
||||
''
|
||||
ln -s ${xorg.fontalias}/lib/X11/fonts/misc/fonts.alias $out/lib/X11/fonts/misc/fonts.alias
|
||||
'';
|
||||
};
|
||||
|
||||
imake = attrs: attrs // {
|
||||
inherit (xorg) xorgcffiles;
|
||||
x11BuildHook = ./imake.sh;
|
||||
patches = [./imake.patch];
|
||||
};
|
||||
|
||||
mkfontdir = attrs: attrs // {
|
||||
preBuild = "substituteInPlace mkfontdir.cpp --replace BINDIR ${xorg.mkfontscale}/bin";
|
||||
};
|
||||
|
||||
libXpm = attrs: attrs // {
|
||||
patchPhase = "sed -i '/USE_GETTEXT_TRUE/d' sxpm/Makefile.in cxpm/Makefile.in";
|
||||
};
|
||||
|
||||
setxkbmap = attrs: attrs // {
|
||||
postInstall =
|
||||
''
|
||||
ensureDir $out/share
|
||||
ln -sfn ${args.xkeyboard_config}/etc/X11 $out/share/X11
|
||||
'';
|
||||
};
|
||||
|
||||
xf86inputevdev = attrs: attrs // {
|
||||
configureFlags = "--with-sdkdir=\${out}/include/xorg";
|
||||
preBuild = "sed -e '/motion_history_proc/d; /history_size/d;' -i src/*.c";
|
||||
buildInputs = attrs.buildInputs ++ [xorg.kbproto xorg.libxkbfile xorg.randrproto];
|
||||
};
|
||||
|
||||
xf86videointel = attrs: attrs // {
|
||||
buildInputs = attrs.buildInputs ++ [xorg.glproto args.mesa];
|
||||
};
|
||||
|
||||
xf86videosis = attrs: attrs // {
|
||||
buildInputs = attrs.buildInputs ++ [xorg.glproto args.mesa];
|
||||
};
|
||||
|
||||
xkbcomp = attrs: attrs // {
|
||||
NIX_CFLAGS_COMPILE = "-DDFLT_XKB_CONFIG_ROOT=\"/etc/X11/xkb\"";
|
||||
};
|
||||
|
||||
xorgserver = attrs: attrs // {
|
||||
patches = [./xorgserver-dri-path.patch ./xorgserver-xkbcomp-path.patch];
|
||||
buildInputs = attrs.buildInputs ++ [args.zlib xorg.xf86bigfontproto];
|
||||
propagatedBuildInputs = [xorg.libpciaccess];
|
||||
/*
|
||||
configureFlags = "--with-xkb-output=/var/tmp";
|
||||
postPatch = ''
|
||||
sed -i -e 's@ -w @ -I${args.xkeyboard_config}/etc/X11/xkb -w @' xkb/ddxLoad.c
|
||||
'';
|
||||
*/
|
||||
};
|
||||
|
||||
}
|
@ -121,7 +121,7 @@ mirror://xorg/X11R7.4/src/everything/xf86dgaproto-2.0.3.tar.bz2
|
||||
mirror://xorg/X11R7.4/src/everything/xf86driproto-2.0.4.tar.bz2
|
||||
mirror://xorg/X11R7.4/src/everything/xf86-input-acecad-1.2.2.tar.bz2
|
||||
mirror://xorg/X11R7.4/src/everything/xf86-input-aiptek-1.1.1.tar.bz2
|
||||
mirror://xorg/X11R7.4/src/everything/xf86-input-evdev-2.0.4.tar.bz2
|
||||
mirror://xorg/individual/driver/xf86-input-evdev-2.2.1.tar.bz2
|
||||
mirror://xorg/X11R7.4/src/everything/xf86-input-joystick-1.3.2.tar.bz2
|
||||
mirror://xorg/X11R7.4/src/everything/xf86-input-keyboard-1.3.1.tar.bz2
|
||||
mirror://xorg/X11R7.4/src/everything/xf86-input-mouse-1.3.0.tar.bz2
|
||||
|
Loading…
Reference in New Issue
Block a user