diff options
author | Armeen Mahdian <mahdianarmeen@gmail.com> | 2022-04-25 09:11:00 -0500 |
---|---|---|
committer | Armeen Mahdian <mahdianarmeen@gmail.com> | 2022-04-26 07:06:43 -0500 |
commit | ec2c6af0f1a5a09c202ca9436bcdad8d80f86034 (patch) | |
tree | 4414045913ca64f14c053d1739eea1ac32693b4c /pkgs/applications/window-managers | |
parent | 434d86b2bc3f58bdf0e6a9f9f25917ce610f8fc7 (diff) |
wmii: hg-2012-12-09 -> unstable-2022-04-04
Diffstat (limited to 'pkgs/applications/window-managers')
-rw-r--r-- | pkgs/applications/window-managers/wmii-hg/default.nix | 46 | ||||
-rw-r--r-- | pkgs/applications/window-managers/wmii/default.nix | 72 |
2 files changed, 72 insertions, 46 deletions
diff --git a/pkgs/applications/window-managers/wmii-hg/default.nix b/pkgs/applications/window-managers/wmii-hg/default.nix deleted file mode 100644 index 6759e15ee8337..0000000000000 --- a/pkgs/applications/window-managers/wmii-hg/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ lib, stdenv, fetchurl, unzip, pkg-config, libixp_hg, txt2tags, dash, python2, which -, libX11 , libXrender, libXext, libXinerama, libXrandr, libXft }: - -stdenv.mkDerivation rec { - rev = "2823"; - version = "hg-2012-12-09"; - pname = "wmii"; - - src = fetchurl { - url = "https://storage.googleapis.com/google-code-archive-source/v2/code.google.com/wmii/source-archive.zip"; - sha256 = "1wmkq14zvmfrmydl8752xz852cy7agrx3qp4fy2cc5asb2r9abaz"; - }; - - # for dlopen-ing - patchPhase = '' - substituteInPlace lib/libstuff/x11/xft.c --replace "libXft.so" "$(pkg-config --variable=libdir xft)/libXft.so.2" - substituteInPlace cmd/wmii.sh.sh --replace "\$(which which)" "${which}/bin/which" - ''; - - 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 - ''; - - nativeBuildInputs = [ pkg-config unzip ]; - buildInputs = [ libixp_hg txt2tags dash python2 which - libX11 libXrender libXext libXinerama libXrandr libXft ]; - - # For some reason including mercurial in buildInputs did not help - makeFlags = [ "WMII_HGVERSION=hg${rev}" ]; - - meta = { - homepage = "https://suckless.org/"; # https://wmii.suckless.org/ does not exist anymore - description = "A small window manager controlled by a 9P filesystem"; - maintainers = with lib.maintainers; [ kovirobi ]; - license = lib.licenses.mit; - platforms = with lib.platforms; linux; - }; -} diff --git a/pkgs/applications/window-managers/wmii/default.nix b/pkgs/applications/window-managers/wmii/default.nix new file mode 100644 index 0000000000000..11f669da37a6f --- /dev/null +++ b/pkgs/applications/window-managers/wmii/default.nix @@ -0,0 +1,72 @@ +{ lib, stdenv +, fetchFromGitHub +, dash +, libX11 +, libXext +, libXft +, libXinerama +, libXrandr +, libXrender +, libixp +, pkg-config +, txt2tags +, unzip +, which +}: + +stdenv.mkDerivation rec { + pname = "wmii"; + version = "unstable-2022-04-04"; + + src = fetchFromGitHub { + owner = "0intro"; + repo = "wmii"; + rev = "ff120c7fee6e1b3a30a4a800074394327fb1da9d"; + hash = "sha256-KEmWnobpT/5TdgT2HGPCpG1duz9Q6Z6PFSEBs2Ce+7g="; + }; + + # for dlopen-ing + postPatch = '' + substituteInPlace lib/libstuff/x11/xft.c --replace "libXft.so" "$(pkg-config --variable=libdir xft)/libXft.so.2" + substituteInPlace cmd/wmii.sh.sh --replace "\$(which which)" "${which}/bin/which" + ''; + + postConfigure = '' + for file in $(grep -lr '#!.*sh'); do + sed -i 's|#!.*sh|#!${dash}/bin/dash|' $file + done + + cat <<EOF >> config.mk + PREFIX = $out + LIBIXP = ${libixp}/lib/libixp.a + BINSH = ${dash}/bin/dash + EOF + ''; + + # Remove optional python2 functionality + postInstall = '' + rm -rf $out/lib/python* $out/etc/wmii-hg/python + ''; + + nativeBuildInputs = [ pkg-config unzip ]; + buildInputs = [ + dash + libX11 + libXext + libXft + libXinerama + libXrandr + libXrender + libixp + txt2tags + which + ]; + + meta = { + homepage = "https://github.com/0intro/wmii"; + description = "A small, scriptable window manager, with a 9P filesystem interface and an acme-like layout"; + maintainers = with lib.maintainers; [ kovirobi ]; + license = lib.licenses.mit; + platforms = with lib.platforms; linux; + }; +} |