mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-13 19:57:19 +00:00
add vkquake build
This commit is contained in:
parent
4539d38714
commit
c806b5cc27
6 changed files with 110 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
||||||
pinentry-touchid
|
pinentry-touchid
|
||||||
qbittorrent-mac
|
qbittorrent-mac
|
||||||
spotify-mac
|
spotify-mac
|
||||||
|
vkquake
|
||||||
vlc-mac
|
vlc-mac
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,5 +9,6 @@ _final: prev: {
|
||||||
pinentry-touchid = prev.callPackage ./pinentry-touchid.nix {};
|
pinentry-touchid = prev.callPackage ./pinentry-touchid.nix {};
|
||||||
qbittorrent-mac = prev.callPackage ./qbittorrent-mac.nix {};
|
qbittorrent-mac = prev.callPackage ./qbittorrent-mac.nix {};
|
||||||
spotify-mac = prev.callPackage ./spotify-mac.nix {};
|
spotify-mac = prev.callPackage ./spotify-mac.nix {};
|
||||||
|
vkquake = prev.callPackage ./vkquake {};
|
||||||
vlc-mac = prev.callPackage ./vlc-mac.nix {};
|
vlc-mac = prev.callPackage ./vlc-mac.nix {};
|
||||||
}
|
}
|
||||||
|
|
76
packages/vkquake/default.nix
Normal file
76
packages/vkquake/default.nix
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
fetchFromGitHub,
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "vkquake";
|
||||||
|
name = "vkQuake";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "Novum";
|
||||||
|
repo = "vkQuake";
|
||||||
|
rev = "98e9e1c76e4ea57d6960c8b4c67a72f7f50f45ea";
|
||||||
|
sha256 = "sha256-XMsvc9886eYI+CzBMckop7WCAulm2qlKdNu+3qDK7zY=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
meson
|
||||||
|
pkgconfig
|
||||||
|
python3
|
||||||
|
cmake
|
||||||
|
ninja
|
||||||
|
darwin.binutils
|
||||||
|
ripgrep
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
vulkan-headers
|
||||||
|
glslang
|
||||||
|
spirv-tools
|
||||||
|
SDL2
|
||||||
|
libvorbis
|
||||||
|
flac
|
||||||
|
libopus
|
||||||
|
opusfile
|
||||||
|
flac
|
||||||
|
libmad
|
||||||
|
darwin.moltenvk
|
||||||
|
];
|
||||||
|
|
||||||
|
macApp = ./vkQuake.app;
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
# -*-sh-*-
|
||||||
|
cp -r $src/* .
|
||||||
|
meson build && ninja -C build
|
||||||
|
cp -r $macApp vkQuake.app
|
||||||
|
chmod -R a+rw vkQuake.app
|
||||||
|
ls
|
||||||
|
cp build/vkquake vkQuake.app/Contents/Resources/vkquake
|
||||||
|
mkdir vkQuake.app/Contents/Frameworks
|
||||||
|
otool -L build/vkquake |
|
||||||
|
rg nix |
|
||||||
|
cut -f1 -d' ' |
|
||||||
|
awk '{$1=$1};1' |
|
||||||
|
sort |
|
||||||
|
uniq |
|
||||||
|
xargs -I {} cp {} vkQuake.app/Contents/Frameworks/.
|
||||||
|
otool -L vkQuake.app/Contents/Frameworks/* |
|
||||||
|
rg nix |
|
||||||
|
cut -f1 -d' ' |
|
||||||
|
awk '{$1=$1};1' |
|
||||||
|
sort |
|
||||||
|
uniq |
|
||||||
|
xargs -I {} cp -u {} vkQuake.app/Contents/Frameworks/.
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
mkdir -p $out/Applications
|
||||||
|
mv build/vkquake $out/bin/vkquake
|
||||||
|
mv vkQuake.app $out/Applications/.
|
||||||
|
'';
|
||||||
|
}
|
18
packages/vkquake/vkQuake.app/Contents/Info.plist
Executable file
18
packages/vkquake/vkQuake.app/Contents/Info.plist
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>q1-launcher.sh</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>vkQuake</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>vkquake.icns</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>5.00</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>id Software</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
14
packages/vkquake/vkQuake.app/Contents/MacOS/q1-launcher.sh
Executable file
14
packages/vkquake/vkQuake.app/Contents/MacOS/q1-launcher.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# setting the right directories
|
||||||
|
BASEDIR="$( cd "$(dirname "$0")" || exit; pwd )"
|
||||||
|
RESOURCESDIR="$( cd "$BASEDIR/../Resources" || exit; pwd )"
|
||||||
|
FRAMEWORKSDIR="$( cd "$BASEDIR/../Frameworks" || exit; pwd )"
|
||||||
|
|
||||||
|
BIN="$RESOURCESDIR/vkquake"
|
||||||
|
|
||||||
|
export DYLD_FALLBACK_LIBRARY_PATH="$FRAMEWORKSDIR"
|
||||||
|
|
||||||
|
QUAKEDIR="$(if [[ -e "$RESOURCESDIR/id1" ]]; then echo "$RESOURCESDIR"; else echo "$HOME/.baseq1"; fi)"
|
||||||
|
|
||||||
|
$BIN -basedir $QUAKEDIR
|
BIN
packages/vkquake/vkQuake.app/Contents/Resources/vkquake.icns
Normal file
BIN
packages/vkquake/vkQuake.app/Contents/Resources/vkquake.icns
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue