nixpkgs/pkgs/by-name/dm/dmg2img/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

34 lines
876 B
Nix

{ lib, stdenv, fetchurl, zlib, bzip2, openssl, fetchpatch }:
stdenv.mkDerivation rec {
pname = "dmg2img";
version = "1.6.7";
src = fetchurl {
url = "http://vu1tur.eu.org/tools/dmg2img-${version}.tar.gz";
sha256 = "066hqhg7k90xcw5aq86pgr4l7apzvnb4559vj5s010avbk8adbh2";
};
buildInputs = [ zlib bzip2 openssl ];
patches = [
(fetchpatch {
url = "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/dmg2img/openssl-1.1.diff";
sha256 = "076sz69hf3ryylplg025vl8sj991cb81g3yazsmrf8anrd7ffmxx";
})
];
patchFlags = [ "-p0" ];
installPhase = ''
install -D dmg2img $out/bin/dmg2img
install -D vfdecrypt $out/bin/vfdecrypt
'';
meta = {
platforms = lib.platforms.unix;
description = "Apple's compressed dmg to standard (hfsplus) image disk file convert tool";
license = lib.licenses.gpl3;
};
}