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