Update st
This commit is contained in:
parent
afba2d5c2a
commit
d7fbf5afec
3 changed files with 62 additions and 10 deletions
|
@ -22,6 +22,11 @@
|
|||
|
||||
};
|
||||
|
||||
fonts.extraFonts = with pkgs; [
|
||||
libertine
|
||||
inconsolata
|
||||
];
|
||||
|
||||
environment = {
|
||||
variables.EDITOR = pkgs.lib.mkOverride 10 "vim"; # vim is my default editor
|
||||
shells = [ pkgs.zsh ];
|
||||
|
@ -81,6 +86,7 @@
|
|||
163.172.25.159 protonpack
|
||||
195.154.102.65 kromuniste
|
||||
192.168.158.23 pimusicbox
|
||||
2001:bc8:26b7:f001::1002 felin
|
||||
'';
|
||||
networkmanager.enable = false;
|
||||
|
||||
|
@ -315,16 +321,7 @@
|
|||
|
||||
## Special config
|
||||
nixpkgs.overlays = [ (self: super: {
|
||||
st = super.st.override {
|
||||
patches = builtins.map super.fetchurl [
|
||||
{ url = "http://st.suckless.org/patches/st-no_bold_colors-20160727-308bfbf.diff";
|
||||
sha256 = "2e8cdbeaaa79ed067ffcfdcf4c5f09fb5c8c984906cde97226d4dd219dda39dc";
|
||||
}
|
||||
{ url = "http://st.suckless.org/patches/st-solarized-both-20160727-308bfbf.diff";
|
||||
sha256 = "b7b25ba01b7ae87ec201ebbb1bf82742d5979788ecc6773a356eebe7d90a9703";
|
||||
}
|
||||
];
|
||||
};
|
||||
st = super.callPackage ./pkgs/st.nix {};
|
||||
cups-filters = super.callPackage /home/eeva/pkgs/cups-filters {};
|
||||
})
|
||||
];
|
||||
|
|
15
pkgs/st-fix-deletekey.patch
Normal file
15
pkgs/st-fix-deletekey.patch
Normal file
|
@ -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},
|
40
pkgs/st.nix
Normal file
40
pkgs/st.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ 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;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue