Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 gdk-pixbuf-xlib,
7 gettext,
8 gtk2-x11,
9 libICE,
10 libSM,
11 libxcrypt,
12 libXinerama,
13 libXrandr,
14 libXtst,
15 librep,
16 makeWrapper,
17 pango,
18 pkg-config,
19 rep-gtk,
20 texinfo,
21 which,
22 versionCheckHook,
23}:
24
25stdenv.mkDerivation (finalAttrs: {
26 pname = "sawfish";
27 version = "1.13.0";
28
29 src = fetchFromGitHub {
30 owner = "SawfishWM";
31 repo = "sawfish";
32 tag = "sawfish-${finalAttrs.version}";
33 hash = "sha256-4hxws3afDN9RjO9JCEjEgG4/g6bSycrmiJzRoyNnl3s=";
34 };
35
36 nativeBuildInputs = [
37 autoreconfHook
38 gettext
39 librep
40 makeWrapper
41 pkg-config
42 texinfo
43 which
44 ];
45
46 buildInputs = [
47 gdk-pixbuf-xlib
48 gtk2-x11
49 libICE
50 libSM
51 libxcrypt
52 libXinerama
53 libXrandr
54 libXtst
55 librep
56 pango
57 rep-gtk
58 ];
59
60 postPatch = ''
61 sed -e 's|REP_DL_LOAD_PATH=|REP_DL_LOAD_PATH=$(REP_DL_LOAD_PATH):|g' -i Makedefs.in
62 sed -e 's|$(repexecdir)|$(libdir)/rep|g' -i src/Makefile.in
63 '';
64
65 strictDeps = true;
66 enableParallelBuilding = true;
67
68 postInstall = ''
69 for file in $out/lib/sawfish/sawfish-menu \
70 $out/bin/sawfish-about \
71 $out/bin/sawfish-client \
72 $out/bin/sawfish-config \
73 $out/bin/sawfish; do
74 wrapProgram $file \
75 --prefix REP_DL_LOAD_PATH : "$out/lib/rep" \
76 --set REP_LOAD_PATH "$out/share/sawfish/lisp"
77 done
78 '';
79
80 nativeInstallCheckInputs = [
81 versionCheckHook
82 ];
83 doInstallCheck = true;
84 versionCheckProgramArg = "--version";
85 versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.meta.mainProgram}";
86
87 meta = {
88 homepage = "http://sawfish.tuxfamily.org/";
89 description = "Extensible, Lisp-based window manager";
90 longDescription = ''
91 Sawfish is an extensible window manager using a Lisp-based scripting
92 language. Its policy is very minimal compared to most window managers. Its
93 aim is simply to manage windows in the most flexible and attractive manner
94 possible. All high-level WM functions are implemented in Lisp for future
95 extensibility or redefinition.
96 '';
97 license = lib.licenses.gpl2Plus;
98 maintainers = with lib.maintainers; [ ];
99 platforms = lib.platforms.unix;
100 mainProgram = "sawfish";
101 };
102})