2022-01-11 23:40:02 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip, pkg-config, libixp_hg, txt2tags, dash, python2, which
|
2015-09-01 12:36:03 +01:00
|
|
|
, libX11 , libXrender, libXext, libXinerama, libXrandr, libXft }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
rev = "2823";
|
|
|
|
version = "hg-2012-12-09";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "wmii";
|
2015-09-01 12:36:03 +01:00
|
|
|
|
2016-07-21 19:28:15 +01:00
|
|
|
src = fetchurl {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "https://storage.googleapis.com/google-code-archive-source/v2/code.google.com/wmii/source-archive.zip";
|
2016-07-21 19:28:15 +01:00
|
|
|
sha256 = "1wmkq14zvmfrmydl8752xz852cy7agrx3qp4fy2cc5asb2r9abaz";
|
2015-09-01 12:36:03 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# for dlopen-ing
|
|
|
|
patchPhase = ''
|
2016-07-21 19:28:15 +01:00
|
|
|
substituteInPlace lib/libstuff/x11/xft.c --replace "libXft.so" "$(pkg-config --variable=libdir xft)/libXft.so.2"
|
2016-05-08 01:06:45 +01:00
|
|
|
substituteInPlace cmd/wmii.sh.sh --replace "\$(which which)" "${which}/bin/which"
|
2015-09-01 12:36:03 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
for file in $(grep -lr '#!.*sh'); do
|
|
|
|
sed -i 's|#!.*sh|#!${dash}/bin/dash|' $file
|
|
|
|
done
|
|
|
|
|
|
|
|
cat <<EOF >> config.mk
|
|
|
|
PREFIX = $out
|
|
|
|
LIBIXP = ${libixp_hg}/lib/libixp.a
|
|
|
|
BINSH = ${dash}/bin/dash
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
2021-02-20 21:01:53 +00:00
|
|
|
nativeBuildInputs = [ pkg-config unzip ];
|
2022-01-11 23:40:02 +00:00
|
|
|
buildInputs = [ libixp_hg txt2tags dash python2 which
|
2015-09-01 12:36:03 +01:00
|
|
|
libX11 libXrender libXext libXinerama libXrandr libXft ];
|
|
|
|
|
|
|
|
# For some reason including mercurial in buildInputs did not help
|
2019-10-27 13:03:25 +00:00
|
|
|
makeFlags = [ "WMII_HGVERSION=hg${rev}" ];
|
2015-09-01 12:36:03 +01:00
|
|
|
|
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://suckless.org/"; # https://wmii.suckless.org/ does not exist anymore
|
2015-09-01 12:36:03 +01:00
|
|
|
description = "A small window manager controlled by a 9P filesystem";
|
2021-01-15 13:21:58 +00:00
|
|
|
maintainers = with lib.maintainers; [ kovirobi ];
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
platforms = with lib.platforms; linux;
|
2015-09-01 12:36:03 +01:00
|
|
|
};
|
|
|
|
}
|