2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, writeText, libX11, ncurses
|
|
|
|
, libXft, conf ? null, patches ? [], extraLibs ? []}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-05-03 17:38:23 +00:00
|
|
|
name = "st-0.8.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://dl.suckless.org/st/${name}.tar.gz";
|
2020-05-03 17:38:23 +00:00
|
|
|
sha256 = "0ll5wbw1szs70wdf8zy1y2ig5mfbqw2w4ls8d64r8z3y4gdf76lk";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
inherit patches;
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
|
|
|
|
postPatch = optionalString (conf!=null) "cp ${configFile} config.def.h";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ncurses ];
|
|
|
|
buildInputs = [ libX11 libXft ] ++ extraLibs;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
TERMINFO=$out/share/terminfo make install PREFIX=$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://st.suckless.org/";
|
|
|
|
description = "Simple Terminal for X from Suckless.org Community";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [andsild];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|