ecmtools: refactor

+20 -10
+20 -10
pkgs/by-name/ec/ecmtools/package.nix
··· 1 - { lib, stdenv, fetchFromGitHub }: 2 3 - stdenv.mkDerivation rec { 4 pname = "ecm-tools"; 5 version = "1.0.3"; 6 7 src = fetchFromGitHub { 8 owner = "alucryd"; 9 repo = "ecm-tools"; 10 - rev = "v${version}"; 11 - sha256 = "1rvyx5gcy8lfklgj80szlz3312x45wzx0d9jsgwyvy8f6m4nnb0c"; 12 }; 13 14 dontConfigure = true; 15 16 installPhase = '' 17 install --directory --mode=755 $out/bin 18 install --mode=755 bin2ecm $out/bin 19 - (cd $out/bin; ln -s bin2ecm ecm2bin) 20 ''; 21 22 - meta = with lib; { 23 description = "A utility to uncompress ECM files to BIN CD format"; 24 homepage = "https://github.com/alucryd/ecm-tools"; 25 - license = licenses.gpl3; 26 - maintainers = with maintainers; [ AndersonTorres ]; 27 - platforms = platforms.all; 28 }; 29 - }
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + }: 5 6 + stdenv.mkDerivation (finalAttrs: { 7 pname = "ecm-tools"; 8 version = "1.0.3"; 9 10 src = fetchFromGitHub { 11 owner = "alucryd"; 12 repo = "ecm-tools"; 13 + rev = "v${finalAttrs.version}"; 14 + hash = "sha256-DCxrSTUO+e350zI10D8vpIswxqdfAyQfnY4iz17pfuc="; 15 }; 16 17 dontConfigure = true; 18 19 installPhase = '' 20 + runHook preInstall 21 + 22 install --directory --mode=755 $out/bin 23 install --mode=755 bin2ecm $out/bin 24 + pushd $out/bin 25 + ln -s bin2ecm ecm2bin 26 + popd 27 + 28 + runHook postInstall 29 ''; 30 31 + meta = { 32 description = "A utility to uncompress ECM files to BIN CD format"; 33 homepage = "https://github.com/alucryd/ecm-tools"; 34 + license = lib.licenses.gpl3Plus; 35 + mainProgram = "bin2ecm"; 36 + maintainers = with lib.maintainers; [ AndersonTorres ]; 37 + platforms = lib.platforms.all; 38 }; 39 + })