about summary refs log tree commit diff
path: root/pkgs/applications/video/gnome-mplayer/default.nix
blob: 09ed7efaf0c0b36d96d4b5ecbf4f505c7b37eac0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{lib, stdenv, substituteAll, fetchFromGitHub, pkg-config, gettext, glib, gtk3, gmtk, dbus, dbus-glib
, libnotify, libpulseaudio, mplayer, wrapGAppsHook }:

stdenv.mkDerivation rec {
  pname = "gnome-mplayer";
  version = "1.0.9";

  src = fetchFromGitHub {
    owner = "kdekorte";
    repo = "gnome-mplayer";
    rev = "v${version}";
    sha256 = "0qvy9fllvg1mad6y1j79iaqa6khs0q2cb0z62yfg4srbr07fi8xr";
  };

  nativeBuildInputs = [ pkg-config gettext wrapGAppsHook ];
  buildInputs = [ glib gtk3 gmtk dbus dbus-glib libnotify libpulseaudio ];

  patches = [
    (substituteAll {
      src = ./fix-paths.patch;
      mencoder = "${mplayer}/bin/mencoder";
      mplayer = "${mplayer}/bin/mplayer";
    })
  ];

  # Workaround build failure on -fno-common toolchains:
  #   ld: mpris-interface.o:src/playlist.h:32: multiple definition of
  #     `plclose'; gui.o:src/playlist.h:32: first defined here
  env.NIX_CFLAGS_COMPILE = "-fcommon";

  meta = with lib; {
    description = "Gnome MPlayer, a simple GUI for MPlayer";
    mainProgram = "gnome-mplayer";
    homepage = "https://sites.google.com/site/kdekorte2/gnomemplayer";
    license = licenses.gpl2;
    maintainers = with maintainers; [];
    platforms = platforms.linux;
  };
}