mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-16 09:03:42 +00:00
Merge branch 'i3-tests'.
The reason I went through this whole journey of gathering dependencies and debugging just in order to get i3 tests working was because I wanted to supply test cases to a small patch I wrote for the upstream project. This adds/updates quite a few Perl packages and a X dummy helper, which are all needed in order to successfully run the test suite.
This commit is contained in:
commit
57781346d7
@ -1,6 +1,6 @@
|
||||
{ fetchurl, stdenv, which, pkgconfig, libxcb, xcbutilkeysyms, xcbutil,
|
||||
xcbutilwm, libstartup_notification, libX11, pcre, libev, yajl,
|
||||
xcb-util-cursor, coreutils, perl, pango }:
|
||||
xcb-util-cursor, coreutils, perl, pango, perlPackages, xdummy }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "i3-${version}";
|
||||
@ -11,13 +11,26 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0sqvd8yqf9vwqrrvbpbf8k93b3qfa3q9289m82xq15r31wlk8b2h";
|
||||
};
|
||||
|
||||
buildInputs = [ which pkgconfig libxcb xcbutilkeysyms xcbutil xcbutilwm
|
||||
libstartup_notification libX11 pcre libev yajl xcb-util-cursor perl pango ];
|
||||
buildInputs = [
|
||||
which pkgconfig libxcb xcbutilkeysyms xcbutil xcbutilwm
|
||||
libstartup_notification libX11 pcre libev yajl xcb-util-cursor perl pango
|
||||
perlPackages.AnyEventI3 perlPackages.X11XCB perlPackages.IPCRun
|
||||
perlPackages.ExtUtilsPkgConfig perlPackages.TestMore perlPackages.InlineC
|
||||
perlPackages.CarpAlways
|
||||
];
|
||||
|
||||
patchPhase = ''
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkPhase = ''
|
||||
ln -sf "${xdummy}/bin/xdummy" testcases/Xdummy
|
||||
(cd testcases && perl complete-run.pl)
|
||||
! grep -q '^not ok' testcases/latest/complete-run.log
|
||||
'';
|
||||
|
||||
configurePhase = "makeFlags=PREFIX=$out";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
83
pkgs/tools/misc/xdummy/default.nix
Normal file
83
pkgs/tools/misc/xdummy/default.nix
Normal file
@ -0,0 +1,83 @@
|
||||
{ stdenv, writeText, writeScriptBin, xorg, xkeyboard_config }:
|
||||
|
||||
let
|
||||
xorgConfig = writeText "dummy-xorg.conf" ''
|
||||
Section "ServerLayout"
|
||||
Identifier "dummy_layout"
|
||||
Screen 0 "dummy_screen"
|
||||
InputDevice "dummy_keyboard" "CoreKeyboard"
|
||||
InputDevice "dummy_mouse" "CorePointer"
|
||||
EndSection
|
||||
|
||||
Section "ServerFlags"
|
||||
Option "DontVTSwitch" "true"
|
||||
Option "AllowMouseOpenFail" "true"
|
||||
Option "PciForceNone" "true"
|
||||
Option "AutoEnableDevices" "false"
|
||||
Option "AutoAddDevices" "false"
|
||||
EndSection
|
||||
|
||||
Section "Files"
|
||||
ModulePath "${xorg.xorgserver}/lib/xorg/modules"
|
||||
ModulePath "${xorg.xf86videodummy}/lib/xorg/modules"
|
||||
XkbDir "${xkeyboard_config}/share/X11/xkb"
|
||||
FontPath "${xorg.fontadobe75dpi}/lib/X11/fonts/75dpi"
|
||||
FontPath "${xorg.fontadobe100dpi}/lib/X11/fonts/100dpi"
|
||||
FontPath "${xorg.fontbhlucidatypewriter75dpi}/lib/X11/fonts/75dpi"
|
||||
FontPath "${xorg.fontbhlucidatypewriter100dpi}/lib/X11/fonts/100dpi"
|
||||
FontPath "${xorg.fontbh100dpi}/lib/X11/fonts/100dpi"
|
||||
FontPath "${xorg.fontmiscmisc}/lib/X11/fonts/misc"
|
||||
FontPath "${xorg.fontcursormisc}/lib/X11/fonts/misc"
|
||||
EndSection
|
||||
|
||||
Section "Module"
|
||||
Load "dbe"
|
||||
Load "extmod"
|
||||
Load "freetype"
|
||||
Load "glx"
|
||||
EndSection
|
||||
|
||||
Section "InputDevice"
|
||||
Identifier "dummy_mouse"
|
||||
Driver "void"
|
||||
EndSection
|
||||
|
||||
Section "InputDevice"
|
||||
Identifier "dummy_keyboard"
|
||||
Driver "void"
|
||||
EndSection
|
||||
|
||||
Section "Monitor"
|
||||
Identifier "dummy_monitor"
|
||||
HorizSync 30.0 - 130.0
|
||||
VertRefresh 50.0 - 250.0
|
||||
Option "DPMS"
|
||||
EndSection
|
||||
|
||||
Section "Device"
|
||||
Identifier "dummy_device"
|
||||
Driver "dummy"
|
||||
VideoRam 192000
|
||||
EndSection
|
||||
|
||||
Section "Screen"
|
||||
Identifier "dummy_screen"
|
||||
Device "dummy_device"
|
||||
Monitor "dummy_monitor"
|
||||
DefaultDepth 24
|
||||
SubSection "Display"
|
||||
Depth 24
|
||||
Modes "1280x1024"
|
||||
EndSubSection
|
||||
EndSection
|
||||
'';
|
||||
|
||||
in writeScriptBin "xdummy" ''
|
||||
#!${stdenv.shell}
|
||||
export XKB_BINDIR="${xorg.xkbcomp}/bin"
|
||||
exec ${xorg.xorgserver}/bin/Xorg \
|
||||
-noreset \
|
||||
-logfile /dev/null \
|
||||
"$@" \
|
||||
-config "${xorgConfig}"
|
||||
''
|
@ -2458,6 +2458,8 @@ let
|
||||
|
||||
xdelta = callPackage ../tools/compression/xdelta { };
|
||||
|
||||
xdummy = callPackage ../tools/misc/xdummy { };
|
||||
|
||||
xfsprogs = callPackage ../tools/filesystems/xfsprogs { };
|
||||
|
||||
xmlroff = callPackage ../tools/typesetting/xmlroff {
|
||||
|
@ -116,6 +116,19 @@ let self = _self // overrides; _self = with self; {
|
||||
};
|
||||
};
|
||||
|
||||
AnyEventI3 = buildPerlPackage rec {
|
||||
name = "AnyEvent-I3-0.15";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/M/MS/MSTPLBG/${name}.tar.gz";
|
||||
sha256 = "0x8zi06667bdgaxn7driqx0d71mp6021r51hdzmj5m5qbhi2hvqi";
|
||||
};
|
||||
propagatedBuildInputs = [ AnyEvent JSONXS ];
|
||||
meta = {
|
||||
description = "Communicate with the i3 window manager";
|
||||
license = "perl";
|
||||
};
|
||||
};
|
||||
|
||||
AnyEventRabbitMQ = buildPerlPackage {
|
||||
name = "AnyEvent-RabbitMQ-1.15";
|
||||
src = fetchurl {
|
||||
@ -133,12 +146,12 @@ let self = _self // overrides; _self = with self; {
|
||||
};
|
||||
|
||||
AnyMoose = buildPerlPackage rec {
|
||||
name = "Any-Moose-0.10";
|
||||
name = "Any-Moose-0.24";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/S/SA/SARTAK/${name}.tar.gz";
|
||||
sha256 = "1kgksln1vykh0xynawv3pc3nw1yp7kjwbxbb5lh2hm21a4l4h61x";
|
||||
url = "mirror://cpan/authors/id/E/ET/ETHER/${name}.tar.gz";
|
||||
sha256 = "0g4w11chpnspnksw80jbdn5wp2m5hqzcyjzcy2hsjz9rkk2ncdbk";
|
||||
};
|
||||
propagatedBuildInputs = [Mouse];
|
||||
propagatedBuildInputs = [ Mouse ];
|
||||
};
|
||||
|
||||
ApacheLogFormatCompiler = buildPerlModule {
|
||||
@ -556,6 +569,18 @@ let self = _self // overrides; _self = with self; {
|
||||
};
|
||||
};
|
||||
|
||||
CarpAlways = buildPerlPackage rec {
|
||||
name = "Carp-Always-0.13";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/F/FE/FERREIRA/${name}.tar.gz";
|
||||
sha256 = "0i2rifkr7ybfcdsqana52487z7vxp2l5qdra0f6ik0ddhn6rzii1";
|
||||
};
|
||||
meta = {
|
||||
description = "Warns and dies noisily with stack backtraces";
|
||||
license = "perl";
|
||||
};
|
||||
};
|
||||
|
||||
CarpAssert = buildPerlPackage {
|
||||
name = "Carp-Assert-0.20";
|
||||
src = fetchurl {
|
||||
@ -1827,6 +1852,18 @@ let self = _self // overrides; _self = with self; {
|
||||
makeMakerFlags = "--lib=${pkgs.openssl}/lib";
|
||||
};
|
||||
|
||||
CwdGuard = buildPerlModule rec {
|
||||
name = "Cwd-Guard-0.04";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/K/KA/KAZEBURO/${name}.tar.gz";
|
||||
sha256 = "071k50n1yr48122jjjg50i1s2kwp06dmrisv35f3wjry8m6cqchm";
|
||||
};
|
||||
meta = {
|
||||
description = "Temporary changing working directory (chdir)";
|
||||
license = "perl";
|
||||
};
|
||||
};
|
||||
|
||||
DataClone = buildPerlPackage {
|
||||
name = "Data-Clone-0.003";
|
||||
src = fetchurl {
|
||||
@ -3390,6 +3427,19 @@ let self = _self // overrides; _self = with self; {
|
||||
};
|
||||
};
|
||||
|
||||
ExtUtilsPkgConfig = buildPerlPackage rec {
|
||||
name = "ExtUtils-PkgConfig-1.15";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/X/XA/XAOC/${name}.tar.gz";
|
||||
sha256 = "1cxh6w8vmyqmhl6afys2q6z6jkp1m6zvacpk70196zmk48p1kcv9";
|
||||
};
|
||||
propagatedBuildInputs = [ pkgs.pkgconfig ];
|
||||
meta = {
|
||||
description = "Simplistic interface to pkg-config";
|
||||
license = licenses.lgpl21Plus;
|
||||
};
|
||||
};
|
||||
|
||||
# From CPAN[1]:
|
||||
# This module exists merely as a compatibility wrapper around
|
||||
# ExtUtils::Typemaps. In a nutshell, ExtUtils::Typemap was renamed to
|
||||
@ -4558,13 +4608,14 @@ let self = _self // overrides; _self = with self; {
|
||||
};
|
||||
|
||||
Inline = buildPerlPackage rec {
|
||||
name = "Inline-0.45";
|
||||
name = "Inline-0.64";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/S/SI/SISYPHUS/${name}.tar.gz";
|
||||
sha256 = "1k5nrb3nh2y33bs944ri78m1ni60v4cl67ffhxx88azj542y5c9x";
|
||||
url = "mirror://cpan/authors/id/E/ET/ETJ/${name}.tar.gz";
|
||||
sha256 = "17n3gbc9jigpfwqfhgmxpvbgr9rkdrij8jayxqpzw611ixcxrplw";
|
||||
};
|
||||
|
||||
buildInputs = [ TestWarn ];
|
||||
propagatedBuildInputs = [ ParseRecDescent ];
|
||||
|
||||
meta = {
|
||||
@ -4583,6 +4634,28 @@ let self = _self // overrides; _self = with self; {
|
||||
};
|
||||
};
|
||||
|
||||
InlineC = buildPerlPackage rec {
|
||||
name = "Inline-C-0.62";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/E/ET/ETJ/${name}.tar.gz";
|
||||
sha256 = "0clggdpj5mmi35vm2991f9jsgv2a3s8r4f1bd88xxk8akv5b8i3r";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# this test will fail with chroot builds
|
||||
rm -f t/08taint.t
|
||||
'';
|
||||
|
||||
buildInputs = [ TestWarn FileCopyRecursive ];
|
||||
propagatedBuildInputs = [ Inline ];
|
||||
|
||||
meta = {
|
||||
description = "Write Perl Subroutines in C";
|
||||
license = "perl";
|
||||
};
|
||||
};
|
||||
|
||||
InlineJava = buildPerlPackage rec {
|
||||
name = "Inline-Java-0.52";
|
||||
|
||||
@ -5350,6 +5423,19 @@ let self = _self // overrides; _self = with self; {
|
||||
propagatedBuildInputs = [ ExtUtilsXSpp ExtUtilsCppGuess ];
|
||||
};
|
||||
|
||||
ModuleBuildXSUtil = buildPerlModule rec {
|
||||
name = "Module-Build-XSUtil-0.10";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/H/HI/HIDEAKIO/${name}.tar.gz";
|
||||
sha256 = "1323vxp8vf5xdz66lbc1wfciaks93mrbqfsjgb9nz1w9bb21xj36";
|
||||
};
|
||||
buildInputs = [ FileCopyRecursive CwdGuard CaptureTiny ];
|
||||
meta = {
|
||||
description = "A Module::Build class for building XS modules";
|
||||
license = "perl";
|
||||
};
|
||||
};
|
||||
|
||||
ModuleCoreList = buildPerlPackage {
|
||||
name = "Module-CoreList-3.01";
|
||||
src = fetchurl {
|
||||
@ -6156,14 +6242,30 @@ let self = _self // overrides; _self = with self; {
|
||||
};
|
||||
};
|
||||
|
||||
Mouse = buildPerlPackage rec {
|
||||
name = "Mouse-0.26";
|
||||
Mouse = buildPerlModule rec {
|
||||
name = "Mouse-2.3.0";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/B/BO/BOBTFISH/${name}.tar.gz";
|
||||
sha256 = "0dpf5qmf1vc8dq5nj6yiriz8v4wl8s9g519v1hnz4yf11n2lnr4x";
|
||||
url = "mirror://cpan/authors/id/G/GF/GFUJI/${name}.tar.gz";
|
||||
sha256 = "0ycl521mmc5989934502730rzsi9xqihdpnjihrkhflqmrzmaqwq";
|
||||
};
|
||||
buildInputs = [
|
||||
ModuleBuildXSUtil TestException TestLeakTrace TestRequires TestOutput
|
||||
TestFatal
|
||||
];
|
||||
};
|
||||
|
||||
MouseXNativeTraits = buildPerlPackage rec {
|
||||
name = "MouseX-NativeTraits-1.09";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/G/GF/GFUJI/${name}.tar.gz";
|
||||
sha256 = "0pnbchkxfz9fwa8sniyjqp0mz75b3k2fafq9r09znbbh51dbz9gq";
|
||||
};
|
||||
buildInputs = [ TestFatal ];
|
||||
propagatedBuildInputs = [ AnyMoose ];
|
||||
meta = {
|
||||
description = "Extend attribute interfaces for Mouse";
|
||||
license = "perl";
|
||||
};
|
||||
propagatedBuildInputs = [TestException];
|
||||
doCheck = false; # check can't find its own Mouse::Tiny module
|
||||
};
|
||||
|
||||
MozillaCA = buildPerlPackage {
|
||||
@ -8425,6 +8527,18 @@ let self = _self // overrides; _self = with self; {
|
||||
};
|
||||
};
|
||||
|
||||
TestLeakTrace = buildPerlPackage rec {
|
||||
name = "Test-LeakTrace-0.14";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/G/GF/GFUJI/${name}.tar.gz";
|
||||
sha256 = "06cn4g35l2gi9vbsdi2j49cxsji9fvfi7xp4xgdyxxds9vrxydia";
|
||||
};
|
||||
meta = {
|
||||
description = "Traces memory leaks";
|
||||
license = "perl";
|
||||
};
|
||||
};
|
||||
|
||||
TestLongString = buildPerlPackage rec {
|
||||
name = "Test-LongString-0.15";
|
||||
src = fetchurl {
|
||||
@ -9590,6 +9704,41 @@ let self = _self // overrides; _self = with self; {
|
||||
doCheck = false; # requires an X server
|
||||
};
|
||||
|
||||
X11XCB = buildPerlPackage rec {
|
||||
name = "X11-XCB-0.11";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/M/MS/MSTPLBG/${name}.tar.gz";
|
||||
sha256 = "18i3z1fzw76kl9n5driys12r6vhp3r6rmb2pjn5nc7m9n4bwgh38";
|
||||
};
|
||||
AUTOMATED_TESTING = false;
|
||||
buildInputs = [
|
||||
ExtUtilsDepends ExtUtilsPkgConfig DataDump
|
||||
XMLSimple XMLDescent TestDeep TestException
|
||||
pkgs.xorg.libxcb pkgs.xorg.xcbproto pkgs.xorg.xcbutil pkgs.xorg.xcbutilwm
|
||||
];
|
||||
propagatedBuildInputs = [ XSObjectMagic Mouse MouseXNativeTraits TryTiny ];
|
||||
NIX_CFLAGS_LINK = [ "-lxcb" "-lxcb-util" "-lxcb-xinerama" "-lxcb-icccm" ];
|
||||
doCheck = false; # requires an X server
|
||||
meta = {
|
||||
description = "XCB bindings for X";
|
||||
license = "perl";
|
||||
};
|
||||
};
|
||||
|
||||
XMLDescent = buildPerlPackage rec {
|
||||
name = "XML-Descent-1.04";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/A/AN/ANDYA/${name}.tar.gz";
|
||||
sha256 = "0l5xmw2hd95ypppz3lyvp4sn02ccsikzjwacli3ydxfdz1bbh4d7";
|
||||
};
|
||||
buildInputs = [ TestDifferences ];
|
||||
propagatedBuildInputs = [ XMLTokeParser ];
|
||||
meta = {
|
||||
description = "Recursive descent XML parsing";
|
||||
license = "perl";
|
||||
};
|
||||
};
|
||||
|
||||
XMLDOM = buildPerlPackage {
|
||||
name = "XML-DOM-1.44";
|
||||
src = fetchurl {
|
||||
@ -9711,6 +9860,19 @@ let self = _self // overrides; _self = with self; {
|
||||
propagatedBuildInputs = [XMLParser];
|
||||
};
|
||||
|
||||
XMLTokeParser = buildPerlPackage rec {
|
||||
name = "XML-TokeParser-0.05";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/P/PO/PODMASTER/${name}.tar.gz";
|
||||
sha256 = "1hnpwb3lh6cbgwvjjgqzcp6jm4mp612qn6ili38adc9nhkwv8fc5";
|
||||
};
|
||||
propagatedBuildInputs = [ XMLParser ];
|
||||
meta = {
|
||||
description = "Simplified interface to XML::Parser";
|
||||
license = "perl";
|
||||
};
|
||||
};
|
||||
|
||||
XMLTwig = buildPerlPackage {
|
||||
name = "XML-Twig-3.44";
|
||||
src = fetchurl {
|
||||
@ -9729,6 +9891,19 @@ let self = _self // overrides; _self = with self; {
|
||||
};
|
||||
};
|
||||
|
||||
XSObjectMagic = buildPerlPackage rec {
|
||||
name = "XS-Object-Magic-0.04";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/F/FL/FLORA/${name}.tar.gz";
|
||||
sha256 = "03fghj7hq0fiicmfdxhmzfm4mzv7s097pgkd32ji7jnljvhm9six";
|
||||
};
|
||||
buildInputs = [ ExtUtilsDepends TestFatal Testuseok ];
|
||||
meta = {
|
||||
description = "XS pointer backed objects using sv_magic";
|
||||
license = "perl";
|
||||
};
|
||||
};
|
||||
|
||||
YAML = buildPerlPackage {
|
||||
name = "YAML-0.90";
|
||||
src = fetchurl {
|
||||
|
Loading…
Reference in New Issue
Block a user