personal/dotfiles

pkgs/dwm.nix in framework
Repositories | Summary | Log | Files | README.md | LICENSE

dwm.nix (993B) download


 1{ pkgs ? import <nixpkgs> { }
 2, configHeader
 3}:
 4
 5pkgs.stdenv.mkDerivation rec {
 6  name = "dwm";
 7  src = pkgs.fetchurl {
 8    url = https://dl.suckless.org/dwm/dwm-6.5.tar.gz;
 9    hash = "sha256-Ideev6ny+5MUGDbCZmy4H0eExp1k5/GyNS+blwuglyk=";
10  };
11
12  buildInputs = with pkgs; [
13    xorg.libX11
14    xorg.libXft
15    xorg.libXinerama
16  ];
17
18  patches = [
19    # a mix of these patches: statuscolor, statuspadding, systray
20    ../patches/dwm-statusbar.diff
21
22    (pkgs.fetchurl {
23      url = https://dwm.suckless.org/patches/activetagindicatorbar/dwm-activetagindicatorbar-6.2.diff;
24      hash = "sha256-VKqFvR4u+Q6ya+PqaFAuuYfIZb4i3VN2gBTEb564hyA=";
25    })
26    (pkgs.fetchurl {
27      url = https://dwm.suckless.org/patches/urgentborder/dwm-6.2-urg-border.diff;
28      hash = "sha256-nPpKIovwTPKdRL6aiWAr6Mt4dXhryvsTw1l00j1QE8w=";
29    })
30  ];
31
32  configurePhase = ''
33    ln -sf ${configHeader} config.h
34  '';
35
36  buildPhase = ''
37    make all
38  '';
39
40  installPhase = ''
41    make PREFIX=$out install
42  '';
43}