diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 4f46636c860b..006a5d36b67e 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -33,6 +33,7 @@ anderspapitto = "Anders Papitto "; andres = "Andres Loeh "; andrewrk = "Andrew Kelley "; + andsild = "Anders Sildnes "; aneeshusa = "Aneesh Agrawal "; antono = "Antono Vasiljev "; ardumont = "Antoine R. Dumont "; diff --git a/pkgs/applications/misc/st/default.nix b/pkgs/applications/misc/st/default.nix index deceba0ea554..704262da5bf5 100644 --- a/pkgs/applications/misc/st/default.nix +++ b/pkgs/applications/misc/st/default.nix @@ -1,33 +1,32 @@ -{ stdenv, fetchurl, pkgconfig, writeText, libX11, ncurses, libXext, libXft, fontconfig -, conf ? null, patches ? []}: +{ stdenv, fetchurl, pkgconfig, writeText, libX11, ncurses, libXext, libXft +, fontconfig, conf ? null, patches ? []}: with stdenv.lib; -stdenv.mkDerivation rec { - name = "st-0.6"; - +let patches' = if isNull patches then [] else patches; +in stdenv.mkDerivation rec { + name = "st-0.7"; + src = fetchurl { url = "http://dl.suckless.org/st/${name}.tar.gz"; - sha256 = "0avsfc1qp8zvshsfjwwrkvk411jlqy58z225bsdhjkl1qc40qcc5"; + sha256 = "f7870d906ccc988926eef2cc98950a99cc78725b685e934c422c03c1234e6000"; }; - inherit patches; + 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 ]; - NIX_LDFLAGS = "-lfontconfig"; + buildInputs = [ pkgconfig libX11 ncurses libXext libXft fontconfig ]; installPhase = '' TERMINFO=$out/share/terminfo make install PREFIX=$out ''; - + meta = { homepage = http://st.suckless.org/; license = stdenv.lib.licenses.mit; - maintainers = with maintainers; [viric]; + maintainers = with maintainers; [viric andsild]; platforms = platforms.linux; }; } diff --git a/pkgs/applications/misc/st/st-fix-deletekey.patch b/pkgs/applications/misc/st/st-fix-deletekey.patch new file mode 100644 index 000000000000..cf0093220539 --- /dev/null +++ b/pkgs/applications/misc/st/st-fix-deletekey.patch @@ -0,0 +1,15 @@ +diff --git a/config.def.h b/config.def.h +index 1896246..b41747f 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -315,8 +315,8 @@ static Key key[] = { + { XK_Delete, ControlMask, "\033[3;5~", +1, 0, 0}, + { XK_Delete, ShiftMask, "\033[2K", -1, 0, 0}, + { XK_Delete, ShiftMask, "\033[3;2~", +1, 0, 0}, +- { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0}, +- { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0, 0}, ++ { XK_Delete, XK_ANY_MOD, "\033[P", +1, 0, 0}, ++ { XK_Delete, XK_ANY_MOD, "\033[3~", -1, 0, 0}, + { XK_BackSpace, XK_NO_MOD, "\177", 0, 0, 0}, + { XK_BackSpace, Mod1Mask, "\033\177", 0, 0, 0}, + { XK_Home, ShiftMask, "\033[2J", 0, -1, 0},