about summary refs log tree commit diff
path: root/pkgs/by-name/ye/yeahwm/package.nix
blob: 7198447f40c7e9820767c667c545575b2f557d64 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{ lib
, stdenv
, fetchurl
, installShellFiles
, lesstif
, libX11
, libXext
, libXinerama
, libXmu
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "yeahwm";
  version = "0.3.5";

  src = fetchurl {
    url = "http://phrat.de/yeahwm_${finalAttrs.version}.tar.gz";
    hash = "sha256-ySzpiEjIuI2bZ8Eo4wcQlEwEpkVDECVFNcECsrb87gU=";
  };

  nativeBuildInputs = [
    installShellFiles
  ];

  buildInputs = [
    lesstif
    libX11
    libXext
    libXinerama
    libXmu
  ];

  strictDeps = true;

  preBuild = let
    includes = builtins.concatStringsSep " "
      (builtins.map (l: "-I${lib.getDev l}/include")
        finalAttrs.buildInputs);
    ldpath = builtins.concatStringsSep " "
      (builtins.map (l: "-L${lib.getLib l}/lib")
        finalAttrs.buildInputs);
  in ''
    makeFlagsArray+=( CC="${stdenv.cc}/bin/cc" \
                      XROOT="${libX11}" \
                      INCLUDES="${includes}" \
                      LDPATH="${ldpath}" \
                      prefix="${placeholder "out"}" )
  '';

  # Workaround build failure on -fno-common toolchains like upstream gcc-10.
  # Otherwise build fails as:
  #   ld: screen.o:(.bss+0x40): multiple definition of `fg'; client.o:(.bss+0x40): first defined here
  env.NIX_CFLAGS_COMPILE = "-fcommon";

  postInstall = ''
    installManPage yeahwm.1
  '';

  meta = {
    homepage = "http://phrat.de/index.html";
    description = "X window manager based on evilwm and aewm";
    longDescription = ''
      YeahWM is a h* window manager for X based on evilwm and aewm.

      Features
      - Sloppy Focus.
      - BeOS-like tabbed titles, which can be repositioned.
      - Support for Xinerama.
      - Simple Appearance.
      - Good keyboard control.
      - Creative usage of the mouse.
      - Respects aspect size hints.
      - Solid resize and move operations.
      - Virtual Desktops.
      - "Magic" Screen edges for desktop switching.
      - Snapping to other windows and screen borders when moving windows.
      - Small binary size(ca. 23kb).
      - Little resource usage.
      - It's slick.
    '';
    changelog = "http://phrat.de/README";
    license = lib.licenses.isc;
    mainProgram = "yeahwm";
    maintainers = with lib.maintainers; [ AndersonTorres ];
    inherit (libX11.meta) platforms;
  };
})