2016-07-21 20:28:15 +02:00
|
|
|
{ stdenv, fetchurl, unzip, pkgconfig, libixp_hg, txt2tags, dash, python, which
|
2015-09-01 13:36:03 +02:00
|
|
|
, libX11 , libXrender, libXext, libXinerama, libXrandr, libXft }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
rev = "2823";
|
|
|
|
version = "hg-2012-12-09";
|
|
|
|
name = "wmii-${version}";
|
|
|
|
|
2016-07-21 20:28:15 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = https://storage.googleapis.com/google-code-archive-source/v2/code.google.com/wmii/source-archive.zip;
|
|
|
|
sha256 = "1wmkq14zvmfrmydl8752xz852cy7agrx3qp4fy2cc5asb2r9abaz";
|
2015-09-01 13:36:03 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# for dlopen-ing
|
|
|
|
patchPhase = ''
|
2016-07-21 20:28:15 +02:00
|
|
|
substituteInPlace lib/libstuff/x11/xft.c --replace "libXft.so" "$(pkg-config --variable=libdir xft)/libXft.so.2"
|
2016-05-08 02:06:45 +02:00
|
|
|
substituteInPlace cmd/wmii.sh.sh --replace "\$(which which)" "${which}/bin/which"
|
2015-09-01 13:36:03 +02: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
|
|
|
|
'';
|
|
|
|
|
2016-07-21 20:28:15 +02:00
|
|
|
buildInputs = [ unzip pkgconfig libixp_hg txt2tags dash python which
|
2015-09-01 13:36:03 +02:00
|
|
|
libX11 libXrender libXext libXinerama libXrandr libXft ];
|
|
|
|
|
|
|
|
# For some reason including mercurial in buildInputs did not help
|
|
|
|
makeFlags = "WMII_HGVERSION=hg${rev}";
|
|
|
|
|
|
|
|
meta = {
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = https://code.google.com/archive/p/wmii/;
|
2015-09-01 13:36:03 +02:00
|
|
|
description = "A small window manager controlled by a 9P filesystem";
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ kovirobi ];
|
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
inherit version;
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
2015-09-01 13:36:03 +02:00
|
|
|
};
|
|
|
|
}
|