tuicam: init at 0.0.2 (#377825)
[NixPkgs.git] / pkgs / by-name / mp / mpc123 / package.nix
bloba08d91e84b3dbd103b243dc793b582bca54c9998
2   lib,
3   stdenv,
4   fetchFromGitLab,
5   gettext,
6   libao,
7   libmpcdec,
8 }:
10 stdenv.mkDerivation (finalAttrs: {
11   pname = "mpc123";
12   version = "0.2.4";
14   src = fetchFromGitLab {
15     domain = "salsa.debian.org";
16     owner = "debian";
17     repo = "mpc123";
18     rev = "upstream/${finalAttrs.version}";
19     hash = "sha256-+/yxb19CJzyjQmT3O21pEmPR5YudmyCxWwo+W3uOB9Q=";
20   };
22   strictDeps = true;
24   nativeBuildInputs = [
25     gettext
26   ];
28   buildInputs = [
29     gettext
30     libao
31     libmpcdec
32   ];
34   makeFlags = [
35     "CC=${stdenv.cc.targetPrefix}cc"
36   ];
38   # Workaround build failure on -fno-common toolchains like upstream
39   # gcc-10. Otherwise build fails as:
40   #   ld: /build/cc566Cj9.o:(.bss+0x0): multiple definition of `mpc123_file_reader'; ao.o:(.bss+0x40): first defined here
41   env.NIX_CFLAGS_COMPILE = "-fcommon";
43   # XXX: Should install locales too (though there's only 1 available).
44   installPhase = ''
45     runHook preInstall
47     mkdir -p "$out/bin"
48     cp -v mpc123 "$out/bin"
50     runHook postInstall
51   '';
53   meta = {
54     description = "Musepack (.mpc) audio player";
55     homepage = "https://github.com/bucciarati/mpc123";
56     license = lib.licenses.gpl2Plus;
57     mainProgram = "mpc123";
58     maintainers = [ ];
59     platforms = lib.platforms.unix;
60   };