Merge pull request #127335 from ymatsiuk/bluejeans

This commit is contained in:
Sandro 2021-06-18 13:46:10 +02:00 committed by GitHub
commit f6475854cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 5 deletions

View file

@ -38,14 +38,17 @@
, xdg-utils
}:
let
getFirst = n: v: builtins.concatStringsSep "." (lib.take n (lib.splitString "." v));
in
stdenv.mkDerivation rec {
pname = "bluejeans";
version = "2.21.3";
buildNumber = "2";
version = "2.22.0.87";
src = fetchurl {
url = "https://swdl.bluejeans.com/desktop-app/linux/${version}/BlueJeans_${version}.${buildNumber}.rpm";
sha256 = "sha256-a/REuxkqZmLLa7N3CUgUAdq74VMD9D10a/Sx2jOj1QA=";
url = "https://swdl.bluejeans.com/desktop-app/linux/${getFirst 3 version}/BlueJeans_${version}.rpm";
sha256 = "sha256-0nobn+YcvqakwvBdkoEJrzHoL+OGym2zJ806oUabYfo=";
};
nativeBuildInputs = [ rpmextract makeWrapper ];
@ -106,7 +109,7 @@ stdenv.mkDerivation rec {
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
opt/BlueJeans/resources/BluejeansHelper
cc $localtime64_stub -shared -o "$out"/opt/BlueJeans/liblocaltime64_stub.so
cc $localtime64_stub -shared -o "${placeholder "out"}"/opt/BlueJeans/liblocaltime64_stub.so
makeWrapper $out/opt/BlueJeans/bluejeans-v2 $out/bin/bluejeans \
--set LD_LIBRARY_PATH "${libPath}":"${placeholder "out"}"/opt/BlueJeans \
@ -119,6 +122,8 @@ stdenv.mkDerivation rec {
patchShebangs "$out"
'';
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Video, audio, and web conferencing that works together with the collaboration tools you use every day";
homepage = "https://www.bluejeans.com";
@ -127,3 +132,4 @@ stdenv.mkDerivation rec {
platforms = [ "x86_64-linux" ];
};
}

View file

@ -0,0 +1,12 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl pup common-updater-scripts
set -eu -o pipefail
version="$(curl -Ls https://www.bluejeans.com/download | \
pup 'a[aria-label~="Linux"] attr{href}' | \
#output contains *.deb and *.rpm
grep "\.rpm" | \
awk -F'[ ._ ]' '{printf $6"."$7"."$8"."$9"\n"}')"
update-source-version bluejeans-gui "$version"