-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/"; | ||
}; | ||
} |