nixpkgs/pkgs/applications/misc/st/default.nix

34 lines
875 B
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, writeText, libX11, ncurses, libXext, libXft, fontconfig
, conf ? null, patches ? []}:
with stdenv.lib;
2012-08-05 10:44:01 +00:00
stdenv.mkDerivation rec {
2015-07-08 08:26:55 +00:00
name = "st-0.6";
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";
2015-07-08 08:26:55 +00:00
sha256 = "0avsfc1qp8zvshsfjwwrkvk411jlqy58z225bsdhjkl1qc40qcc5";
2012-08-05 10:44:01 +00:00
};
inherit patches;
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
buildInputs = [ pkgconfig libX11 ncurses libXext libXft fontconfig ];
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/;
license = stdenv.lib.licenses.mit;
maintainers = with maintainers; [viric];
platforms = platforms.linux;
2012-08-05 10:44:01 +00:00
};
}