Skip to content

Commit

Permalink
zfs: fix PATH for zpool.d scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
woffs committed Oct 4, 2019
1 parent 3065d00 commit 17f76a9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkgs/os-specific/linux/zfs/default.nix
Expand Up @@ -7,6 +7,7 @@
, libtirpc
, nfs-utils
, gawk, gnugrep, gnused, systemd
, smartmontools, sysstat, sudo

# Kernel dependencies
, kernel ? null
Expand Down Expand Up @@ -131,6 +132,13 @@ let
(cd $out/share/bash-completion/completions; ln -s zfs zpool)
'';

postFixup = ''
path="PATH=${makeBinPath [ coreutils gawk gnused gnugrep utillinux smartmontools sysstat sudo ]}"
for i in $out/libexec/zfs/zpool.d/*; do
sed -i "2i$path" $i
done
'';

outputs = [ "out" ] ++ optionals buildUser [ "lib" "dev" ];

meta = {
Expand Down

0 comments on commit 17f76a9

Please sign in to comment.