Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / ti / tinywm / package.nix
blob32c0e2df49c25268dd563093bdf818acd1c0cee4
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , libX11
5 }:
7 stdenv.mkDerivation (finalAttrs: {
8   pname = "tinywm";
9   version = "1.1-unstable-2014-04-22";
11   src = fetchFromGitHub {
12     owner = "mackstann";
13     repo = "tinywm";
14     rev = "9d05612f41fdb8bc359f1fd9cc930bf16315abb1";
15     hash = "sha256-q2DEMTxIp/nwTBTGEZMHEAqQs99iJwQgimHS0YQj+eg=";
16   };
18   buildInputs = [ libX11 ];
20   strictDeps = true;
22   dontConfigure = true;
24   buildPhase = ''
25     runHook preBuild
27     $CC -Wall -pedantic -I${libX11}/include tinywm.c -L${libX11}/lib -lX11 -o tinywm
29     runHook postBuild
30   '';
32   installPhase = ''
33     runHook preInstall
35     install -dm755 $out/bin $out/share/doc/tinywm-${finalAttrs.version}
36     install -m755 tinywm -t $out/bin/
37     # The annotated source code is a piece of documentation
38     install -m644 annotated.c README -t $out/share/doc/tinywm-${finalAttrs.version}
40     runHook postInstall
41   '';
43   meta = {
44     homepage = "http://incise.org/tinywm.html";
45     description = "Tiny window manager for X11";
46     longDescription = ''
47       TinyWM is a tiny window manager that I created as an exercise in
48       minimalism. It is also maybe helpful in learning some of the very basics
49       of creating a window manager. It is only around 50 lines of C. There is
50       also a Python version using python-xlib.
52       It lets you do four basic things:
54       - Move windows interactively with Alt+Button1 drag (left mouse button)
55       - Resize windows interactively with Alt+Button3 drag (right mouse button)
56       - Raise windows with Alt+F1 (not high on usability I know, but I needed a
57         keybinding in there somewhere)
58       - Focus windows with the mouse pointer (X does this on its own)
59     '';
60     license = lib.licenses.publicDomain;
61     mainProgram = "tinywm";
62     maintainers = with lib.maintainers; [ AndersonTorres ];
63     inherit (libX11.meta) platforms;
64   };