git.iko.soy/typeable/nixpkgs
on master help sign in
mpg123: add conplay script
d0ca800Justin Lovinger
pkgs/applications/audio/mpg123/default.nix+24−2
@@ -1,5 +1,9 @@
1{ stdenv
1{ stdenv
2−, fetchurl, alsaLib
2+, fetchurl
3+, makeWrapper
4+
5+, alsaLib
6+, perl
3}:
7}:
4
8
5stdenv.mkDerivation rec {
9stdenv.mkDerivation rec {
@@ -10,12 +14,30 @@ stdenv.mkDerivation rec {
10 sha256 = "02l915jq0ymndb082g6w89bpf66z04ifa1lr7ga3yycw6m46hc4h";
14 sha256 = "02l915jq0ymndb082g6w89bpf66z04ifa1lr7ga3yycw6m46hc4h";
11 };
15 };
12
16
17+ outputs = [ "out" "conplay" ];
18+
19+ nativeBuildInputs = [ makeWrapper ];
20+
13− buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
21+ buildInputs = [ perl ] ++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
14
22
15 configureFlags = stdenv.lib.optional
23 configureFlags = stdenv.lib.optional
16 (stdenv.hostPlatform ? mpg123)
24 (stdenv.hostPlatform ? mpg123)
17 "--with-cpu=${stdenv.hostPlatform.mpg123.cpu}";
25 "--with-cpu=${stdenv.hostPlatform.mpg123.cpu}";
18
26
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+
19 meta = {
41 meta = {
20 description = "Fast console MPEG Audio Player and decoder library";
42 description = "Fast console MPEG Audio Player and decoder library";
21 homepage = http://mpg123.org;
43 homepage = http://mpg123.org;