2013-05-10 15:31:13 +01:00
|
|
|
{ stdenv, fetchurl, writeText, libX11, ncurses, libXext, libXft, fontconfig
|
|
|
|
, conf? null}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
2012-08-05 11:44:01 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-05-10 15:31:13 +01:00
|
|
|
name = "st-0.4.1";
|
2012-08-05 11:44:01 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2012-12-18 16:13:12 +00:00
|
|
|
url = "http://dl.suckless.org/st/${name}.tar.gz";
|
2013-05-10 15:31:13 +01:00
|
|
|
sha256 = "0cdzwbm5fxrwz8ryxkh90d3vwx54wjyywgj28ymsb5fdv3396bzf";
|
2012-08-05 11:44:01 +01:00
|
|
|
};
|
2013-05-10 15:31:13 +01:00
|
|
|
|
|
|
|
configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
|
|
|
|
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
|
2012-08-05 11:44:01 +01:00
|
|
|
|
2013-05-10 15:31:13 +01:00
|
|
|
buildInputs = [ libX11 ncurses libXext libXft fontconfig ];
|
|
|
|
|
|
|
|
NIX_LDFLAGS = "-lfontconfig";
|
2012-08-05 11:44:01 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
TERMINFO=$out/share/terminfo make install PREFIX=$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://st.suckless.org/;
|
|
|
|
license = "MIT";
|
2013-05-10 15:31:13 +01:00
|
|
|
maintainers = with maintainers; [viric];
|
|
|
|
platforms = with platforms; linux;
|
2012-08-05 11:44:01 +01:00
|
|
|
};
|
|
|
|
}
|