diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/gstreamer/core | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gstreamer/core')
3 files changed, 84 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/core/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/core/default.nix new file mode 100644 index 000000000000..2c1faac387e6 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gstreamer/core/default.nix @@ -0,0 +1,60 @@ +{ stdenv, fetchurl, fetchpatch, meson, ninja +, pkgconfig, gettext, gobject-introspection +, bison, flex, python3, glib, makeWrapper +, libcap,libunwind, darwin +, lib +}: + +stdenv.mkDerivation rec { + name = "gstreamer-${version}"; + version = "1.14.4"; + + meta = with lib ;{ + description = "Open source multimedia framework"; + homepage = https://gstreamer.freedesktop.org; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ ttuegel matthewbauer ]; + }; + + src = fetchurl { + url = "${meta.homepage}/src/gstreamer/${name}.tar.xz"; + sha256 = "1izzhnlsy83rgr4zl3jcl1sryxqbbigrrqw3j4x3nnphqnb6ckzr"; + }; + + patches = [ + (fetchpatch { + url = "https://bug794856.bugzilla-attachments.gnome.org/attachment.cgi?id=370411"; + sha256 = "16plzzmkk906k4892zq68j3c9z8vdma5nxzlviq20jfv04ykhmk2"; + }) + ./fix_pkgconfig_includedir.patch + ]; + + outputs = [ "out" "dev" ]; + outputBin = "dev"; + + nativeBuildInputs = [ + meson ninja pkgconfig gettext bison flex python3 makeWrapper gobject-introspection + ]; + buildInputs = + lib.optionals stdenv.isLinux [ libcap libunwind ] + ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreServices; + + propagatedBuildInputs = [ glib ]; + + postInstall = '' + for prog in "$dev/bin/"*; do + wrapProgram "$prog" --suffix GST_PLUGIN_SYSTEM_PATH : "\$(unset _tmp; for profile in \$NIX_PROFILES; do _tmp="\$profile/lib/gstreamer-1.0''$\{_tmp:+:\}\$_tmp"; done; printf "\$_tmp")" + done + ''; + + preConfigure= '' + patchShebangs . + ''; + + preFixup = '' + moveToOutput "share/bash-completion" "$dev" + ''; + + setupHook = ./setup-hook.sh; +} diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/core/fix_pkgconfig_includedir.patch b/nixpkgs/pkgs/development/libraries/gstreamer/core/fix_pkgconfig_includedir.patch new file mode 100644 index 000000000000..c388a82fa2a8 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gstreamer/core/fix_pkgconfig_includedir.patch @@ -0,0 +1,15 @@ +diff --git a/pkgconfig/meson.build b/pkgconfig/meson.build +index edb0586c2..7ed46dfce 100644 +--- a/pkgconfig/meson.build ++++ b/pkgconfig/meson.build +@@ -2,8 +2,8 @@ pkgconf = configuration_data() + + pkgconf.set('prefix', join_paths(get_option('prefix'))) + pkgconf.set('exec_prefix', '${prefix}') +-pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir'))) +-pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir'))) ++pkgconf.set('libdir', join_paths(get_option('prefix'), get_option('libdir'))) ++pkgconf.set('includedir', join_paths(get_option('prefix'), get_option('includedir'))) + pkgconf.set('GST_API_VERSION', apiversion) + pkgconf.set('VERSION', gst_version) + pkgconf.set('LIBM', mathlib.found() ? '-lm' : '') diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/core/setup-hook.sh b/nixpkgs/pkgs/development/libraries/gstreamer/core/setup-hook.sh new file mode 100644 index 000000000000..b8c741af578f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gstreamer/core/setup-hook.sh @@ -0,0 +1,9 @@ +addGstreamer1LibPath () { + if test -d "$1/lib/gstreamer-1.0" + then + export GST_PLUGIN_SYSTEM_PATH_1_0="${GST_PLUGIN_SYSTEM_PATH_1_0}${GST_PLUGIN_SYSTEM_PATH_1_0:+:}$1/lib/gstreamer-1.0" + fi +} + +addEnvHooks "$hostOffset" addGstreamer1LibPath + |