2023-10-03 00:52:34 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, buildFHSEnv
|
|
|
|
, makeDesktopItem
|
|
|
|
, makeWrapper
|
|
|
|
, alsa-lib
|
|
|
|
, at-spi2-atk
|
|
|
|
, cairo
|
|
|
|
, cups
|
|
|
|
, dbus
|
|
|
|
, expat
|
|
|
|
, gdk-pixbuf
|
|
|
|
, glib
|
|
|
|
, gtk3
|
|
|
|
, mesa
|
|
|
|
, nss
|
|
|
|
, nspr
|
|
|
|
, libdrm
|
|
|
|
, xorg
|
|
|
|
, libxkbcommon
|
|
|
|
, libxshmfence
|
|
|
|
, pango
|
|
|
|
, systemd
|
|
|
|
, icu
|
|
|
|
, openssl
|
|
|
|
, zlib
|
|
|
|
}:
|
2021-01-19 23:25:11 +00:00
|
|
|
let
|
|
|
|
pname = "sidequest";
|
2023-05-04 04:49:20 +00:00
|
|
|
version = "0.10.33";
|
2019-10-05 08:06:54 +00:00
|
|
|
|
2021-01-19 23:25:11 +00:00
|
|
|
desktopItem = makeDesktopItem rec {
|
|
|
|
name = "SideQuest";
|
|
|
|
exec = "SideQuest";
|
|
|
|
desktopName = name;
|
|
|
|
genericName = "VR App Store";
|
2022-02-22 14:56:15 +00:00
|
|
|
categories = [ "Settings" "PackageManager" ];
|
2021-01-19 23:25:11 +00:00
|
|
|
};
|
2019-06-11 21:02:49 +00:00
|
|
|
|
2021-01-19 23:25:11 +00:00
|
|
|
sidequest = stdenv.mkDerivation {
|
|
|
|
inherit pname version;
|
2019-06-11 21:02:49 +00:00
|
|
|
|
2021-01-19 23:25:11 +00:00
|
|
|
src = fetchurl {
|
2021-03-08 13:04:50 +00:00
|
|
|
url = "https://github.com/SideQuestVR/SideQuest/releases/download/v${version}/SideQuest-${version}.tar.xz";
|
2023-05-04 04:49:20 +00:00
|
|
|
sha256 = "8ac3d97400a8e3ce86902b5bea7b8d042a092acd888d20e5139490a38507f995";
|
2021-01-19 23:25:11 +00:00
|
|
|
};
|
2019-06-11 21:02:49 +00:00
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2019-06-11 21:02:49 +00:00
|
|
|
|
2023-10-03 00:52:34 +00:00
|
|
|
installPhase = ''
|
2021-01-19 23:25:11 +00:00
|
|
|
mkdir -p "$out/lib/SideQuest" "$out/bin"
|
|
|
|
tar -xJf "$src" -C "$out/lib/SideQuest" --strip-components 1
|
2019-06-11 21:02:49 +00:00
|
|
|
|
2021-01-19 23:25:11 +00:00
|
|
|
ln -s "$out/lib/SideQuest/sidequest" "$out/bin"
|
2023-10-03 00:52:34 +00:00
|
|
|
'';
|
2019-06-11 21:02:49 +00:00
|
|
|
|
2023-10-03 00:52:34 +00:00
|
|
|
postFixup = let
|
|
|
|
libPath = lib.makeLibraryPath [
|
|
|
|
alsa-lib
|
|
|
|
at-spi2-atk
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
dbus
|
|
|
|
expat
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
mesa
|
|
|
|
nss
|
|
|
|
nspr
|
|
|
|
libdrm
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libxcb
|
|
|
|
xorg.libXcomposite
|
|
|
|
xorg.libXdamage
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXfixes
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libxshmfence
|
|
|
|
libxkbcommon
|
|
|
|
xorg.libxkbfile
|
|
|
|
pango
|
|
|
|
stdenv.cc.cc.lib
|
|
|
|
systemd
|
|
|
|
];
|
|
|
|
in ''
|
2021-01-19 23:25:11 +00:00
|
|
|
patchelf \
|
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2023-10-03 00:52:34 +00:00
|
|
|
--set-rpath "${libPath}:$out/lib/SideQuest" \
|
2021-01-19 23:25:11 +00:00
|
|
|
"$out/lib/SideQuest/sidequest"
|
|
|
|
'';
|
|
|
|
};
|
2023-04-11 10:52:27 +00:00
|
|
|
in buildFHSEnv {
|
2021-01-19 23:25:11 +00:00
|
|
|
name = "SideQuest";
|
2019-06-11 21:02:49 +00:00
|
|
|
|
2021-01-19 23:25:11 +00:00
|
|
|
passthru = {
|
|
|
|
inherit pname version;
|
2019-06-11 21:02:49 +00:00
|
|
|
|
2021-01-19 23:25:11 +00:00
|
|
|
meta = with 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";
|
2021-03-08 13:04:50 +00:00
|
|
|
homepage = "https://github.com/SideQuestVR/SideQuest";
|
|
|
|
downloadPage = "https://github.com/SideQuestVR/SideQuest/releases";
|
2022-06-04 22:19:25 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2021-01-19 23:25:11 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ joepie91 rvolosatovs ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
};
|
2019-10-05 08:06:54 +00:00
|
|
|
|
2021-01-19 23:25:11 +00:00
|
|
|
targetPkgs = pkgs: [
|
|
|
|
sidequest
|
|
|
|
# Needed in the environment on runtime, to make QuestSaberPatch work
|
|
|
|
icu openssl zlib
|
2023-05-04 04:49:20 +00:00
|
|
|
libxkbcommon libxshmfence
|
2021-01-19 23:25:11 +00:00
|
|
|
];
|
2019-06-11 21:02:49 +00:00
|
|
|
|
2021-01-19 23:25:11 +00:00
|
|
|
extraInstallCommands = ''
|
|
|
|
mkdir -p "$out/share/applications"
|
|
|
|
ln -s ${desktopItem}/share/applications/* "$out/share/applications"
|
|
|
|
'';
|
2019-06-11 21:02:49 +00:00
|
|
|
|
2021-01-19 23:25:11 +00:00
|
|
|
runScript = "sidequest";
|
|
|
|
}
|