dmg2img: 1.6.7 -> 1.6.7-unstable-2020-12-27

+36 -19
+36 -19
pkgs/by-name/dm/dmg2img/package.nix
··· 1 - { lib, stdenv, fetchurl, zlib, bzip2, openssl, fetchpatch }: 1 + { 2 + bzip2, 3 + fetchFromGitHub, 4 + lib, 5 + openssl, 6 + stdenv, 7 + unstableGitUpdater, 8 + zlib, 9 + }: 2 10 3 - stdenv.mkDerivation rec { 11 + stdenv.mkDerivation (finalAttrs: { 4 12 pname = "dmg2img"; 5 - version = "1.6.7"; 13 + version = "1.6.7-unstable-2020-12-27"; 6 14 7 - src = fetchurl { 8 - url = "http://vu1tur.eu.org/tools/dmg2img-${version}.tar.gz"; 9 - sha256 = "066hqhg7k90xcw5aq86pgr4l7apzvnb4559vj5s010avbk8adbh2"; 15 + src = fetchFromGitHub { 16 + owner = "Lekensteyn"; 17 + repo = "dmg2img"; 18 + rev = "a3e413489ccdd05431401357bf21690536425012"; 19 + hash = "sha256-DewU5jz2lRjIRiT0ebjPRArsoye33xlEGfhzd4xnT4A="; 10 20 }; 11 21 12 - buildInputs = [ zlib bzip2 openssl ]; 13 - 14 - patches = [ 15 - (fetchpatch { 16 - url = "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/dmg2img/openssl-1.1.diff"; 17 - sha256 = "076sz69hf3ryylplg025vl8sj991cb81g3yazsmrf8anrd7ffmxx"; 18 - }) 22 + buildInputs = [ 23 + bzip2 24 + openssl 25 + zlib 19 26 ]; 20 27 21 - patchFlags = [ "-p0" ]; 28 + preBuild = '' 29 + sed -i "s/1.6.5/${finalAttrs.version}/" dmg2img.c 30 + ''; 22 31 23 32 installPhase = '' 24 - install -D dmg2img $out/bin/dmg2img 25 - install -D vfdecrypt $out/bin/vfdecrypt 33 + runHook preInstall 34 + 35 + install -Dm755 dmg2img vfdecrypt -t $out/bin 36 + 37 + runHook postInstall 26 38 ''; 39 + 40 + passthru.updateScript = unstableGitUpdater { }; 27 41 28 42 meta = { 43 + description = "Tool which allows converting Apple compressed dmg archives to standard (hfsplus) image disk files"; 44 + homepage = "https://github.com/Lekensteyn/dmg2img"; 45 + license = lib.licenses.gpl2Only; 29 46 platforms = lib.platforms.unix; 30 - description = "Apple's compressed dmg to standard (hfsplus) image disk file convert tool"; 31 - license = lib.licenses.gpl3; 47 + maintainers = with lib.maintainers; [ KSJ2000 ]; 48 + mainProgram = "dmg2img"; 32 49 }; 33 - } 50 + })