Skip to content

Instantly share code, notes, and snippets.

@devzero devzero/immersed.nix Secret

Created Aug 1, 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, bash }:
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 ];
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/
substituteInPlace \
$out/share/handlers/immersed-handler \
--replace "/usr/bin/env bash" $bash/bin/bash
'';
preFixup = let
# we prepare our library path in the let clause to avoid it become part of the input of mkDerivation
libPath = lib.makeLibraryPath [
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
for libfilename in $out/bin/immersed-res/va*/*.so; do
patchelf --set-rpath "${libPath}" $libfilename
done
'';
meta = with stdenv.lib; {
homepage = https://immersedvr.com/;
description = "Immersed Agent";
license = licenses.unfree;
platforms = platforms.linux;
maintainers = [ "devzero" ];
};
}
[connelly@fnord:/etc/nixos/fnord]$ nix-build -E '((import <nixpkgs> {}).callPackage (import ./immersed.nix) { })' --keep-failed --no-out-link
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0
[connelly@fnord:/etc/nixos/fnord]$ /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: no version information available (required by /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed)
/nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: symbol lookup error: /nix/store/jwilsgkvl7sd7ylad98k2khqxjk0qc6d-immersed-2.1-0/bin/Immersed: undefined symbol: , version
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.