41 lines
1.3 KiB
Nix
41 lines
1.3 KiB
Nix
|
{ stdenv, fetchgit, fetchurl, pkgconfig, writeText, libX11, ncurses, libXext, libXft
|
||
|
, fontconfig, conf ? null, patches ? [], extraLibs ? []}:
|
||
|
|
||
|
with stdenv.lib;
|
||
|
|
||
|
let patches' = builtins.map fetchurl [
|
||
|
{ url = "http://st.suckless.org/patches/st-no_bold_colors-20170623-b331da5.diff";
|
||
|
sha256 = "71e1211189d9e11da93ee49388379c5f8469fcd3e1f48bb4d791ddaf161f5845";
|
||
|
}
|
||
|
{ url = "http://st.suckless.org/patches/st-solarized-both-20170626-b331da5.diff";
|
||
|
sha256 = "d1f168d225763680c6dc6e9a426b8bb56ff45967ffd0ea79f56b7af42c1141d9";
|
||
|
}
|
||
|
];
|
||
|
in stdenv.mkDerivation rec {
|
||
|
name = "st-0.7";
|
||
|
|
||
|
src = fetchgit {
|
||
|
url = "git://git.suckless.org/st";
|
||
|
rev = "b331da550b290d54592b7ba11242c92f5a303a48";
|
||
|
sha256 = "1vxvabqspqlv9i8d0sy5gsy5asvhmf6ghkiww9zsddh7agbs8m46";
|
||
|
};
|
||
|
|
||
|
patches = patches' ++ [ ./st-fix-deletekey.patch ];
|
||
|
|
||
|
configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
|
||
|
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
|
||
|
|
||
|
buildInputs = [ pkgconfig libX11 ncurses libXext libXft fontconfig ] ++ extraLibs;
|
||
|
|
||
|
installPhase = ''
|
||
|
TERMINFO=$out/share/terminfo make install PREFIX=$out
|
||
|
'';
|
||
|
|
||
|
meta = {
|
||
|
homepage = http://st.suckless.org/;
|
||
|
license = stdenv.lib.licenses.mit;
|
||
|
maintainers = with maintainers; [viric andsild];
|
||
|
platforms = platforms.linux;
|
||
|
};
|
||
|
}
|