2023-10-09 19:29:22 +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-02-05 17:12:51 +00:00
|
|
|
let
|
|
|
|
pname = "sidequest";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.10.33";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
desktopItem = makeDesktopItem rec {
|
|
|
|
name = "SideQuest";
|
|
|
|
exec = "SideQuest";
|
|
|
|
desktopName = name;
|
|
|
|
genericName = "VR App Store";
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [ "Settings" "PackageManager" ];
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
sidequest = stdenv.mkDerivation {
|
|
|
|
inherit pname version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
src = fetchurl {
|
2021-03-12 07:09:13 +00:00
|
|
|
url = "https://github.com/SideQuestVR/SideQuest/releases/download/v${version}/SideQuest-${version}.tar.xz";
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "8ac3d97400a8e3ce86902b5bea7b8d042a092acd888d20e5139490a38507f995";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
2024-01-25 14:12:00 +00:00
|
|
|
dontUnpack = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
installPhase = ''
|
2021-02-05 17:12:51 +00:00
|
|
|
mkdir -p "$out/lib/SideQuest" "$out/bin"
|
|
|
|
tar -xJf "$src" -C "$out/lib/SideQuest" --strip-components 1
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
ln -s "$out/lib/SideQuest/sidequest" "$out/bin"
|
2023-10-09 19:29:22 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +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-02-05 17:12:51 +00:00
|
|
|
patchelf \
|
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2023-10-09 19:29:22 +00:00
|
|
|
--set-rpath "${libPath}:$out/lib/SideQuest" \
|
2021-02-05 17:12:51 +00:00
|
|
|
"$out/lib/SideQuest/sidequest"
|
|
|
|
'';
|
|
|
|
};
|
2023-04-29 16:46:19 +00:00
|
|
|
in buildFHSEnv {
|
2021-02-05 17:12:51 +00:00
|
|
|
name = "SideQuest";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
passthru = {
|
|
|
|
inherit pname version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +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-12 07:09:13 +00:00
|
|
|
homepage = "https://github.com/SideQuestVR/SideQuest";
|
|
|
|
downloadPage = "https://github.com/SideQuestVR/SideQuest/releases";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ joepie91 rvolosatovs ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
targetPkgs = pkgs: [
|
|
|
|
sidequest
|
|
|
|
# Needed in the environment on runtime, to make QuestSaberPatch work
|
|
|
|
icu openssl zlib
|
2023-05-24 13:37:59 +00:00
|
|
|
libxkbcommon libxshmfence
|
2021-02-05 17:12:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
extraInstallCommands = ''
|
|
|
|
mkdir -p "$out/share/applications"
|
|
|
|
ln -s ${desktopItem}/share/applications/* "$out/share/applications"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
runScript = "sidequest";
|
|
|
|
}
|