default.nix (1049B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 ncurses, 6 }: 7 8 stdenv.mkDerivation (finalAttrs: { 9 pname = "libst"; 10 version = "0-unstable-2021-06-06"; 11 12 src = fetchFromGitHub { 13 owner = "jeremybobbin"; 14 repo = "libst"; 15 rev = "4bcd511e6dd0d88730b9359fd5a4d12781c2344a"; 16 hash = "sha256-vpU1Hbd6c/c0M/eUvQqW7RXHG2bz707LkcKlgFrzHtc="; 17 }; 18 19 postPatch = '' 20 substituteInPlace Makefile \ 21 --replace-fail "ar rcs" "\$(AR) rcs" 22 ''; 23 24 nativeBuildInputs = [ ncurses ]; 25 26 buildInputs = [ ncurses ]; 27 28 postBuild = '' 29 make -C examples/svt CFLAGS=-I$PWD LDFLAGS=-L$PWD 30 ''; 31 32 preInstall = '' 33 export HOME=$TMP 34 mkdir -p $out/{lib,include} 35 ''; 36 37 installFlags = [ "PREFIX=$(out)" ]; 38 39 postInstall = '' 40 make -C examples/svt install PREFIX=$out 41 ''; 42 43 meta = { 44 description = "Suckless Terminal ANSI parser"; 45 homepage = "https://github.com/jeremybobbin/libst"; 46 license = lib.licenses.mit; 47 platforms = lib.platforms.linux; 48 maintainers = [ lib.maintainers.sikmir ]; 49 skip.ci = stdenv.isDarwin; 50 }; 51 })