Skip to content

Instantly share code, notes, and snippets.

@devzero devzero/immersed.nix Secret

Created Jul 25, 2020
Embed
What would you like to do?
{ stdenv, lib, xorg, curl, gtk3, pango, gdk-pixbuf, glib, fontconfig, cairo, libGL, libva, libpng, intel-media-sdk, makeWrapper, fetchurl, dpkg, autoPatchelfHook }:
stdenv.mkDerivation rec {
name = "immersed-${version}";
version = "2.1-0";
src = fetchurl {
url = "http://206.189.168.203:8080/pool/main/i/immersed/Immersed_${version}_amd64.deb";
sha256 = "03909cb9fc151717af0d7a8265c780e2e9e2b878dee61023c2508339d9bf0fb4";
};
sourceRoot = ".";
nativeBuildInputs = [ dpkg autoPatchelfHook ];
unpackCmd = "dpkg-deb -x $curSrc .";
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
cp -R usr/share usr/local/bin $out/
# fix the path in the desktop file
substituteInPlace \
$out/share/applications/immersed-handler.desktop \
--replace /usr/local/bin/ $out/bin/
# symlink the binary to bin/
'';
# preFixup = let
# # we prepare our library path in the let clause to avoid it become part of the input of mkDerivation
# libPath = lib.makeLibraryPath [
buildInputs = [
curl #libcurl-gnutls.so.4
gtk3 #libgdk-3 libgtk-3
pango #libpangocairo-1.0.so.0 libpango
gdk-pixbuf #libgdk-pixbuf
glib #libgio-2.0.so.0 libgobject-2.0.so.0 ibglib-2.0.so.0
fontconfig #libfontconfig.so.1
xorg.libXcomposite #libXcomposite.so.1
xorg.libXdamage #libXdamage.so.1
xorg.libXfixes #libXfixes.so.3
xorg.libX11 #libX11.so.6
xorg.libXinerama #libXinerama.so.1
xorg.libXext #libXext.so.6
cairo #libcairo.so.2
xorg.libSM #libSM.so.6
xorg.libXxf86vm
xorg.libXtst
libGL
libva
libpng
intel-media-sdk
stdenv.cc.cc.lib # libstdc++.so.6
];
#in ''
# patchelf \
# --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
# --set-rpath "${libPath}" \
# $out/bin/Immersed
# '';
meta = with stdenv.lib; {
homepage = https://immersedvr.com/;
description = "Immersed Agent";
license = licenses.unfree;
platforms = platforms.linux;
maintainers = [ "devzero" ];
};
}
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.