Add wrapped atool
with every archiver
This commit is contained in:
parent
6a727b61d5
commit
b30056ca44
36
pkgs/atool-wrapped/default.nix
Normal file
36
pkgs/atool-wrapped/default.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{ lib,
|
||||
atool,
|
||||
makeBinaryWrapper,
|
||||
stdenvNoCC,
|
||||
lzip,
|
||||
plzip,
|
||||
lzop,
|
||||
lzma,
|
||||
zip,
|
||||
unzip,
|
||||
arj,
|
||||
rpm,
|
||||
cpio,
|
||||
p7zip,
|
||||
unrar,
|
||||
lha,
|
||||
unfree ? false }:
|
||||
let
|
||||
wrappedPath = lib.makeBinPath ([lzip plzip lzop lzma zip unzip arj rpm cpio p7zip] ++ lib.optionals unfree [unrar lha]);
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "atool-wrapped";
|
||||
phases = [ "installPhase" ];
|
||||
nativeBuildInputs = [ makeBinaryWrapper ];
|
||||
src = ./.;
|
||||
installPhase = ''
|
||||
makeBinaryWrapper "${atool}/bin/atool" "$out/bin/atool" \
|
||||
--inherit-argv0 --prefix PATH : "${wrappedPath}"
|
||||
for i in acat adiff als apack arepack aunpack ; do
|
||||
ln -s $out/bin/atool $out/bin/$i
|
||||
done
|
||||
# i have no idea if this is the "right" way to do this
|
||||
mkdir -p "$out/share"
|
||||
ln -s "${atool}/share/man" "$out/share/man"
|
||||
'';
|
||||
}
|
16
pkgs/cofi/shell.nix
Normal file
16
pkgs/cofi/shell.nix
Normal file
@ -0,0 +1,16 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
let
|
||||
rofi-dmenu-wrapped = pkgs.writeShellScript "rofi-dmenu" ''
|
||||
exec "${pkgs.rofi-wayland}/bin/rofi" -dmenu "$@"
|
||||
'';
|
||||
in
|
||||
pkgs.mkShell {
|
||||
shellHook = ''
|
||||
export COMMA_PICKER="${rofi-dmenu-wrapped}"
|
||||
'';
|
||||
nativeBuildInputs = with pkgs; [
|
||||
rofi-wayland
|
||||
libnotify
|
||||
comma
|
||||
];
|
||||
}
|
@ -6,4 +6,5 @@ in
|
||||
{
|
||||
google-fonts = callPackage ./google-fonts { };
|
||||
wm-helpers = callPackage ./wm-helpers { };
|
||||
atool = callPackage ./atool-wrapped { };
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user