2019-06-11 22:02:49 +01:00
|
|
|
{ stdenv, lib, fetchurl, buildFHSUserEnv, makeDesktopItem, makeWrapper, atomEnv, libuuid, at-spi2-atk, icu, openssl, zlib }:
|
|
|
|
let
|
|
|
|
pname = "sidequest";
|
2019-11-17 20:04:06 +00:00
|
|
|
version = "0.7.6";
|
2019-10-05 09:06:54 +01:00
|
|
|
|
2019-06-11 22:02:49 +01:00
|
|
|
desktopItem = makeDesktopItem rec {
|
|
|
|
name = "SideQuest";
|
|
|
|
exec = "SideQuest";
|
|
|
|
desktopName = name;
|
|
|
|
genericName = "VR App Store";
|
|
|
|
categories = "Settings;PackageManager;";
|
|
|
|
};
|
|
|
|
|
|
|
|
sidequest = stdenv.mkDerivation {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchurl {
|
2019-10-05 09:06:54 +01:00
|
|
|
url = "https://github.com/the-expanse/SideQuest/releases/download/v${version}/SideQuest-${version}.tar.xz";
|
2019-11-17 20:04:06 +00:00
|
|
|
sha256 = "1yyba5495ydyyfl62pjd4hbga86k7f2a72ds2j2qzkinngyl14j8";
|
2019-06-11 22:02:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p "$out/lib/SideQuest" "$out/bin"
|
2019-10-05 09:06:54 +01:00
|
|
|
tar -xJf "$src" -C "$out/lib/SideQuest" --strip-components 1
|
2019-06-11 22:02:49 +01:00
|
|
|
|
2019-10-05 09:06:54 +01:00
|
|
|
ln -s "$out/lib/SideQuest/sidequest" "$out/bin"
|
2019-06-11 22:02:49 +01:00
|
|
|
|
|
|
|
fixupPhase
|
|
|
|
|
|
|
|
# mkdir -p "$out/share/applications"
|
|
|
|
# ln -s "${desktopItem}/share/applications/*" "$out/share/applications"
|
|
|
|
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "${atomEnv.libPath}/lib:${lib.makeLibraryPath [libuuid at-spi2-atk]}:$out/lib/SideQuest" \
|
2019-10-05 09:06:54 +01:00
|
|
|
"$out/lib/SideQuest/sidequest"
|
2019-06-11 22:02:49 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
in buildFHSUserEnv {
|
|
|
|
name = "SideQuest";
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "An open app store and side-loading tool for Android-based VR devices such as the Oculus Go, Oculus Quest or Moverio BT 300";
|
|
|
|
homepage = "https://github.com/the-expanse/SideQuest";
|
|
|
|
downloadPage = "https://github.com/the-expanse/SideQuest/releases";
|
|
|
|
license = licenses.mit;
|
2019-10-05 09:06:54 +01:00
|
|
|
maintainers = with maintainers; [ joepie91 rvolosatovs ];
|
2019-06-11 22:02:49 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
};
|
2019-10-05 09:06:54 +01:00
|
|
|
|
2019-06-11 22:02:49 +01:00
|
|
|
targetPkgs = pkgs: [
|
|
|
|
sidequest
|
|
|
|
# Needed in the environment on runtime, to make QuestSaberPatch work
|
|
|
|
icu openssl zlib
|
|
|
|
];
|
|
|
|
|
|
|
|
extraInstallCommands = ''
|
|
|
|
mkdir -p "$out/share/applications"
|
2019-10-05 09:06:54 +01:00
|
|
|
ln -s ${desktopItem}/share/applications/* "$out/share/applications"
|
2019-06-11 22:02:49 +01:00
|
|
|
'';
|
|
|
|
|
2019-10-05 09:06:54 +01:00
|
|
|
runScript = "sidequest";
|
2019-06-11 22:02:49 +01:00
|
|
|
}
|