2021-05-15 16:24:19 +01:00
|
|
|
{ lib, stdenv, fetchurl, cmake, pkg-config, python3, libX11, libXext, libXinerama, libXrandr, libXft, libXrender, freetype, asciidoc
|
2020-11-27 19:20:36 +00:00
|
|
|
, xdotool, xorgserver, xsetroot, xterm, runtimeShell
|
|
|
|
, nixosTests }:
|
2020-04-10 10:56:37 +01:00
|
|
|
|
2021-02-27 14:44:24 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-09 22:18:58 +01:00
|
|
|
pname = "herbstluftwm";
|
2021-05-15 16:24:19 +01:00
|
|
|
version = "0.9.3";
|
2013-07-17 17:02:53 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-04-09 22:18:58 +01:00
|
|
|
url = "https://herbstluftwm.org/tarballs/herbstluftwm-${version}.tar.gz";
|
2021-05-15 16:24:19 +01:00
|
|
|
sha256 = "01f1bv9axjhw1l2gwhdwahljssj0h8q7a1bqwbpnwvln0ayv39qb";
|
2013-07-17 17:02:53 +01:00
|
|
|
};
|
|
|
|
|
2020-04-09 22:18:58 +01:00
|
|
|
outputs = [
|
|
|
|
"out"
|
2021-02-27 14:44:24 +00:00
|
|
|
"doc"
|
2020-04-09 22:18:58 +01:00
|
|
|
"man"
|
|
|
|
];
|
2013-07-17 17:02:53 +01:00
|
|
|
|
2020-04-09 22:18:58 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_INSTALL_SYSCONF_PREFIX=${placeholder "out"}/etc"
|
2021-02-27 14:44:24 +00:00
|
|
|
];
|
2020-04-09 22:18:58 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2021-02-27 14:44:24 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
depsBuildBuild = [
|
2021-03-25 22:40:51 +00:00
|
|
|
asciidoc
|
2021-02-27 14:44:24 +00:00
|
|
|
];
|
2020-04-09 22:18:58 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libX11
|
|
|
|
libXext
|
|
|
|
libXinerama
|
|
|
|
libXrandr
|
2021-02-27 14:44:24 +00:00
|
|
|
libXft
|
2021-05-15 16:24:19 +01:00
|
|
|
libXrender
|
2021-02-27 14:44:24 +00:00
|
|
|
freetype
|
2020-04-09 22:18:58 +01:00
|
|
|
];
|
2013-07-17 17:02:53 +01:00
|
|
|
|
2020-11-20 16:40:08 +00:00
|
|
|
patches = [
|
|
|
|
./test-path-environment.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs doc/gendoc.py
|
|
|
|
|
|
|
|
# fix /etc/xdg/herbstluftwm paths in documentation and scripts
|
|
|
|
grep -rlZ /etc/xdg/herbstluftwm share/ doc/ scripts/ | while IFS="" read -r -d "" path; do
|
|
|
|
substituteInPlace "$path" --replace /etc/xdg/herbstluftwm $out/etc/xdg/herbstluftwm
|
|
|
|
done
|
|
|
|
|
|
|
|
# fix shebang in generated scripts
|
|
|
|
substituteInPlace tests/conftest.py --replace "/usr/bin/env bash" ${runtimeShell}
|
|
|
|
substituteInPlace tests/test_herbstluftwm.py --replace "/usr/bin/env bash" ${runtimeShell}
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
(python3.withPackages (ps: with ps; [ ewmh pytest xlib ]))
|
|
|
|
xdotool
|
|
|
|
xorgserver
|
|
|
|
xsetroot
|
|
|
|
xterm
|
|
|
|
python3.pkgs.pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
# make the package's module avalaible
|
|
|
|
preCheck = ''
|
|
|
|
export PYTHONPATH="$PYTHONPATH:../python"
|
|
|
|
'';
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "../tests" ];
|
2021-02-27 14:44:24 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_title_different_letters_are_drawn"
|
|
|
|
];
|
2020-11-20 16:40:08 +00:00
|
|
|
|
2020-11-27 19:20:36 +00:00
|
|
|
passthru = {
|
|
|
|
tests.herbstluftwm = nixosTests.herbstluftwm;
|
|
|
|
};
|
|
|
|
|
2020-11-20 16:39:33 +00:00
|
|
|
meta = with lib; {
|
2013-07-17 17:02:53 +01:00
|
|
|
description = "A manual tiling window manager for X";
|
2020-04-09 22:18:58 +01:00
|
|
|
homepage = "https://herbstluftwm.org/";
|
2020-11-20 16:39:33 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ thibautmarty ];
|
2013-07-17 17:02:53 +01:00
|
|
|
};
|
|
|
|
}
|