Add custom zcat wrapper which adds an ETA progress
Useful when importing large database dumps.
This commit is contained in:
parent
c5c9648033
commit
467ce2fdde
|
@ -9,6 +9,7 @@
|
||||||
(callPackage ./nextcloud-sync/from-local.nix { })
|
(callPackage ./nextcloud-sync/from-local.nix { })
|
||||||
(callPackage ./nextcloud-sync/from-remote.nix { })
|
(callPackage ./nextcloud-sync/from-remote.nix { })
|
||||||
(callPackage ./typo3-documentation-rendering { })
|
(callPackage ./typo3-documentation-rendering { })
|
||||||
|
(callPackage ./zcat-progress { })
|
||||||
(callPackage ./project {
|
(callPackage ./project {
|
||||||
inherit ownLib;
|
inherit ownLib;
|
||||||
})
|
})
|
||||||
|
|
18
home/packages/custom/zcat-progress/default.nix
Normal file
18
home/packages/custom/zcat-progress/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
writeShellApplication
|
||||||
|
, pv
|
||||||
|
, gzip
|
||||||
|
}:
|
||||||
|
|
||||||
|
writeShellApplication {
|
||||||
|
name = "custom-zcat-with-progress";
|
||||||
|
|
||||||
|
runtimeInputs = [
|
||||||
|
pv
|
||||||
|
gzip
|
||||||
|
];
|
||||||
|
|
||||||
|
text = ''
|
||||||
|
zcat "$1" | pv -s "$(gzip -dc "$1" | wc -c)"
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue