Maybe use substituteInPlace instead

This commit is contained in:
Benson Chu 2026-04-11 19:37:17 -05:00
parent b6ae11d755
commit c8a6a8c783
2 changed files with 4 additions and 14 deletions

View file

@ -1,11 +0,0 @@
--- a/zfs/replicate/filesystem/list.py
+++ b/zfs/replicate/filesystem/list.py
@@ -42,4 +42,4 @@ def list( # pylint: disable=W0622
def _list(filesystem: FileSystem) -> str:
options = ["-H", "-o name,readonly", "-t filesystem,volume", "-r"]
- return f"/usr/bin/env - zfs list {' '.join(options)} '{filesystem.name}'"
+ return f"/usr/bin/env zfs list {' '.join(options)} '{filesystem.name}'"
def _filesystems(zfs_list_output: bytes) -> List[FileSystem]:

View file

@ -1,7 +1,8 @@
final: prev: {
zfs-replicate = prev.zfs-replicate.overrideAttrs (oldAttrs: {
patches = (oldAttrs.patches or []) ++ [
./zfs-replicate-env-fix.patch
];
postPatch = ''
substituteInPlace zfs/replicate/filesystem/list.py \
--replace "/usr/bin/env - zfs list" "/usr/bin/env zfs list"
'';
});
}