st.nix (855B) download
1{ pkgs ? import <nixpkgs> { }, configHeader }:
2
3with pkgs; stdenv.mkDerivation rec {
4 pname = "st";
5 version = "0.9.2";
6
7 src = pkgs.fetchurl {
8 url = "https://dl.suckless.org/st/st-${version}.tar.gz";
9 hash = "sha256-ayFdT0crIdYjLzDyIRF6d34kvP7miVXd77dCZGf5SUs=";
10 };
11
12 nativeBuildInputs = [
13 pkg-config
14 ];
15
16 buildInputs = [
17 fontconfig
18 freetype
19 xorg.libX11
20 xorg.libXft
21 ];
22
23 patches = [
24 ../patches/st-remove-terminfo.diff
25 ../patches/st-scrollback-ringbuffer.diff
26 (pkgs.fetchurl {
27 url = https://st.suckless.org/patches/anysize/st-anysize-20220718-baa9357.diff;
28 hash = "sha256-eO8MEPRb3uaCTtBznG+LaojXqlcj4eT422rQgpxopfo=";
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}