Add custom aaxtomp3 pkg

This commit is contained in:
Tristan D. 2025-03-31 12:37:40 +02:00
parent 683bae0b99
commit e566cf24c8
Signed by: tristan
SSH key fingerprint: SHA256:9oFM1J63hYWJjCnLG6C0fxBS15rwNcWwdQNMOHYKJ/4
2 changed files with 82 additions and 0 deletions

View file

@ -404,6 +404,7 @@ in
rage rage
nh nh
pkgs.agenix-rekey pkgs.agenix-rekey
my.aaxtomp3
# android-studio-full # android-studio-full
]; ];
}; };

81
pkgs/aaxtomp3.nix Normal file
View file

@ -0,0 +1,81 @@
{
bash,
bc,
coreutils,
fetchFromGitHub,
ffmpeg,
findutils,
gawk,
gnugrep,
gnused,
jq,
lame,
lib,
mediainfo,
mp4v2,
ncurses,
resholve,
}:
resholve.mkDerivation rec {
pname = "aaxtomp3";
version = "1.3";
src = fetchFromGitHub {
owner = "damajor";
repo = "aaxtomp3";
rev = "patch-1";
hash = "sha256-e+A4PLr3/WF/KeEeS6mwpc0ybvTyXTpxoOn6Bj6ZmMg=";
};
postPatch = ''
substituteInPlace AAXtoMP3 \
--replace 'AAXtoMP3' 'aaxtomp3'
substituteInPlace interactiveAAXtoMP3 \
--replace 'AAXtoMP3' 'aaxtomp3' \
--replace 'call="./aaxtomp3"' 'call="$AAXTOMP3"'
'';
installPhase = ''
install -Dm 755 AAXtoMP3 $out/bin/aaxtomp3
install -Dm 755 interactiveAAXtoMP3 $out/bin/interactiveaaxtomp3
'';
solutions.default = {
scripts = [
"bin/aaxtomp3"
"bin/interactiveaaxtomp3"
];
interpreter = "${bash}/bin/bash";
inputs = [
bc
coreutils
ffmpeg
findutils
gawk
gnugrep
gnused
jq
lame
mediainfo
mp4v2
ncurses
];
keep."$call" = true;
fix = {
"$AAXTOMP3" = [ "${placeholder "out"}/bin/aaxtomp3" ];
"$FIND" = [ "find" ];
"$GREP" = [ "grep" ];
"$SED" = [ "sed" ];
"$FFPROBE" = [ "ffprobe" ];
"$FFMPEG" = [ "ffmpeg" ];
};
};
meta = with lib; {
description = "Convert Audible's .aax filetype to MP3, FLAC, M4A, or OPUS";
homepage = "https://krumpetpirate.github.io/AAXtoMP3";
license = licenses.wtfpl;
maintainers = with maintainers; [ urandom ];
};
}