ecmtools: refactor

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