Skip to content

Commit

Permalink
hfsutils: init at 3.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
NateEag committed Dec 9, 2024
1 parent 128bd7f commit 60b6973
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions pkgs/by-name/hf/hfsutils/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
lib,
stdenv,
autoconf,
automake,
}:
stdenv.mkDerivation {
pname = "hfsutils";
version = "3.2.6";

src = fetchTarball {
url = "https://ftp.osuosl.org/pub/clfs/conglomeration/hfsutils/hfsutils-3.2.6.tar.gz";
sha256 = "1pv3sw8jhsd1k2bkyy2r3b3mhiijwaa7jyvmaiw50s7dja2wa9qv";
};

preInstall = ''
mkdir -p "$out/bin"
mkdir -p "$out/man/man1"
'';

doInstallCheck = true;
installCheckPhase = ''
# hformat fails if HOME is not set.
export HOME=.
dd if=/dev/zero of=disk.hfs bs=1k count=800
ls -lha .
$out/bin/hformat -l 'Test Disk' disk.hfs
mount_output="$($out/bin/hmount disk.hfs)"
echo "$mount_output" | grep 'Volume name is "Test Disk"'
echo "$mount_output" | grep 'Volume has 803840 bytes free'
$out/bin/humount
rm disk.hfs
'';

meta = {
description = "Utilities for working with HFS filesystems";
longDescription = ''
A set of utilities for interacting with Apple's MacOS-9-era filesystem, HFS.
Useful for extracting data from classic MacOS CD-ROMs and HFS-formatted disk images.
'';
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ nateeag ];
homepage = "https://www.mars.org/home/rob/proj/hfs/";
};
}

0 comments on commit 60b6973

Please sign in to comment.