Merge pull request #290893 from pcasaretto/immersed-vr-darwin
immersed-vr: add support for darwin
This commit is contained in:
commit
379e28944f
3 changed files with 60 additions and 10 deletions
27
pkgs/by-name/im/immersed-vr/darwin.nix
Normal file
27
pkgs/by-name/im/immersed-vr/darwin.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ stdenv
|
||||
, pname
|
||||
, version
|
||||
, src
|
||||
, meta
|
||||
, undmg
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit pname version src meta;
|
||||
|
||||
nativeBuildInputs = [ undmg ];
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/Applications
|
||||
cp -r *.app $out/Applications
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
# Immersed is notarized.
|
||||
dontFixup = true;
|
||||
}
|
14
pkgs/by-name/im/immersed-vr/linux.nix
Normal file
14
pkgs/by-name/im/immersed-vr/linux.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ pname
|
||||
, version
|
||||
, src
|
||||
, meta
|
||||
, appimageTools
|
||||
}:
|
||||
appimageTools.wrapType2 rec {
|
||||
inherit pname version src meta;
|
||||
name = "${pname}-${version}";
|
||||
|
||||
extraInstallCommands = ''
|
||||
mv $out/bin/{${name},${pname}}
|
||||
'';
|
||||
}
|
|
@ -1,27 +1,36 @@
|
|||
{ lib
|
||||
, appimageTools
|
||||
, callPackage
|
||||
, fetchurl
|
||||
, stdenv
|
||||
}:
|
||||
appimageTools.wrapType2 rec {
|
||||
let
|
||||
pname = "immersed-vr";
|
||||
version = "9.10";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://web.archive.org/web/20240210075929/https://static.immersed.com/dl/Immersed-x86_64.AppImage";
|
||||
hash = "sha256-Mx8UnV4fZSebj9ah650ZqsL/EIJpM6jl8tYmXJZiJpA=";
|
||||
sources = rec {
|
||||
x86_64-linux = {
|
||||
url = "https://web.archive.org/web/20240210075929/https://static.immersed.com/dl/Immersed-x86_64.AppImage";
|
||||
hash = "sha256-Mx8UnV4fZSebj9ah650ZqsL/EIJpM6jl8tYmXJZiJpA=";
|
||||
};
|
||||
x86_64-darwin = {
|
||||
url = "https://web.archive.org/web/20240210075929/https://static.immersed.com/dl/Immersed.dmg";
|
||||
hash = "sha256-CR2KylovlS7zerZIEScnadm4+ENNhib5QnS6z5Ihv1Y=";
|
||||
};
|
||||
aarch64-darwin = x86_64-darwin;
|
||||
};
|
||||
|
||||
extraInstallCommands = ''
|
||||
mv $out/bin/{${name},${pname}}
|
||||
'';
|
||||
src = fetchurl (sources.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"));
|
||||
|
||||
meta = with lib; {
|
||||
description = "A VR coworking platform";
|
||||
homepage = "https://immersed.com";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ haruki7049 ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
platforms = builtins.attrNames sources;
|
||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||
};
|
||||
}
|
||||
|
||||
in if stdenv.isDarwin
|
||||
then callPackage ./darwin.nix { inherit pname version src meta; }
|
||||
else callPackage ./linux.nix { inherit pname version src meta; }
|
||||
|
|
Loading…
Reference in a new issue