mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 14:35:37 +00:00
remove extraLib, replace mkScript with writeShellApplication
This commit is contained in:
parent
1cf5f46adf
commit
53a8cc83ea
@ -121,7 +121,6 @@
|
||||
inputs.nur.overlay
|
||||
inputs.nix2vim.overlay
|
||||
(import ./overlays/neovim-plugins.nix inputs)
|
||||
(import ./overlays/lib.nix)
|
||||
(import ./overlays/calibre-web.nix)
|
||||
(import ./overlays/disko.nix inputs)
|
||||
];
|
||||
|
@ -19,10 +19,10 @@
|
||||
consul
|
||||
noti # Create notifications programmatically
|
||||
ipcalc # Make IP network calculations
|
||||
(pkgs.extraLib.mkScript {
|
||||
(writeShellApplication {
|
||||
name = "ocr";
|
||||
file = ../../modules/common/shell/bash/scripts/ocr.sh;
|
||||
env = [ tesseract ];
|
||||
runtimeInputs = [ tesseract ];
|
||||
text = builtins.readFile ../../modules/common/shell/bash/scripts/ocr.sh;
|
||||
})
|
||||
];
|
||||
|
||||
|
@ -167,10 +167,10 @@ in {
|
||||
altTabCommand = "${rofi}/bin/rofi -show window -modi window";
|
||||
calculatorCommand = "${rofi}/bin/rofi -modes calc -show calc";
|
||||
audioSwitchCommand = "${
|
||||
(pkgs.extraLib.mkScript {
|
||||
(pkgs.writeShellApplication {
|
||||
name = "switch-audio";
|
||||
file = ./rofi/pulse-sink.sh;
|
||||
env = [ pkgs.ponymix rofi ];
|
||||
runtimeInputs = [ pkgs.ponymix rofi ];
|
||||
text = builtins.readFile ./rofi/pulse-sink.sh;
|
||||
})
|
||||
}/bin/switch-audio";
|
||||
};
|
||||
|
@ -1,16 +0,0 @@
|
||||
_final: prev: {
|
||||
extraLib = prev.lib // {
|
||||
|
||||
# Quickly package shell scripts with their dependencies
|
||||
# From https://discourse.nixos.org/t/how-to-create-a-script-with-dependencies/7970/6
|
||||
mkScript = { name, file, env ? [ ] }:
|
||||
prev.pkgs.writeScriptBin name ''
|
||||
for i in ${prev.lib.concatStringsSep " " env}; do
|
||||
export PATH="$i/bin:$PATH"
|
||||
done
|
||||
|
||||
exec ${prev.pkgs.bash}/bin/bash ${file} $@
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user