Created
March 17, 2025 15:53
-
-
Save bsima/e300d0ee7cec467aa0d89994b1f55e88 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
lib, | |
stdenv, | |
fetchurl, | |
glib, | |
libX11, | |
gst_all_1, | |
libepoxy, | |
pango, | |
cairo, | |
gdk-pixbuf, | |
e2fsprogs, | |
libkrb5, | |
libva, | |
openssl_1_1, | |
pcsclite, | |
gtk3, | |
libselinux, | |
libxml2, | |
libffi, | |
python3Packages, | |
cpio, | |
autoPatchelfHook, | |
wrapGAppsHook3, | |
icu60, | |
libgudev, | |
libpulseaudio, | |
libxcrypt-legacy, | |
librsvg, | |
}: | |
stdenv.mkDerivation rec { | |
pname = "nice-dcv-client"; | |
version = "2024.0.7209-1"; | |
src = fetchurl { | |
url = "https://d1uj6qtbmh3dt5.cloudfront.net/2024.0/Clients/nice-dcv-viewer-${version}.el8.x86_64.rpm"; | |
sha256 = "sha256-wLuJFeUhx3wPbn39cWMCHw0JoH9mNSMQeCX8usyGAk4="; | |
}; | |
nativeBuildInputs = [ | |
autoPatchelfHook | |
wrapGAppsHook3 | |
python3Packages.rpm | |
]; | |
unpackPhase = '' | |
rpm2cpio $src | ${cpio}/bin/cpio -idm | |
''; | |
buildInputs = [ | |
libselinux | |
libkrb5 | |
libxml2 | |
libva | |
e2fsprogs | |
libX11 | |
openssl_1_1 | |
pcsclite | |
gtk3 | |
cairo | |
libepoxy | |
pango | |
gdk-pixbuf | |
gst_all_1.gstreamer | |
gst_all_1.gst-plugins-base | |
gst_all_1.gst-plugins-bad | |
icu60 | |
libgudev | |
libpulseaudio | |
libxcrypt-legacy | |
librsvg | |
]; | |
installPhase = '' | |
mkdir -p $out/bin/ | |
mkdir -p $out/lib64/ | |
mv usr/bin/dcvviewer $out/bin/dcvviewer | |
mv usr/lib64/* $out/lib64/ | |
mkdir -p $out/libexec/dcvviewer | |
mv usr/libexec/dcvviewer/dcvviewer $out/libexec/dcvviewer/dcvviewer | |
patchelf \ | |
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ | |
$out/libexec/dcvviewer/dcvviewer | |
# Fix the wrapper script to have the right basedir. | |
sed -i "s#basedir=/usr#basedir=$out#" $out/bin/dcvviewer | |
mv usr/share $out/ | |
${glib.dev}/bin/glib-compile-schemas $out/share/glib-2.0/schemas | |
# we already ship libffi.so.7 | |
ln -s ${lib.getLib libffi}/lib/libffi.so $out/lib64/libffi.so.6 | |
''; | |
dontWrapGApps = true; | |
postFixup = '' | |
wrapGApp "$out/bin/dcvviewer" | |
''; | |
meta = with lib; { | |
description = "High-performance remote display protocol"; | |
homepage = "https://aws.amazon.com/hpc/dcv/"; | |
sourceProvenance = with sourceTypes; [ binaryNativeCode ]; | |
license = licenses.unfree; | |
platforms = [ "x86_64-linux" ]; | |
maintainers = with maintainers; [ rmcgibbo ]; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment