From 8063e596d11b3f5d1551c130409dae6b2d6cbb50 Mon Sep 17 00:00:00 2001 From: Johannes Frankenau Date: Mon, 16 Jul 2018 15:39:42 +0200 Subject: [PATCH] split2flac: init at 122 --- .../applications/audio/split2flac/default.nix | 62 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 64 insertions(+) create mode 100644 pkgs/applications/audio/split2flac/default.nix diff --git a/pkgs/applications/audio/split2flac/default.nix b/pkgs/applications/audio/split2flac/default.nix new file mode 100644 index 000000000000..372e507ed0e9 --- /dev/null +++ b/pkgs/applications/audio/split2flac/default.nix @@ -0,0 +1,62 @@ +{ stdenv, fetchFromGitHub, makeWrapper +, shntool, cuetools +, flac, faac, mp4v2, wavpack, mac +, imagemagick, libiconv, enca, lame, pythonPackages, vorbis-tools +, aacgain, mp3gain, vorbisgain +}: + +let + wrapSplit2flac = format: '' + makeWrapper $out/bin/.split2flac-wrapped $out/bin/split2${format} \ + --set SPLIT2FLAC_FORMAT ${format} \ + --prefix PATH : ${stdenv.lib.makeBinPath [ + shntool cuetools + flac faac mp4v2 wavpack mac + imagemagick libiconv enca lame pythonPackages.mutagen vorbis-tools + aacgain mp3gain vorbisgain + ]} + ''; + +in stdenv.mkDerivation rec { + name = "split2flac-${version}"; + version = "122"; + + src = fetchFromGitHub { + owner = "ftrvxmtrx"; + repo = "split2flac"; + rev = version; + sha256 = "1a71amamip25hhqx7wwzfcl3d5snry9xsiha0kw73iq2m83r2k63"; + }; + + dontBuild = true; + + nativeBuildInputs = [ makeWrapper ]; + + patchPhase = '' + substituteInPlace split2flac \ + --replace 'FORMAT="''${0##*split2}"' 'FORMAT=''${SPLIT2FLAC_FORMAT:-flac}' + ''; + + installPhase = '' + mkdir -p $out/share/bash-completion/completions + cp split2flac-bash-completion.sh \ + $out/share/bash-completion/completions/split2flac-bash-completion.sh + + mkdir -p $out/bin + cp split2flac $out/bin/.split2flac-wrapped + + ${wrapSplit2flac "flac"} + ${wrapSplit2flac "mp3"} + ${wrapSplit2flac "ogg"} + ${wrapSplit2flac "m4a"} + ${wrapSplit2flac "wav"} + ''; + + meta = with stdenv.lib; { + description = "Split flac/ape/wv/wav + cue sheet into separate tracks"; + homepage = https://github.com/ftrvxmtrx/split2flac; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ jfrankenau ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6ed76a3a7139..0771c7998b0e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18201,6 +18201,8 @@ with pkgs; spideroak = callPackage ../applications/networking/spideroak { }; + split2flac = callPackage ../applications/audio/split2flac { }; + squishyball = callPackage ../applications/audio/squishyball { ncurses = ncurses5; };