nixpkgs-suyu/pkgs/applications/misc/sidequest/default.nix

70 lines
2.2 KiB
Nix
Raw Normal View History

2019-06-11 23:02:49 +02:00
{ stdenv, lib, fetchurl, buildFHSUserEnv, makeDesktopItem, makeWrapper, atomEnv, libuuid, at-spi2-atk, icu, openssl, zlib }:
2021-01-20 00:25:11 +01:00
let
pname = "sidequest";
2021-03-08 14:04:50 +01:00
version = "0.10.19";
2019-10-05 10:06:54 +02:00
2021-01-20 00:25:11 +01:00
desktopItem = makeDesktopItem rec {
name = "SideQuest";
exec = "SideQuest";
desktopName = name;
genericName = "VR App Store";
categories = "Settings;PackageManager;";
};
2019-06-11 23:02:49 +02:00
2021-01-20 00:25:11 +01:00
sidequest = stdenv.mkDerivation {
inherit pname version;
2019-06-11 23:02:49 +02:00
2021-01-20 00:25:11 +01:00
src = fetchurl {
2021-03-08 14:04:50 +01:00
url = "https://github.com/SideQuestVR/SideQuest/releases/download/v${version}/SideQuest-${version}.tar.xz";
sha256 = "14zqp12nigc4kv6hppyx2s59mmriimnzczay4xi3vh7zcw207px2";
2021-01-20 00:25:11 +01:00
};
2019-06-11 23:02:49 +02:00
nativeBuildInputs = [ makeWrapper ];
2019-06-11 23:02:49 +02:00
2021-01-20 00:25:11 +01:00
buildCommand = ''
mkdir -p "$out/lib/SideQuest" "$out/bin"
tar -xJf "$src" -C "$out/lib/SideQuest" --strip-components 1
2019-06-11 23:02:49 +02:00
2021-01-20 00:25:11 +01:00
ln -s "$out/lib/SideQuest/sidequest" "$out/bin"
2019-06-11 23:02:49 +02:00
2021-01-20 00:25:11 +01:00
fixupPhase
2019-06-11 23:02:49 +02:00
2021-01-20 00:25:11 +01:00
# mkdir -p "$out/share/applications"
# ln -s "${desktopItem}/share/applications/*" "$out/share/applications"
2019-06-11 23:02:49 +02:00
2021-01-20 00:25:11 +01:00
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${atomEnv.libPath}/lib:${lib.makeLibraryPath [libuuid at-spi2-atk]}:$out/lib/SideQuest" \
"$out/lib/SideQuest/sidequest"
'';
};
in buildFHSUserEnv {
name = "SideQuest";
2019-06-11 23:02:49 +02:00
2021-01-20 00:25:11 +01:00
passthru = {
inherit pname version;
2019-06-11 23:02:49 +02:00
2021-01-20 00:25:11 +01: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 14:04:50 +01:00
homepage = "https://github.com/SideQuestVR/SideQuest";
downloadPage = "https://github.com/SideQuestVR/SideQuest/releases";
2021-01-20 00:25:11 +01:00
license = licenses.mit;
maintainers = with maintainers; [ joepie91 rvolosatovs ];
platforms = [ "x86_64-linux" ];
};
};
2019-10-05 10:06:54 +02:00
2021-01-20 00:25:11 +01:00
targetPkgs = pkgs: [
sidequest
# Needed in the environment on runtime, to make QuestSaberPatch work
icu openssl zlib
];
2019-06-11 23:02:49 +02:00
2021-01-20 00:25:11 +01:00
extraInstallCommands = ''
mkdir -p "$out/share/applications"
ln -s ${desktopItem}/share/applications/* "$out/share/applications"
'';
2019-06-11 23:02:49 +02:00
2021-01-20 00:25:11 +01:00
runScript = "sidequest";
}