git.iko.soy/typeable/nixpkgs
on master help sign in
mpg123: add conplay script

Available in the 'conplay' output. 'conplay' can seamlessly play audio books using mpg123.

commitd0ca800da0b7e524a8cb0234c2d50f4bccde4006 authorJustin Lovinger <git@justinlovinger.com> dateWed 1 Apr 2020, 23:31 (7 years ago) parent820cc39
1 file changed+24−2
pkgs/applications/audio/mpg123/default.nix+24−2
pkgs/applications/audio/mpg123/default.nix+24−2
@@ -1,5 +1,9 @@
11{ stdenv
2−, fetchurl, alsaLib
2+, fetchurl
3+, makeWrapper
4+
5+, alsaLib
6+, perl
37}:
48
59stdenv.mkDerivation rec {
@@ -10,12 +14,30 @@ stdenv.mkDerivation rec {
1014 sha256 = "02l915jq0ymndb082g6w89bpf66z04ifa1lr7ga3yycw6m46hc4h";
1115 };
1216
13− buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
17+ outputs = [ "out" "conplay" ];
18+
19+ nativeBuildInputs = [ makeWrapper ];
20+
21+ buildInputs = [ perl ] ++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
1422
1523 configureFlags = stdenv.lib.optional
1624 (stdenv.hostPlatform ? mpg123)
1725 "--with-cpu=${stdenv.hostPlatform.mpg123.cpu}";
1826
27+ postInstall = ''
28+ mkdir -p $conplay/bin
29+ mv scripts/conplay $conplay/bin/
30+ '';
31+
32+ preFixup = ''
33+ patchShebangs $conplay/bin/conplay
34+ '';
35+
36+ postFixup = ''
37+ wrapProgram $conplay/bin/conplay \
38+ --prefix PATH : $out/bin
39+ '';
40+
1941 meta = {
2042 description = "Fast console MPEG Audio Player and decoder library";
2143 homepage = http://mpg123.org;