diff --git a/pkgs/development/libraries/gmtk/default.nix b/pkgs/development/libraries/gmtk/default.nix new file mode 100644 index 000000000000..0fac97aaa439 --- /dev/null +++ b/pkgs/development/libraries/gmtk/default.nix @@ -0,0 +1,32 @@ +{stdenv, substituteAll, fetchFromGitHub, libtool, pkgconfig, intltool, glib, gtk3 +, libpulseaudio, mplayer, gnome_mplayer }: + +stdenv.mkDerivation rec { + name = "gmtk-${version}"; + version = "1.0.9"; + + src = fetchFromGitHub { + owner = "kdekorte"; + repo = "gmtk"; + rev = "v${version}"; + sha256 = "1zb5m1y1gckal3140gvx31572a6xpccwfmdwa1w5lx2wdq1pwk1i"; + }; + + nativeBuildInputs = [ libtool pkgconfig intltool ]; + buildInputs = [ glib gtk3 libpulseaudio ]; + + patches = [ + (substituteAll { + src = ./fix-paths.patch; + mplayer = "${mplayer}/bin/mplayer"; + }) + ]; + + meta = with stdenv.lib; { + description = "Common functions for gnome-mplayer and gecko-mediaplayer"; + homepage = https://sites.google.com/site/kdekorte2/gnomemplayer; + license = licenses.gpl2; + maintainers = gnome_mplayer.meta.maintainers; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/libraries/gmtk/fix-paths.patch b/pkgs/development/libraries/gmtk/fix-paths.patch new file mode 100644 index 000000000000..64738300aba4 --- /dev/null +++ b/pkgs/development/libraries/gmtk/fix-paths.patch @@ -0,0 +1,20 @@ +--- a/src/gmtk_media_player.c ++++ b/src/gmtk_media_player.c +@@ -2449,7 +2449,7 @@ + player->minimum_mplayer = detect_mplayer_features(player); + + if (player->mplayer_binary == NULL || !g_file_test(player->mplayer_binary, G_FILE_TEST_EXISTS)) { +- argv[argn++] = g_strdup_printf("mplayer"); ++ argv[argn++] = g_strdup_printf("@mplayer@"); + } else { + argv[argn++] = g_strdup_printf("%s", player->mplayer_binary); + } +@@ -4135,7 +4135,7 @@ + return ret; + + if (player->mplayer_binary == NULL || !g_file_test(player->mplayer_binary, G_FILE_TEST_EXISTS)) { +- av[ac++] = g_strdup_printf("mplayer"); ++ av[ac++] = g_strdup_printf("@mplayer@"); + } else { + av[ac++] = g_strdup_printf("%s", player->mplayer_binary); + } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cdfa41ac6985..6ec532be1dd7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15237,6 +15237,8 @@ with pkgs; inherit (darwin) IOKit; }; + gmtk = callPackage ../development/libraries/gmtk { }; + gmu = callPackage ../applications/audio/gmu { }; gnome_mplayer = callPackage ../applications/video/gnome-mplayer {