ecmtools: refactor

This commit is contained in:
Anderson Torres 2023-09-11 19:16:01 -03:00
parent 37a01b3e4f
commit 94e53969fc

View File

@ -1,29 +1,39 @@
{ lib, stdenv, fetchFromGitHub }:
{ lib
, stdenv
, fetchFromGitHub
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "ecm-tools";
version = "1.0.3";
src = fetchFromGitHub {
owner = "alucryd";
repo = "ecm-tools";
rev = "v${version}";
sha256 = "1rvyx5gcy8lfklgj80szlz3312x45wzx0d9jsgwyvy8f6m4nnb0c";
rev = "v${finalAttrs.version}";
hash = "sha256-DCxrSTUO+e350zI10D8vpIswxqdfAyQfnY4iz17pfuc=";
};
dontConfigure = true;
installPhase = ''
runHook preInstall
install --directory --mode=755 $out/bin
install --mode=755 bin2ecm $out/bin
(cd $out/bin; ln -s bin2ecm ecm2bin)
pushd $out/bin
ln -s bin2ecm ecm2bin
popd
runHook postInstall
'';
meta = with lib; {
meta = {
description = "A utility to uncompress ECM files to BIN CD format";
homepage = "https://github.com/alucryd/ecm-tools";
license = licenses.gpl3;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.all;
license = lib.licenses.gpl3Plus;
mainProgram = "bin2ecm";
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.all;
};
}
})