mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
79 lines
1.5 KiB
Nix
79 lines
1.5 KiB
Nix
{ 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 = "krumpetpirate";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-7a9ZVvobWH/gPxa3cFiPL+vlu8h1Dxtcq0trm3HzlQg=";
|
|
};
|
|
|
|
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" ];
|
|
};
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|