about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/window-managers/stumpish/default.nix
blob: c776e66da886e44fe6f9299b24bcd928ee116b04 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ lib, stdenv, substituteAll, fetchFromGitHub, gnused, ncurses, xorg, rlwrap }:

stdenv.mkDerivation {
  pname = "stumpish";
  version = "0.0.1";

  src = fetchFromGitHub {
    owner = "stumpwm";
    repo = "stumpwm-contrib";
    rev = "9f5f06652c480159ec57d1fd8751b16f02db06dc";
    sha256 = "1dxzsnir3158p8y2128s08r9ca0ywr9mcznivmhn1lycw8mg4nfl";
  };

  buildInputs = [
    gnused xorg.xprop rlwrap ncurses
  ];

  patches = [
    (substituteAll {
      src = ./paths.patch;
      sed = "${gnused}/bin/sed";
      xprop = "${xorg.xprop}/bin/xprop";
      rlwrap = "${rlwrap}/bin/rlwrap";
      tput = "${ncurses}/bin/tput";
    })
  ];

  buildPhase = ''
    mkdir -p $out/bin
  '';

  installPhase = ''
    cp util/stumpish/stumpish $out/bin
  '';

  meta = with lib; {
    homepage = "https://github.com/stumpwm/stumpwm-contrib";
    description = "STUMPwm Interactive SHell";
    license = licenses.gpl2;
    maintainers = [ maintainers.ebzzry ];
    platforms = platforms.unix;
    mainProgram = "stumpish";
  };
}