slstatus.nix (560B) download
1{ pkgs ? import <nixpkgs> { }, configHeader }:
2
3with pkgs; stdenv.mkDerivation rec {
4 name = "slstatus";
5 src = fetchurl {
6 url = https://dl.suckless.org/tools/slstatus-1.0.tar.gz;
7 hash = "sha256-bW0KFsCN2dIRFywwxHIHASZ6P0DNyTjbPzhvaits/1Q=";
8 };
9
10 buildInputs = [
11 xorg.libX11
12 ];
13
14 patches = [
15 ../patches/slstatus-battery-remaining.diff
16 ../patches/slstatus-notify.diff
17 ];
18
19 configurePhase = ''
20 ln -s ${configHeader} config.h
21 '';
22
23 buildPhase = ''
24 make all
25 '';
26
27 installPhase = ''
28 make PREFIX=$out install
29 '';
30}