Skip to content

Instantly share code, notes, and snippets.

@rummik
Created March 15, 2020 23:00
Show Gist options
  • Save rummik/d8d35d98f123f1c2ba60414022ef9041 to your computer and use it in GitHub Desktop.
Save rummik/d8d35d98f123f1c2ba60414022ef9041 to your computer and use it in GitHub Desktop.
Immersed VR NixOS package
--- a/lib/libcurl.vers.in 2020-03-12 05:33:59.367082951 +0000
+++ b/lib/libcurl.vers.in 2020-03-12 05:33:59.368082948 +0000
@@ -11,3 +11,8 @@
global: curl_*;
local: *;
};
+CURL_@CURL_LT_SHLIB_VERSIONED_FLAVOUR@3
+{
+ global: curl_*;
+ local: *;
+};
{ stdenv, lib, fetchurl, dpkg,
autoPatchelfHook, makeDesktopItem, makeWrapper, patchelfUnstable,
cairo,
curl,
fontconfig,
gdk-pixbuf,
glib,
glibc,
gnutls,
gtk3,
libgcrypt,
libva,
libva1,
libzip,
pango,
xorg,
}:
let
curl_ =
(curl.override {
gnutlsSupport = true;
sslSupport = false;
})
.overrideAttrs (old: rec {
patches = old.patches ++ [
./curl-gnutls-3.patch
];
configureFlags =
old.configureFlags ++ [
"--enable-versioned-symbols"
];
});
in
stdenv.mkDerivation rec {
pname = "immersed-vr";
version = "1.1.1";
src = fetchurl {
url = "http://206.189.168.203:8080/pool/main/i/immersed/Immersed_${version}-0_amd64.deb";
sha256 = "1dgwas4dvgnc0wj02z6zqm1rljsf085gadsqgkij4pqzhpmrssz7";
};
desktopItem = makeDesktopItem {
name = "immersed-vr";
exec = "Immersed %U";
icon = "immersed";
comment = "An immersive VR desktop experience";
desktopName = "Immersed VR";
categories = "Utility";
};
nativeBuildInputs = [ dpkg makeWrapper autoPatchelfHook patchelfUnstable ];
preloadSRC = ./preload.c;
buildInputs = [
stdenv.cc.cc
cairo
curl_.out
fontconfig
gdk-pixbuf
glib
glibc
gtk3
libgcrypt
libva
libva1
libzip
pango
xorg.libSM
xorg.libX11
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXtst
xorg.libXxf86vm
];
dontConfigure = true;
#dontPatchElf = true;
dontWrapGApps = true;
dontCheck = true;
unpackPhase = /* sh */ ''
dpkg-deb -x $src .
'';
installPhase = /* sh */ ''
mkdir -p $out/{bin,share,lib}
cp -r usr/{local/bin,share} $out
'';
postFixup = /* sh */ ''
wrapProgram $out/bin/Immersed \
--set LIBVA_DRIVER_NAME iHD \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs}:$out/lib
'';
meta = with stdenv.lib; {
description = "An immersive VR desktop experience";
homepage = "https://immersedvr.com";
license = licenses.unfree;
#maintainers = with maintainers; [ rummik ];
platforms = [ "x86_64-linux" ];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment