2024-10-03 11:56:50 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
libbsd,
|
|
|
|
libuuid,
|
|
|
|
openssl,
|
|
|
|
}:
|
treewide: noop: refer to `src.name` or similar where appropriate, part 3: more use cases
This continues where d8f7f6a5cee067b81bfaaa3aa079adb94ed7c01e left off. Similarly
to that commit, this commit this also points `sourceRoot`s to `src.name` and similar
instead of keeping hardcoded names, and edits other derivation attrs do do the same,
where appropriate.
Also, similarly to d8f7f6a5cee067b81bfaaa3aa079adb94ed7c01e some of expressions this
edits use `srcs` attribute with customly-named sources, so they have to be moved
into `let` blocks to keep evaluation efficient (the other, worse, way to do this
would to recurcively refer to `elemAt n finalAttrs.srcs` or, similarly, with `rec`).
2023-08-08 17:18:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-12-01 12:46:39 +00:00
|
|
|
pname = "hfsprogs";
|
2024-10-03 11:56:50 +00:00
|
|
|
version = "627.40.1-linux";
|
2020-08-16 12:29:23 +00:00
|
|
|
|
2024-10-03 11:56:50 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "glaubitz";
|
|
|
|
repo = "hfs";
|
|
|
|
rev = "a9496556b0a5fa805139ea20b44081d48aae912a";
|
|
|
|
hash = "sha256-i6fXPWHU03ErUN2irP2cLJbpqi1OrTtcQE+ohAz+Eio=";
|
|
|
|
};
|
2018-05-02 01:15:51 +00:00
|
|
|
|
2024-10-03 11:56:50 +00:00
|
|
|
buildInputs = [
|
|
|
|
libbsd
|
|
|
|
libuuid
|
|
|
|
openssl
|
|
|
|
];
|
2018-05-02 01:15:51 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
# Copy executables
|
2024-10-03 11:56:50 +00:00
|
|
|
install -Dm 555 "newfs_hfs/newfs_hfs" "$out/bin/mkfs.hfsplus"
|
|
|
|
install -Dm 555 "fsck_hfs/fsck_hfs" "$out/bin/fsck.hfsplus"
|
2018-05-02 01:15:51 +00:00
|
|
|
# Copy man pages
|
2024-10-03 11:56:50 +00:00
|
|
|
install -Dm 444 "newfs_hfs/newfs_hfs.8" "$out/share/man/man8/mkfs.hfsplus.8"
|
|
|
|
install -Dm 444 "fsck_hfs/fsck_hfs.8" "$out/share/man/man8/fsck.hfsplus.8"
|
2018-05-02 01:15:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "HFS/HFS+ user space utils";
|
2024-04-05 20:18:41 +00:00
|
|
|
license = lib.licenses.apple-psl20;
|
2021-01-15 09:19:50 +00:00
|
|
|
platforms = lib.platforms.linux;
|
2018-05-02 01:15:51 +00:00
|
|
|
};
|
|
|
|
}
|