Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 92 lines 2.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 libcdio-paranoia, 6 cddiscid, 7 wget, 8 which, 9 vorbis-tools, 10 id3v2, 11 python3Packages, 12 lame, 13 flac, 14 glyr, 15 perlPackages, 16 makeWrapper, 17}: 18stdenv.mkDerivation (finalAttrs: { 19 pname = "abcde"; 20 version = "2.9.3"; 21 22 src = fetchurl { 23 url = "https://abcde.einval.com/download/abcde-${finalAttrs.version}.tar.gz"; 24 hash = "sha256-BGzQu6eN1LvcvPgv5iWGXGDfNaAFSC3hOmaZxaO4MSQ="; 25 }; 26 27 # FIXME: This package does not support `distmp3', `eject', etc. 28 29 configurePhase = '' 30 runHook preConfigure 31 32 sed -i "s|^[[:blank:]]*prefix *=.*$|prefix = $out|g ; 33 s|^[[:blank:]]*etcdir *=.*$|etcdir = $out/etc|g ; 34 s|^[[:blank:]]*INSTALL *=.*$|INSTALL = install -c|g" \ 35 "Makefile"; 36 37 echo 'CDPARANOIA=${lib.getExe libcdio-paranoia}' >>abcde.conf 38 echo CDROMREADERSYNTAX=cdparanoia >>abcde.conf 39 40 substituteInPlace "abcde" \ 41 --replace "/etc/abcde.conf" "$out/etc/abcde.conf" 42 43 runHook postConfigure 44 ''; 45 46 nativeBuildInputs = [ makeWrapper ]; 47 48 buildInputs = with perlPackages; [ 49 perl 50 MusicBrainz 51 MusicBrainzDiscID 52 IOSocketSSL 53 ]; 54 55 installFlags = [ "sysconfdir=$(out)/etc" ]; 56 57 postFixup = '' 58 for cmd in abcde cddb-tool abcde-musicbrainz-tool; do 59 wrapProgram "$out/bin/$cmd" \ 60 --prefix PERL5LIB : "$PERL5LIB" \ 61 --prefix PATH ":" ${ 62 lib.makeBinPath [ 63 "$out" 64 which 65 libcdio-paranoia 66 cddiscid 67 wget 68 vorbis-tools 69 id3v2 70 python3Packages.eyed3 71 lame 72 flac 73 glyr 74 ] 75 } 76 done 77 ''; 78 79 meta = { 80 homepage = "http://abcde.einval.com/wiki/"; 81 license = lib.licenses.gpl2Plus; 82 maintainers = [ ]; 83 description = "Command-line audio CD ripper"; 84 longDescription = '' 85 abcde is a front-end command-line utility (actually, a shell 86 script) that grabs tracks off a CD, encodes them to 87 Ogg/Vorbis, MP3, FLAC, Ogg/Speex and/or MPP/MP+ (Musepack) 88 format, and tags them, all in one go. 89 ''; 90 platforms = lib.platforms.linux; 91 }; 92})