Minor refactor
This commit is contained in:
parent
21cb4ce324
commit
9555848f19
3 changed files with 31 additions and 25 deletions
|
@ -3,6 +3,7 @@
|
|||
let
|
||||
# Module
|
||||
host = config.host;
|
||||
|
||||
# Resources
|
||||
palette = import ./resources/palette.nix;
|
||||
words = builtins.toFile "words" (
|
||||
|
@ -464,11 +465,11 @@ in
|
|||
rdw() { diff --ignore-all-space --recursive --unified "$@" | delta }
|
||||
'';
|
||||
shellAliases =
|
||||
(builtins.listToAttrs (map (c: lib.nameValuePair c "noglob ${c}") [
|
||||
(lib.genAttrs [
|
||||
"git"
|
||||
"http"
|
||||
"youtube-dl"
|
||||
])) // {
|
||||
] (c: "noglob ${c}")) // {
|
||||
cat = "bat --plain";
|
||||
cp = "cp --reflink=auto";
|
||||
code = "codium";
|
||||
|
|
|
@ -16,6 +16,26 @@
|
|||
, xdpyinfo
|
||||
}:
|
||||
|
||||
let
|
||||
diffImagePath = lib.makeBinPath [
|
||||
bash
|
||||
bc
|
||||
coreutils
|
||||
diffutils
|
||||
exiftool
|
||||
gnugrep
|
||||
gnused
|
||||
imagemagick
|
||||
xdg-utils
|
||||
xdpyinfo
|
||||
];
|
||||
gitDiffImagePath = lib.makeBinPath [
|
||||
bash
|
||||
coreutils
|
||||
diffutils
|
||||
imagemagick
|
||||
];
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "git-diff-image";
|
||||
version = "unstable-2020-12-15";
|
||||
|
@ -30,27 +50,11 @@ stdenv.mkDerivation {
|
|||
buildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
install -D -m755 $src/diff-image $out/bin/diff-image
|
||||
wrapProgram $out/bin/diff-image --prefix PATH : ${lib.makeBinPath [
|
||||
bash
|
||||
bc
|
||||
coreutils
|
||||
diffutils
|
||||
exiftool
|
||||
gnugrep
|
||||
gnused
|
||||
imagemagick
|
||||
xdg-utils
|
||||
xdpyinfo
|
||||
]}
|
||||
|
||||
install -D -m755 $src/git_diff_image $out/bin/git_diff_image
|
||||
wrapProgram $out/bin/git_diff_image --prefix PATH : ${lib.makeBinPath [
|
||||
bash
|
||||
coreutils
|
||||
diffutils
|
||||
imagemagick
|
||||
]}
|
||||
install -D -m755 -t $out/bin \
|
||||
$src/diff-image \
|
||||
$src/git_diff_image
|
||||
wrapProgram $out/bin/diff-image --prefix PATH : ${diffImagePath}
|
||||
wrapProgram $out/bin/git_diff_image --prefix PATH : ${gitDiffImagePath}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -14,8 +14,9 @@ stdenv.mkDerivation {
|
|||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
install -D zsh-abbr.zsh $out/share/zsh/plugins/zsh-abbr/zsh-abbr.zsh
|
||||
install zsh-abbr.plugin.zsh $out/share/zsh/plugins/zsh-abbr/zsh-abbr.plugin.zsh
|
||||
install -D -t $out/share/zsh/plugins/zsh-abbr \
|
||||
zsh-abbr.zsh \
|
||||
zsh-abbr.plugin.zsh
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
|
Loading…
Reference in a new issue