mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
many changes
This commit is contained in:
parent
3150cf3c12
commit
0262081094
43 changed files with 4022 additions and 204 deletions
194
packages/dorion.nix
Normal file
194
packages/dorion.nix
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
rustPlatform,
|
||||
cmake,
|
||||
ninja,
|
||||
wrapGAppsHook4,
|
||||
glib-networking,
|
||||
gst_all_1,
|
||||
libsysprof-capture,
|
||||
libayatana-appindicator,
|
||||
nodejs,
|
||||
openssl,
|
||||
pkg-config,
|
||||
yq-go,
|
||||
pnpm_9,
|
||||
webkitgtk_4_1,
|
||||
cargo-tauri,
|
||||
desktop-file-utils,
|
||||
}:
|
||||
|
||||
let
|
||||
webkitgtk_4_1' = webkitgtk_4_1.override {
|
||||
enableExperimental = true;
|
||||
};
|
||||
|
||||
shelter = fetchurl {
|
||||
url = "https://raw.githubusercontent.com/uwu/shelter-builds/fab6f100bd0ab8583d67f792f66722a7d2a14bd1/shelter.js";
|
||||
hash = "sha256-d9vaKLrl8RYNcHnE1iGN49ov6U/Y+9XpEsio+c1Sguc=";
|
||||
meta = {
|
||||
homepage = "https://github.com/uwu/shelter";
|
||||
sourceProvenance = [ lib.sourceTypes.binaryBytecode ]; # actually, minified JS
|
||||
license = lib.licenses.cc0;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "dorion";
|
||||
version = "6.7.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "SpikeHD";
|
||||
repo = "Dorion";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-d4G3royqhz+te5wPWVLNqqG/w0qOvTd7dKcWSzxUMUo=";
|
||||
};
|
||||
|
||||
cargoPatches = [
|
||||
./no-cargo-patch.patch
|
||||
];
|
||||
|
||||
cargoRoot = "src-tauri";
|
||||
buildAndTestSubdir = finalAttrs.cargoRoot;
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-1xpAJkS31DjrZCY5WJ4/Z1t1ALED5gz7xYLhVR1Qzww=";
|
||||
|
||||
pnpmDeps = pnpm_9.fetchDeps {
|
||||
inherit (finalAttrs) pname version src;
|
||||
hash = "sha256-xBonUzA4+1zbViEsKap6CaG6ZRldW1LjNYIB+FmVRFs=";
|
||||
};
|
||||
|
||||
# CMake (webkit extension)
|
||||
cmakeDir = ".";
|
||||
cmakeBuildDir = "src-tauri/extension_webkit";
|
||||
dontUseCmakeConfigure = true;
|
||||
dontUseNinjaBuild = true;
|
||||
dontUseNinjaCheck = true;
|
||||
dontUseNinjaInstall = true;
|
||||
# cmake's supposed to set this automatically
|
||||
# ... but the detection is based on the presence of ninja build hook
|
||||
cmakeFlags = [
|
||||
"-GNinja"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pnpm_9.configHook
|
||||
cargo-tauri.hook
|
||||
nodejs
|
||||
pkg-config
|
||||
wrapGAppsHook4
|
||||
yq-go
|
||||
desktop-file-utils
|
||||
cmake
|
||||
ninja
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
webkitgtk_4_1'
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-bad
|
||||
gst_all_1.gst-plugins-good
|
||||
gst_all_1.gst-plugins-rs
|
||||
glib-networking
|
||||
libsysprof-capture
|
||||
libayatana-appindicator
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# remove updater
|
||||
rm -rf updater
|
||||
|
||||
# patch cargo-deps
|
||||
pushd $cargoDepsCopy/tauri-plugin-shell-*
|
||||
patch -p1 < /build/source/src-tauri/patches/tauri-plugin-shell+*.patch
|
||||
popd
|
||||
|
||||
substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
|
||||
--replace-fail "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
|
||||
|
||||
# disable pre-build script and disable auto-updater
|
||||
yq -iPo=json '
|
||||
.bundle.resources = (.bundle.resources | map(select(. != "updater*")))
|
||||
' src-tauri/tauri.conf.json
|
||||
|
||||
# link shelter injection
|
||||
ln -s ${shelter} src-tauri/injection/shelter.js
|
||||
|
||||
# link html/frontend data
|
||||
ln -s /build/source/src /build/source/src-tauri/html
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
cmakeConfigurePhase
|
||||
pnpmConfigHook
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
ninjaBuildPhase
|
||||
cd /build/source
|
||||
tauriBuildHook
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# Set up the resource directories
|
||||
mkdir -p $out/lib/Dorion
|
||||
ln -s $out/lib/Dorion $out/lib/dorion
|
||||
rm -rf $out/lib/Dorion/injection
|
||||
cp -r src-tauri/injection $out/lib/Dorion
|
||||
cp -r src $out/lib/Dorion
|
||||
|
||||
# Modify the desktop file
|
||||
desktop-file-edit \
|
||||
--set-comment "Tiny alternative Discord client" \
|
||||
--set-key="Exec" --set-value="Dorion %U" \
|
||||
--set-key="TryExec" --set-value="Dorion" \
|
||||
--set-key="StartupWMClass" --set-value="Dorion" \
|
||||
--set-key="StartupNotify" --set-value="true" \
|
||||
--set-key="Categories" --set-value="Network;InstantMessaging;Chat;" \
|
||||
--set-key="Keywords" --set-value="dorion;discord;vencord;chat;im;vc;ds;dc;dsc;tauri;" \
|
||||
--set-key="Terminal" --set-value="false" \
|
||||
--set-key="MimeType" --set-value="x-scheme-handler/discord" \
|
||||
$out/share/applications/Dorion.desktop
|
||||
'';
|
||||
|
||||
# error: failed to run custom build command for `Dorion v6.5.3 (/build/source/src-tauri)`
|
||||
# Permission denied (os error 13)
|
||||
doCheck = false;
|
||||
|
||||
env = {
|
||||
TAURI_RESOURCE_DIR = "${placeholder "out"}/lib";
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://spikehd.github.io/projects/dorion/";
|
||||
description = "Tiny alternative Discord client";
|
||||
longDescription = ''
|
||||
Dorion is an alternative Discord client aimed towards lower-spec or
|
||||
storage-sensitive PCs that supports themes, plugins, and more!
|
||||
'';
|
||||
changelog = "https://github.com/SpikeHD/Dorion/releases/tag/v${finalAttrs.version}";
|
||||
downloadPage = "https://github.com/SpikeHD/Dorion/releases/tag/v${finalAttrs.version}";
|
||||
license = with lib.licenses; [
|
||||
gpl3Only
|
||||
cc0 # Shelter
|
||||
];
|
||||
mainProgram = "Dorion";
|
||||
maintainers = with lib.maintainers; [
|
||||
nyabinary
|
||||
aleksana
|
||||
griffi-gh
|
||||
getchoo
|
||||
];
|
||||
platforms = lib.platforms.linux;
|
||||
sourceProvenance = [
|
||||
lib.sourceTypes.binaryBytecode # actually, minified JS
|
||||
lib.sourceTypes.fromSource
|
||||
];
|
||||
};
|
||||
})
|
||||
|
||||
324
packages/lutris.nix
Normal file
324
packages/lutris.nix
Normal file
|
|
@ -0,0 +1,324 @@
|
|||
{
|
||||
lib,
|
||||
buildFHSEnv,
|
||||
lutris-unwrapped,
|
||||
extraLinkLines ? '''',
|
||||
extraPkgs ? pkgs: [ ],
|
||||
extraLibraries ? pkgs: [ ],
|
||||
steamSupport ? true,
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
qt5Deps =
|
||||
pkgs: with pkgs.qt5; [
|
||||
qtbase
|
||||
qtmultimedia
|
||||
];
|
||||
qt6Deps = pkgs: with pkgs.qt6; [ qtbase ];
|
||||
gnomeDeps =
|
||||
pkgs: with pkgs; [
|
||||
zenity
|
||||
gtksourceview
|
||||
gnome-desktop
|
||||
libgnome-keyring
|
||||
webkitgtk_4_1
|
||||
];
|
||||
xorgDeps =
|
||||
pkgs: with pkgs.xorg; [
|
||||
libX11
|
||||
libXrender
|
||||
libXrandr
|
||||
libxcb
|
||||
libXmu
|
||||
libpthreadstubs
|
||||
libXext
|
||||
libXdmcp
|
||||
libXxf86vm
|
||||
libXinerama
|
||||
libSM
|
||||
libXv
|
||||
libXaw
|
||||
libXi
|
||||
libXcursor
|
||||
libXcomposite
|
||||
libXfixes
|
||||
libXtst
|
||||
libXScrnSaver
|
||||
libICE
|
||||
libXt
|
||||
];
|
||||
gstreamerDeps =
|
||||
pkgs: with pkgs.gst_all_1; [
|
||||
gstreamer
|
||||
gst-plugins-base
|
||||
gst-plugins-good
|
||||
gst-plugins-ugly
|
||||
gst-plugins-bad
|
||||
gst-libav
|
||||
];
|
||||
|
||||
in
|
||||
buildFHSEnv {
|
||||
pname = "lutris";
|
||||
inherit (lutris-unwrapped) version;
|
||||
|
||||
runScript = "lutris";
|
||||
|
||||
# Many native and WINE games need 32bit
|
||||
multiArch = true;
|
||||
|
||||
targetPkgs =
|
||||
pkgs:
|
||||
with pkgs;
|
||||
[
|
||||
lutris-unwrapped
|
||||
|
||||
# Appimages
|
||||
fuse
|
||||
|
||||
# Adventure Game Studio
|
||||
allegro
|
||||
dumb
|
||||
|
||||
# Battle.net
|
||||
jansson
|
||||
|
||||
# Curl
|
||||
libnghttp2
|
||||
|
||||
# Desmume
|
||||
lua
|
||||
agg
|
||||
soundtouch
|
||||
openal
|
||||
desktop-file-utils
|
||||
atk
|
||||
|
||||
# DGen // TODO: libarchive is broken
|
||||
|
||||
# Dolphin
|
||||
bluez
|
||||
ffmpeg_6
|
||||
gettext
|
||||
portaudio
|
||||
miniupnpc
|
||||
mbedtls_2
|
||||
lzo
|
||||
sfml
|
||||
gsm
|
||||
wavpack
|
||||
orc
|
||||
nettle
|
||||
gmp
|
||||
pcre
|
||||
vulkan-loader
|
||||
zstd
|
||||
|
||||
# DOSBox
|
||||
SDL_net
|
||||
SDL_sound
|
||||
|
||||
# GOG
|
||||
glib-networking
|
||||
|
||||
# Higan // TODO: "higan is not available for the x86_64 architecture"
|
||||
|
||||
# Libretro
|
||||
fluidsynth
|
||||
hidapi
|
||||
libgbm
|
||||
libdrm
|
||||
|
||||
# MAME
|
||||
fontconfig
|
||||
SDL2_ttf
|
||||
|
||||
# Mednafen
|
||||
libglut
|
||||
mesa_glu
|
||||
|
||||
# MESS
|
||||
expat
|
||||
|
||||
# Minecraft
|
||||
nss
|
||||
|
||||
# Mupen64Plus
|
||||
boost
|
||||
dash
|
||||
|
||||
# Overwatch 2
|
||||
libunwind
|
||||
|
||||
# PPSSPP
|
||||
glew
|
||||
snappy
|
||||
|
||||
# Redream // "redream is not available for the x86_64 architecture"
|
||||
|
||||
# RPCS3
|
||||
llvm
|
||||
e2fsprogs
|
||||
libgpg-error
|
||||
|
||||
# ScummVM
|
||||
nasm
|
||||
sndio
|
||||
|
||||
# ResidualVM is now merged with ScummVM and therefore does not exist anymore
|
||||
flac
|
||||
|
||||
# Snes9x
|
||||
libepoxy
|
||||
minizip
|
||||
|
||||
# Vice
|
||||
bison
|
||||
flex
|
||||
|
||||
# WINE
|
||||
xorg.xrandr
|
||||
perl
|
||||
which
|
||||
p7zip
|
||||
gnused
|
||||
gnugrep
|
||||
psmisc
|
||||
opencl-headers
|
||||
|
||||
# ZDOOM
|
||||
soundfont-fluid
|
||||
bzip2
|
||||
game-music-emu
|
||||
]
|
||||
++ qt5Deps pkgs
|
||||
++ qt6Deps pkgs
|
||||
++ gnomeDeps pkgs
|
||||
++ lib.optional steamSupport pkgs.steam
|
||||
++ extraPkgs pkgs;
|
||||
|
||||
multiPkgs =
|
||||
pkgs:
|
||||
with pkgs;
|
||||
[
|
||||
# Common
|
||||
libsndfile
|
||||
libtheora
|
||||
libogg
|
||||
libvorbis
|
||||
libopus
|
||||
libGLU
|
||||
libpcap
|
||||
libpulseaudio
|
||||
libao
|
||||
libevdev
|
||||
udev
|
||||
libgcrypt
|
||||
libxml2
|
||||
libusb1
|
||||
libpng
|
||||
libmpeg2
|
||||
libv4l
|
||||
libjpeg
|
||||
libxkbcommon
|
||||
libass
|
||||
libcdio
|
||||
libjack2
|
||||
libsamplerate
|
||||
libzip
|
||||
libmad
|
||||
libaio
|
||||
libcap
|
||||
libtiff
|
||||
libva
|
||||
libgphoto2
|
||||
libxslt
|
||||
libsndfile
|
||||
giflib
|
||||
zlib
|
||||
glib
|
||||
alsa-lib
|
||||
zziplib
|
||||
bash
|
||||
dbus
|
||||
keyutils
|
||||
zip
|
||||
cabextract
|
||||
freetype
|
||||
unzip
|
||||
coreutils
|
||||
readline
|
||||
gcc
|
||||
SDL
|
||||
SDL2
|
||||
curl
|
||||
graphite2
|
||||
gtk2
|
||||
gtk3
|
||||
udev
|
||||
ncurses
|
||||
wayland
|
||||
libglvnd
|
||||
vulkan-loader
|
||||
xdg-utils
|
||||
sqlite
|
||||
gnutls
|
||||
p11-kit
|
||||
libbsd
|
||||
harfbuzz
|
||||
|
||||
# PCSX2 // TODO: "libgobject-2.0.so.0: wrong ELF class: ELFCLASS64"
|
||||
|
||||
# WINE
|
||||
cups
|
||||
lcms2
|
||||
mpg123
|
||||
cairo
|
||||
unixODBC
|
||||
samba4
|
||||
sane-backends
|
||||
openldap
|
||||
ocl-icd
|
||||
util-linux
|
||||
libkrb5
|
||||
|
||||
# Proton
|
||||
libselinux
|
||||
|
||||
# Winetricks
|
||||
fribidi
|
||||
pango
|
||||
]
|
||||
++ xorgDeps pkgs
|
||||
++ gstreamerDeps pkgs
|
||||
++ extraLibraries pkgs;
|
||||
|
||||
extraInstallCommands = ''
|
||||
mkdir -p $out/share
|
||||
ln -sf ${lutris-unwrapped}/share/applications $out/share
|
||||
ln -sf ${lutris-unwrapped}/share/icons $out/share
|
||||
'' + extraLinkLines;
|
||||
|
||||
# allows for some gui applications to share IPC
|
||||
# this fixes certain issues where they don't render correctly
|
||||
unshareIpc = false;
|
||||
|
||||
# Some applications such as Natron need access to MIT-SHM or other
|
||||
# shared memory mechanisms. Unsharing the pid namespace
|
||||
# breaks the ability for application to reference shared memory.
|
||||
unsharePid = false;
|
||||
|
||||
meta = {
|
||||
inherit (lutris-unwrapped.meta)
|
||||
homepage
|
||||
description
|
||||
platforms
|
||||
license
|
||||
maintainers
|
||||
broken
|
||||
;
|
||||
|
||||
mainProgram = "lutris";
|
||||
};
|
||||
}
|
||||
32
packages/no-cargo-patch.patch
Normal file
32
packages/no-cargo-patch.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
|
||||
index 13a6b54..f6bd9d6 100644
|
||||
--- a/src-tauri/Cargo.lock
|
||||
+++ b/src-tauri/Cargo.lock
|
||||
@@ -5049,6 +5049,8 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tauri-plugin-shell"
|
||||
version = "2.2.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "69d5eb3368b959937ad2aeaf6ef9a8f5d11e01ffe03629d3530707bbcb27ff5d"
|
||||
dependencies = [
|
||||
"encoding_rs",
|
||||
"log",
|
||||
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
|
||||
index 4dcaa86..daef086 100644
|
||||
--- a/src-tauri/Cargo.toml
|
||||
+++ b/src-tauri/Cargo.toml
|
||||
@@ -12,13 +12,6 @@ rust-version = "1.84.1"
|
||||
strip = "debuginfo"
|
||||
lto = false
|
||||
|
||||
-# Patches
|
||||
-[package.metadata.patch]
|
||||
-crates = ["tauri-plugin-shell"]
|
||||
-
|
||||
-[patch.crates-io]
|
||||
-tauri-plugin-shell = { path="./target/patch/tauri-plugin-shell-2.2.1" }
|
||||
-
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.0.0", features = [] }
|
||||
|
||||
|
||||
106
packages/umu-launcher-unwrapped.nix
Normal file
106
packages/umu-launcher-unwrapped.nix
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
{
|
||||
bash,
|
||||
cargo,
|
||||
fetchFromGitHub,
|
||||
hatch,
|
||||
lib,
|
||||
nix-update-script,
|
||||
python3Packages,
|
||||
rustPlatform,
|
||||
scdoc,
|
||||
writableTmpDirAsHomeHook,
|
||||
withTruststore ? true,
|
||||
withDeltaUpdates ? true,
|
||||
}:
|
||||
python3Packages.buildPythonPackage rec {
|
||||
pname = "umu-launcher-unwrapped";
|
||||
version = "1.2.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Open-Wine-Components";
|
||||
repo = "umu-launcher";
|
||||
tag = version;
|
||||
hash = "sha256-DkfB78XhK9CXgN/OpJZTjwHB7IcLC4h2HM/1JW42ZO0=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit src;
|
||||
hash = "sha256-JhNErFDJsM20BhgIgJSUBeNzAst8f+s1NzpLfl2m2es=";
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
writableTmpDirAsHomeHook
|
||||
python3Packages.pytestCheckHook
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cargo
|
||||
hatch
|
||||
python3Packages.build
|
||||
python3Packages.installer
|
||||
rustPlatform.cargoSetupHook
|
||||
scdoc
|
||||
];
|
||||
|
||||
patches = [
|
||||
./umu-proton-cachyos.patch
|
||||
];
|
||||
|
||||
pythonPath =
|
||||
with python3Packages;
|
||||
[
|
||||
pyzstd
|
||||
urllib3
|
||||
xlib
|
||||
]
|
||||
++ lib.optionals withTruststore [
|
||||
truststore
|
||||
]
|
||||
++ lib.optionals withDeltaUpdates [
|
||||
cbor2
|
||||
xxhash
|
||||
];
|
||||
|
||||
pyproject = false;
|
||||
configureScript = "./configure.sh";
|
||||
|
||||
configureFlags = [
|
||||
"--use-system-pyzstd"
|
||||
"--use-system-urllib"
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"PYTHONDIR=$(PREFIX)/${python3Packages.python.sitePackages}"
|
||||
"PYTHON_INTERPRETER=${lib.getExe python3Packages.python}"
|
||||
# Override RELEASEDIR to avoid running `git describe`
|
||||
"RELEASEDIR=${pname}-${version}"
|
||||
"SHELL_INTERPRETER=${lib.getExe bash}"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# Broken? Asserts that $STEAM_RUNTIME_LIBRARY_PATH is non-empty
|
||||
# Fails with AssertionError: '' is not true : Expected two elements in STEAM_RUNTIME_LIBRARY_PATHS
|
||||
"test_game_drive_empty"
|
||||
"test_game_drive_libpath_empty"
|
||||
|
||||
# Broken? Tests parse_args with no options (./umu_run.py)
|
||||
# Fails with AssertionError: SystemExit not raised
|
||||
"test_parse_args_noopts"
|
||||
];
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "Unified launcher for Windows games on Linux using the Steam Linux Runtime and Tools";
|
||||
changelog = "https://github.com/Open-Wine-Components/umu-launcher/releases/tag/${version}";
|
||||
homepage = "https://github.com/Open-Wine-Components/umu-launcher";
|
||||
license = lib.licenses.gpl3;
|
||||
mainProgram = "umu-run";
|
||||
maintainers = with lib.maintainers; [
|
||||
diniamo
|
||||
MattSturgeon
|
||||
fuzen
|
||||
];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
1829
packages/umu-proton-cachyos.patch
Normal file
1829
packages/umu-proton-cachyos.patch
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue