2015-03-30 00:10:29 -07:00
|
|
|
{ stdenv
|
2015-11-18 17:03:35 -08:00
|
|
|
, fetchFromGitHub
|
2018-12-28 04:52:38 -08:00
|
|
|
, fetchpatch
|
2015-03-30 00:10:29 -07:00
|
|
|
, cmake
|
2017-05-04 15:14:59 -07:00
|
|
|
, fdk_aac
|
2015-03-30 00:10:29 -07:00
|
|
|
, ffmpeg
|
|
|
|
, jansson
|
2017-10-24 14:09:33 -07:00
|
|
|
, libjack2
|
2015-03-30 00:10:29 -07:00
|
|
|
, libxkbcommon
|
2017-05-04 15:14:59 -07:00
|
|
|
, libpthreadstubs
|
|
|
|
, libXdmcp
|
2015-12-19 18:15:34 -08:00
|
|
|
, qtbase
|
|
|
|
, qtx11extras
|
2017-10-24 14:09:33 -07:00
|
|
|
, speex
|
2015-03-30 00:10:29 -07:00
|
|
|
, libv4l
|
|
|
|
, x264
|
2015-07-16 13:10:16 -07:00
|
|
|
, curl
|
2016-07-24 19:19:32 -07:00
|
|
|
, xorg
|
|
|
|
, makeWrapper
|
2017-05-04 15:14:59 -07:00
|
|
|
, pkgconfig
|
2017-10-24 14:09:33 -07:00
|
|
|
, vlc
|
2018-09-22 18:04:04 -07:00
|
|
|
, mbedtls
|
2015-06-24 23:47:44 -07:00
|
|
|
|
2016-05-16 21:04:04 -07:00
|
|
|
, alsaSupport ? false
|
|
|
|
, alsaLib
|
2015-06-24 23:47:44 -07:00
|
|
|
, pulseaudioSupport ? false
|
|
|
|
, libpulseaudio
|
2015-03-30 00:10:29 -07:00
|
|
|
}:
|
|
|
|
|
2015-06-24 23:47:44 -07:00
|
|
|
let
|
|
|
|
optional = stdenv.lib.optional;
|
|
|
|
in stdenv.mkDerivation rec {
|
2015-03-30 08:37:13 -07:00
|
|
|
name = "obs-studio-${version}";
|
2018-10-03 06:18:19 -07:00
|
|
|
version = "22.0.3";
|
2015-03-30 00:10:29 -07:00
|
|
|
|
2015-11-18 17:03:35 -08:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jp9000";
|
|
|
|
repo = "obs-studio";
|
2017-05-22 02:44:17 -07:00
|
|
|
rev = "${version}";
|
2018-10-03 06:18:19 -07:00
|
|
|
sha256 = "0ri9qkqk3h71b1a5bwpjzqdr21bbmfqbykg48l779d20zln23n1i";
|
2015-03-30 00:10:29 -07:00
|
|
|
};
|
|
|
|
|
2018-12-28 04:52:38 -08:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://patch-diff.githubusercontent.com/raw/obsproject/obs-studio/pull/1557.diff";
|
2019-01-04 02:39:26 -08:00
|
|
|
sha256 = "162fnkxh2wyn6wrrm1kzv7c2mn96kx35vlmk2qwn1nqlifbpsfyq";
|
2018-12-28 04:52:38 -08:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2015-11-18 17:03:35 -08:00
|
|
|
nativeBuildInputs = [ cmake
|
2017-05-04 15:14:59 -07:00
|
|
|
pkgconfig
|
2015-11-18 17:03:35 -08:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ curl
|
2017-05-04 15:14:59 -07:00
|
|
|
fdk_aac
|
2015-03-30 00:10:29 -07:00
|
|
|
ffmpeg
|
|
|
|
jansson
|
2017-10-24 14:09:33 -07:00
|
|
|
libjack2
|
2015-03-30 00:10:29 -07:00
|
|
|
libv4l
|
|
|
|
libxkbcommon
|
2017-05-04 15:14:59 -07:00
|
|
|
libpthreadstubs
|
|
|
|
libXdmcp
|
2015-12-19 18:15:34 -08:00
|
|
|
qtbase
|
|
|
|
qtx11extras
|
2017-10-24 14:09:33 -07:00
|
|
|
speex
|
2015-03-30 00:10:29 -07:00
|
|
|
x264
|
2017-10-24 14:09:33 -07:00
|
|
|
vlc
|
2016-07-24 19:19:32 -07:00
|
|
|
makeWrapper
|
2018-09-22 18:04:04 -07:00
|
|
|
mbedtls
|
2015-06-24 23:47:44 -07:00
|
|
|
]
|
2016-05-16 21:04:04 -07:00
|
|
|
++ optional alsaSupport alsaLib
|
2015-06-24 23:47:44 -07:00
|
|
|
++ optional pulseaudioSupport libpulseaudio;
|
2015-03-30 00:10:29 -07:00
|
|
|
|
|
|
|
# obs attempts to dlopen libobs-opengl, it fails unless we make sure
|
|
|
|
# DL_OPENGL is an explicit path. Not sure if there's a better way
|
|
|
|
# to handle this.
|
|
|
|
cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-DDL_OPENGL=\\\"$(out)/lib/libobs-opengl.so\\\"" ];
|
|
|
|
|
2016-07-24 19:19:32 -07:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/obs \
|
2017-12-17 23:00:48 -08:00
|
|
|
--prefix "LD_LIBRARY_PATH" : "${xorg.libX11.out}/lib:${vlc}/lib"
|
2016-07-24 19:19:32 -07:00
|
|
|
'';
|
|
|
|
|
2015-03-30 00:10:29 -07:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Free and open source software for video recording and live streaming";
|
|
|
|
longDescription = ''
|
|
|
|
This project is a rewrite of what was formerly known as "Open Broadcaster
|
|
|
|
Software", software originally designed for recording and streaming live
|
|
|
|
video content, efficiently
|
|
|
|
'';
|
2017-08-01 13:03:30 -07:00
|
|
|
homepage = https://obsproject.com;
|
2017-05-04 15:14:59 -07:00
|
|
|
maintainers = with maintainers; [ jb55 MP2E ];
|
2015-03-30 00:10:29 -07:00
|
|
|
license = licenses.gpl2;
|
2019-01-05 13:51:21 -08:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2015-03-30 00:10:29 -07:00
|
|
|
};
|
|
|
|
}
|