Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 49 lines 1.2 kB view raw
1{ 2 cmake, 3 fetchFromGitLab, 4 mediastreamer, 5 openh264, 6 lib, 7 stdenv, 8}: 9 10stdenv.mkDerivation rec { 11 pname = "msopenh264"; 12 version = "linphone-4.4.1"; 13 14 src = fetchFromGitLab { 15 domain = "gitlab.linphone.org"; 16 owner = "public"; 17 group = "BC"; 18 repo = pname; 19 rev = "5603a432be2ed10f5d5a5ce068ef83ab2a996d6b"; 20 sha256 = "sha256-AqZ7tsNZw2Djgyo1JBJbT/c3eQVyEn6r3CT6DQLD/B8="; 21 }; 22 23 nativeBuildInputs = [ cmake ]; 24 buildInputs = [ 25 mediastreamer 26 openh264 27 ]; 28 29 # Do not build static libraries 30 cmakeFlags = [ 31 "-DENABLE_STATIC=NO" 32 "-DCMAKE_SKIP_INSTALL_RPATH=ON" 33 ]; 34 35 # CMAKE_INSTALL_PREFIX has no effect so let's install manually. See: 36 # https://gitlab.linphone.org/BC/public/msopenh264/issues/1 37 installPhase = '' 38 mkdir -p $out/lib/mediastreamer/plugins 39 cp src/libmsopenh264.so $out/lib/mediastreamer/plugins/ 40 ''; 41 42 meta = with lib; { 43 description = "H.264 encoder/decoder plugin for mediastreamer2. Part of the Linphone project"; 44 homepage = "https://www.linphone.org/technical-corner/mediastreamer2"; 45 license = licenses.gpl2; 46 platforms = platforms.linux; 47 maintainers = with maintainers; [ jluttine ]; 48 }; 49}