Skip to content

Commit

Permalink
viper: init at 1.8.5
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAShelf committed Sep 22, 2023
1 parent 7526dd9 commit d22d496
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
faf-client-bin = pkgs.callPackage ./faf-client/bin.nix {};
faf-client-unstable-bin = pkgs.callPackage ./faf-client/bin.nix {unstable = true;};

flight-core = pkgs.callPackage ./titanfall/flight-core.nix {};
# broken upstream, thanks tauri
# flight-core = pkgs.callPackage ./titanfall/flight-core.nix {};

northstar-proton = pkgs.callPackage ./titanfall/northstar-proton.nix {};

Expand Down Expand Up @@ -72,6 +73,8 @@

technic-launcher = pkgs.callPackage ./technic-launcher {};

viper = pkgs.callPackage ./titanfall/viper.nix {};

vkd3d-proton = pkgs.callPackage ./vkd3d-proton {inherit pins;};
vkd3d-proton-w32 = pkgs.pkgsCross.mingw32.callPackage ./vkd3d-proton {inherit pins;};
vkd3d-proton-w64 = pkgs.pkgsCross.mingwW64.callPackage ./vkd3d-proton {inherit pins;};
Expand Down
70 changes: 70 additions & 0 deletions pkgs/titanfall/viper.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
appimageTools,
lib,
fetchurl,
libthai,
harfbuzz,
fontconfig,
freetype,
libz,
libX11,
mesa,
libdrm,
fribidi,
libxcb,
libgpg-error,
libGL,
makeWrapper,
}: let
pname = "viper";
version = "1.8.5";

src = fetchurl {
url = "https://github.com/0neGal/${pname}/releases/download/v${version}/${pname}-${version}.AppImage";
hash = "sha256-jFroi4j2kNEGGU6R9WUvRK+vy26eizjPsZ6Cq6uLe0I=";
name = "${pname}-${version}.AppImage";
};

appimageContents = appimageTools.extractType2 {
name = "${pname}-${version}";
inherit src;
};

libs = [
libthai
harfbuzz
fontconfig
freetype
libz
libX11
mesa
libdrm
fribidi
libxcb
libgpg-error
libGL
];
in
appimageTools.wrapType2 {
inherit pname version src;
multiPkgs = null; # no 32bit needed
extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ libs;
extraInstallCommands = ''
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
cp -r ${appimageContents}/usr/share/icons $out/share
source "${makeWrapper}/nix-support/setup-hook" # cringe hack to get wrapProgram working in extraInstallCommands
makeWrapper $out/bin/${pname}-${version} $out/bin/${pname} \
--unset APPIMAGE \
--unset APPDIR
'';

meta = {
description = "Installer/Updater/Launcher for Northstar ";
homepage = "https://github.com/R2NorthstarTools/FlightCore";
license = lib.licenses.gpl3Only;
mainProgram = "viper";
maintainers = with lib.maintainers; [NotAShelf];
platforms = ["x86_64-linux"];
};
}

0 comments on commit d22d496

Please sign in to comment.