aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/applications/window-managers/sawfish/default.nix
blob: 0625977451946faf375a2efdc8a0b5fea9b9f568 (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{ stdenv
, fetchurl
, pkg-config
, which
, autoreconfHook
, rep-gtk
, pango
, gdk-pixbuf-xlib
, imlib
, gettext
, texinfo
, libXinerama
, libXrandr
, libXtst
, libICE
, libSM
, makeWrapper
}:

stdenv.mkDerivation rec {
  pname = "sawfish";
  version = "1.12.90";

  src = fetchurl {
    url = "https://download.tuxfamily.org/sawfish/${pname}_${version}.tar.xz";
    sha256 = "18p8srqqj9vjffg13qhspfz2gr1h4vfs10qzlv89g76r289iam31";
  };

  nativeBuildInputs = [ autoreconfHook pkg-config ];
  buildInputs = [ which
    rep-gtk pango gdk-pixbuf-xlib imlib gettext texinfo
    libXinerama libXrandr libXtst libICE libSM
    makeWrapper ];

  patchPhase = ''
    sed -e 's|REP_DL_LOAD_PATH=|REP_DL_LOAD_PATH=$(REP_DL_LOAD_PATH):|g' -i Makedefs.in
    sed -e 's|$(repexecdir)|$(libdir)/rep|g' -i src/Makefile.in
  '';

  postInstall = ''
    for i in $out/lib/sawfish/sawfish-menu $out/bin/sawfish-about \
             $out/bin/sawfish-client $out/bin/sawfish-config $out/bin/sawfish; do
      wrapProgram $i \
        --prefix REP_DL_LOAD_PATH : "$out/lib/rep" \
        --set REP_LOAD_PATH "$out/share/sawfish/lisp"
    done
  '';

  meta = with stdenv.lib; {
    description = "An extensible, Lisp-based window manager";
    longDescription = ''
      Sawfish is an extensible window manager using a Lisp-based scripting language.
      Its policy is very minimal compared to most window managers. Its aim is simply
      to manage windows in the most flexible and attractive manner possible.
      All high-level WM functions are implemented in Lisp for future extensibility
      or redefinition.
    '';
    homepage = "https://sawfish.fandom.com/wiki/Main_Page";
    license = licenses.gpl2;
    maintainers = [ maintainers.AndersonTorres ];
  };
}