hfsutils: modernize

Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
This commit is contained in:
Ethan Carter Edwards 2026-02-11 09:27:51 -05:00
parent b34e3219f5
commit aa5281f89b
No known key found for this signature in database
GPG key ID: D83DC5377393C7E6

View file

@ -5,9 +5,10 @@
fetchDebianPatch,
testers,
autoreconfHook,
bash,
bashNonInteractive,
tcl,
tk,
writableTmpDirAsHomeHook,
}:
stdenv.mkDerivation (finalAttrs: {
@ -75,14 +76,14 @@ stdenv.mkDerivation (finalAttrs: {
];
buildInputs = [
bash # allow /bin/sh shebang in hfs to get patched during fixupPhase
bashNonInteractive # allow /bin/sh shebang in hfs to get patched during fixupPhase
tcl
tk
];
configureFlags = [
(lib.strings.withFeatureAs true "tcl" "${tcl}")
(lib.strings.withFeatureAs true "tk" "${tk}")
(lib.strings.withFeatureAs true "tcl" tcl)
(lib.strings.withFeatureAs true "tk" tk)
];
# Tcl code doesn't pass const strings to API
@ -97,6 +98,10 @@ stdenv.mkDerivation (finalAttrs: {
doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
nativeInstallCheckInputs = [
writableTmpDirAsHomeHook # current volume is tracked in $HOME/.hcwd
];
installCheckPhase =
let
diskLabel = "Test Disk";
@ -104,9 +109,6 @@ stdenv.mkDerivation (finalAttrs: {
''
runHook preInstallCheck
# current volume is tracked in $HOME/.hcwd
export HOME=$(mktemp -d)
# Allow pipeline to fail here
set +o pipefail
yes | head -c 819200 > disk.hfs