migrated complex pkgs
This commit is contained in:
parent
3242385ad5
commit
b40e4e2226
8
flake.lock
generated
8
flake.lock
generated
@ -370,11 +370,11 @@
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734214493,
|
||||
"narHash": "sha256-7oT9U7TlrCIj6wcn91/09EZoqC1P6CZ76m4fTphFltc=",
|
||||
"lastModified": 1734216825,
|
||||
"narHash": "sha256-GOPbLUnsAAGnHVwon8cukhVdF6skE1veRvka+YRfOe0=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "171821bc9b5e370888e893ce5057af7d0cf2fabf",
|
||||
"revCount": 37,
|
||||
"rev": "7390d4af469d69ce36a5cfafdfc0f417b4c5981d",
|
||||
"revCount": 41,
|
||||
"type": "git",
|
||||
"url": "ssh://git@gitlab.com/CaptainJawZ/scripts-flake.git"
|
||||
},
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
services = {
|
||||
gvfs.enable = true;
|
||||
@ -47,6 +47,6 @@
|
||||
;
|
||||
}
|
||||
++ [
|
||||
(pkgs.callPackage ./pkgs/pano/default.nix { })
|
||||
inputs.jawz-scripts.packages.x86_64-linux.pano
|
||||
];
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
@ -40,13 +40,12 @@
|
||||
ryujinx # switch
|
||||
;
|
||||
}
|
||||
++ [
|
||||
# minecraft launcher
|
||||
(pkgs.callPackage ../../pkgs/polymc/default.nix { })
|
||||
# Super Mario 127
|
||||
(pkgs.callPackage ../../pkgs/super-mario-127/default.nix { })
|
||||
# 3Ds emulator
|
||||
(pkgs.callPackage ../../pkgs/citra/default.nix { branch = "nightly"; })
|
||||
];
|
||||
++ builtins.attrValues {
|
||||
inherit (inputs.jawz-scripts.packages.x86_64-linux)
|
||||
polymc # minecraft launcher
|
||||
super-mario-127 # Super Mario 127
|
||||
citra # 3Ds emulator
|
||||
;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
@ -20,11 +21,12 @@
|
||||
};
|
||||
};
|
||||
users.users.jawz.packages =
|
||||
[
|
||||
# video download helper assistant
|
||||
(pkgs.callPackage ../../pkgs/vdhcoapp/default.nix { })
|
||||
(pkgs.callPackage ../../pkgs/talk/default.nix { })
|
||||
]
|
||||
builtins.attrValues {
|
||||
inherit (inputs.jawz-scripts.packages.x86_64-linux)
|
||||
vdhcoapp # video download helper assistant
|
||||
talk # nextcloud talk client
|
||||
;
|
||||
}
|
||||
++ builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
thunderbird # email client
|
||||
|
||||
@ -1,62 +0,0 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
python3,
|
||||
python3Packages,
|
||||
fetchFromGitHub,
|
||||
meson,
|
||||
appstream-glib,
|
||||
pkg-config,
|
||||
glib,
|
||||
libadwaita,
|
||||
wrapGAppsHook4,
|
||||
desktop-file-utils,
|
||||
ninja,
|
||||
gobject-introspection,
|
||||
gtk4,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finaAttrs: rec {
|
||||
pname = "aviator";
|
||||
version = "0.6.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gianni-rosato";
|
||||
repo = "aviator";
|
||||
rev = version;
|
||||
hash = "sha256-5PjQgCapI9WU4kR0k0uYWnFERYEZxCuTnTbD1oN+Zms=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
appstream-glib
|
||||
meson
|
||||
wrapGAppsHook4
|
||||
pkg-config
|
||||
desktop-file-utils
|
||||
ninja
|
||||
python3Packages.pygobject3
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk4
|
||||
glib
|
||||
libadwaita
|
||||
(python3.withPackages (
|
||||
ps: with ps; [
|
||||
pygobject3
|
||||
ffmpeg-progress-yield
|
||||
ffmpeg-python
|
||||
]
|
||||
))
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "A lightweight, Flatpak-first, easy-to-use GUI utility for encoding with SVT-AV1 & Opus";
|
||||
homepage = "https://github.com/gianni-rosato/aviator";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = with lib.maintainers; [ CaptainJawZ ];
|
||||
mainProgram = "aviator";
|
||||
};
|
||||
})
|
||||
@ -1,41 +0,0 @@
|
||||
{
|
||||
branch,
|
||||
qt6Packages,
|
||||
fetchFromGitLab,
|
||||
fetchurl,
|
||||
}:
|
||||
|
||||
let
|
||||
# Fetched from https://api.citra-emu.org/gamedb
|
||||
# Please make sure to update this when updating citra!
|
||||
compat-list = fetchurl {
|
||||
name = "citra-compat-list";
|
||||
url = "https://web.archive.org/web/20230807103651/https://api.citra-emu.org/gamedb/";
|
||||
hash = "sha256-J+zqtWde5NgK2QROvGewtXGRAWUTNSKHNMG6iu9m1fU=";
|
||||
};
|
||||
in
|
||||
{
|
||||
nightly = qt6Packages.callPackage ./generic.nix (
|
||||
let
|
||||
version = "2104";
|
||||
in
|
||||
{
|
||||
pname = "citra-nightly";
|
||||
inherit
|
||||
version
|
||||
branch
|
||||
compat-list
|
||||
;
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "CaptainJawZ";
|
||||
repo = "Citra-Nightly";
|
||||
rev = "nightly-${version}";
|
||||
sha256 = "0ggi1l8327s43xaxs616g0s9vmal6q7vsv69bn07gp71gchhcmyi";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
.${branch}
|
||||
@ -1,141 +0,0 @@
|
||||
{
|
||||
pname,
|
||||
version,
|
||||
branch,
|
||||
compat-list,
|
||||
src,
|
||||
lib,
|
||||
stdenv,
|
||||
cmake,
|
||||
boost,
|
||||
pkg-config,
|
||||
libusb1,
|
||||
glslang,
|
||||
zstd,
|
||||
libressl,
|
||||
enableSdl2 ? true,
|
||||
SDL2,
|
||||
enableQt ? true,
|
||||
qtbase,
|
||||
qtmultimedia,
|
||||
wrapQtAppsHook,
|
||||
enableQtTranslation ? enableQt,
|
||||
qttools,
|
||||
enableWebService ? true,
|
||||
enableCubeb ? true,
|
||||
cubeb,
|
||||
enableFfmpegAudioDecoder ? true,
|
||||
enableFfmpegVideoDumper ? true,
|
||||
ffmpeg_4,
|
||||
useDiscordRichPresence ? true,
|
||||
rapidjson,
|
||||
enableFdk ? false,
|
||||
fdk_aac,
|
||||
python3,
|
||||
}:
|
||||
assert lib.assertMsg (
|
||||
!enableFfmpegAudioDecoder || !enableFdk
|
||||
) "Can't enable both enableFfmpegAudioDecoder and enableFdk";
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit pname version src;
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
glslang
|
||||
pkg-config
|
||||
python3
|
||||
] ++ lib.optionals enableQt [ wrapQtAppsHook ];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
boost
|
||||
libusb1
|
||||
]
|
||||
++ lib.optionals enableQt [
|
||||
qtbase
|
||||
qtmultimedia
|
||||
]
|
||||
++ lib.optional enableSdl2 SDL2
|
||||
++ lib.optional enableQtTranslation qttools
|
||||
++ lib.optionals enableCubeb cubeb.passthru.backendLibs
|
||||
++ lib.optional (enableFfmpegAudioDecoder || enableFfmpegVideoDumper) ffmpeg_4
|
||||
++ lib.optional useDiscordRichPresence rapidjson
|
||||
++ lib.optional enableFdk fdk_aac;
|
||||
|
||||
cmakeFlags =
|
||||
[
|
||||
"-DUSE_SYSTEM_BOOST=ON"
|
||||
"-DCITRA_WARNINGS_AS_ERRORS=OFF"
|
||||
"-DCITRA_USE_BUNDLED_FFMPEG=OFF"
|
||||
"-DCITRA_USE_BUNDLED_QT=OFF"
|
||||
"-DUSE_SYSTEM_SDL2=ON"
|
||||
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
||||
"-DCMAKE_INSTALL_LIBDIR=lib"
|
||||
|
||||
# We dont want to bother upstream with potentially outdated compat reports
|
||||
"-DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON"
|
||||
"-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF" # We provide this deterministically
|
||||
]
|
||||
++ lib.optional (!enableSdl2) "-DENABLE_SDL2=OFF"
|
||||
++ lib.optional (!enableQt) "-DENABLE_QT=OFF"
|
||||
++ lib.optional enableQtTranslation "-DENABLE_QT_TRANSLATION=ON"
|
||||
++ lib.optional (!enableWebService) "-DENABLE_WEB_SERVICE=OFF"
|
||||
++ lib.optional (!enableCubeb) "-DENABLE_CUBEB=OFF"
|
||||
++ lib.optional enableFfmpegAudioDecoder "-DENABLE_FFMPEG_AUDIO_DECODER=ON"
|
||||
++ lib.optional enableFfmpegVideoDumper "-DENABLE_FFMPEG_VIDEO_DUMPER=ON"
|
||||
++ lib.optional useDiscordRichPresence "-DUSE_DISCORD_PRESENCE=ON"
|
||||
++ lib.optional enableFdk "-DENABLE_FDK=ON";
|
||||
|
||||
postPatch =
|
||||
let
|
||||
branchCaptialized = lib.toUpper (lib.substring 0 1 branch) + lib.substring 1 (-1) branch;
|
||||
in
|
||||
''
|
||||
# Fix file not found when looking in var/empty instead of opt
|
||||
mkdir externals/dynarmic/src/dynarmic/ir/var
|
||||
ln -s ../opt externals/dynarmic/src/dynarmic/ir/var/empty
|
||||
|
||||
# Prep compatibilitylist
|
||||
ln -s ${compat-list} ./dist/compatibility_list/compatibility_list.json
|
||||
|
||||
# We already know the submodules are present
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "check_submodules_present()" ""
|
||||
|
||||
# Add versions
|
||||
echo 'set(BUILD_FULLNAME "${branchCaptialized} ${version}")' >> CMakeModules/GenerateBuildInfo.cmake
|
||||
|
||||
# Devendoring
|
||||
rm -rf externals/zstd externals/libressl
|
||||
cp -r ${zstd.src} externals/zstd
|
||||
tar xf ${libressl.src} -C externals/
|
||||
mv externals/${libressl.name} externals/libressl
|
||||
chmod -R a+w externals/zstd
|
||||
'';
|
||||
|
||||
# Fixes https://github.com/NixOS/nixpkgs/issues/171173
|
||||
postInstall = lib.optionalString (enableCubeb && enableSdl2) ''
|
||||
wrapProgram "$out/bin/citra" \
|
||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath cubeb.passthru.backendLibs}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://citra-emu.org";
|
||||
description = "The ${branch} branch of an open-source emulator for the Ninteno 3DS";
|
||||
longDescription = ''
|
||||
A Nintendo 3DS Emulator written in C++
|
||||
Using the nightly branch is recommended for general usage.
|
||||
Using the canary branch is recommended if you would like to try out
|
||||
experimental features, with a cost of stability.
|
||||
'';
|
||||
mainProgram = if enableQt then "citra-qt" else "citra";
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = with lib.maintainers; [
|
||||
abbradar
|
||||
ashley
|
||||
ivar
|
||||
];
|
||||
};
|
||||
}
|
||||
@ -1,84 +0,0 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p nix nix-prefetch-git coreutils curl jq gnused
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Will be replaced with the actual branch when running this from passthru.updateScript
|
||||
BRANCH="@branch@"
|
||||
|
||||
if [[ ! "$(basename $PWD)" = "citra" ]]; then
|
||||
echo "error: Script must be ran from citra's directory!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
getLocalVersion() {
|
||||
pushd ../../../.. >/dev/null
|
||||
nix eval --raw -f default.nix "$1".version
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
getLocalHash() {
|
||||
pushd ../../../.. >/dev/null
|
||||
nix eval --raw -f default.nix "$1".src.drvAttrs.outputHash
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
updateNightly() {
|
||||
OLD_NIGHTLY_VERSION="$(getLocalVersion "citra-nightly")"
|
||||
OLD_NIGHTLY_HASH="$(getLocalHash "citra-nightly")"
|
||||
|
||||
NEW_NIGHTLY_VERSION="$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
|
||||
"https://api.github.com/repos/citra-emu/citra-nightly/releases?per_page=1" | jq -r '.[0].name' | cut -d"-" -f2 | cut -d" " -f2)"
|
||||
|
||||
if [[ "${OLD_NIGHTLY_VERSION}" = "${NEW_NIGHTLY_VERSION}" ]]; then
|
||||
echo "citra-nightly is already up to date!"
|
||||
|
||||
[ "$KEEP_GOING" ] && return || exit
|
||||
else
|
||||
echo "citra-nightly: ${OLD_NIGHTLY_VERSION} -> ${NEW_NIGHTLY_VERSION}"
|
||||
fi
|
||||
|
||||
echo " Fetching source code..."
|
||||
|
||||
NEW_NIGHTLY_HASH="$(nix-prefetch-git --quiet --fetch-submodules --rev "nightly-${NEW_NIGHTLY_VERSION}" "https://github.com/citra-emu/citra-nightly" | jq -r '.sha256')"
|
||||
|
||||
echo " Successfully fetched. hash: ${NEW_NIGHTLY_HASH}"
|
||||
|
||||
sed -i "s|${OLD_NIGHTLY_VERSION}|${NEW_NIGHTLY_VERSION}|" ./default.nix
|
||||
sed -i "s|${OLD_NIGHTLY_HASH}|${NEW_NIGHTLY_HASH}|" ./default.nix
|
||||
}
|
||||
|
||||
updateCanary() {
|
||||
OLD_CANARY_VERSION="$(getLocalVersion "citra-canary")"
|
||||
OLD_CANARY_HASH="$(getLocalHash "citra-canary")"
|
||||
|
||||
NEW_CANARY_VERSION="$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
|
||||
"https://api.github.com/repos/citra-emu/citra-canary/releases?per_page=1" | jq -r '.[0].name' | cut -d"-" -f2 | cut -d" " -f1)"
|
||||
|
||||
if [[ "${OLD_CANARY_VERSION}" = "${NEW_CANARY_VERSION}" ]]; then
|
||||
echo "citra-canary is already up to date!"
|
||||
|
||||
[ "$KEEP_GOING" ] && return || exit
|
||||
else
|
||||
echo "citra-canary: ${OLD_CANARY_VERSION} -> ${NEW_CANARY_VERSION}"
|
||||
fi
|
||||
|
||||
echo " Fetching source code..."
|
||||
|
||||
NEW_CANARY_HASH="$(nix-prefetch-git --quiet --fetch-submodules --rev "canary-${NEW_CANARY_VERSION}" "https://github.com/citra-emu/citra-canary" | jq -r '.sha256')"
|
||||
|
||||
echo " Successfully fetched. hash: ${NEW_CANARY_HASH}"
|
||||
|
||||
sed -i "s|${OLD_CANARY_VERSION}|${NEW_CANARY_VERSION}|" ./default.nix
|
||||
sed -i "s|${OLD_CANARY_HASH}|${NEW_CANARY_HASH}|" ./default.nix
|
||||
}
|
||||
|
||||
if [[ "$BRANCH" = "nightly" ]]; then
|
||||
updateNightly
|
||||
elif [[ "$BRANCH" = "early-access" ]]; then
|
||||
updateCanary
|
||||
else
|
||||
KEEP_GOING=1
|
||||
updateNightly
|
||||
updateCanary
|
||||
fi
|
||||
@ -1,51 +0,0 @@
|
||||
{
|
||||
stdenv,
|
||||
gsound,
|
||||
libgda6,
|
||||
lib,
|
||||
fetchzip,
|
||||
substituteAll,
|
||||
buildPackages,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnome-shell-extension-pano";
|
||||
version = "23-alpha3";
|
||||
src = fetchzip {
|
||||
url = "https://github.com/oae/gnome-shell-pano/releases/download/v${version}/pano@elhan.io.zip";
|
||||
hash = "sha256-LYpxsl/PC8hwz0ZdH5cDdSZPRmkniBPUCqHQxB4KNhc=";
|
||||
stripRoot = false;
|
||||
};
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./pano_at_elhan.io.patch;
|
||||
inherit gsound libgda6;
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ buildPackages.glib ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
if [ -d schemas ]; then
|
||||
glib-compile-schemas --strict schemas
|
||||
fi
|
||||
runHook postBuild
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/share/gnome-shell/extensions/
|
||||
cp -r -T . $out/share/gnome-shell/extensions/pano@elhan.io
|
||||
runHook postInstall
|
||||
'';
|
||||
meta = {
|
||||
description = "Next-gen Clipboard manager for Gnome Shell";
|
||||
homepage = "https://github.com/oae/gnome-shell-pano";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
passthru = {
|
||||
extensionPortalSlug = "pano";
|
||||
extensionUuid = "pano@elhan.io";
|
||||
};
|
||||
}
|
||||
@ -1,30 +0,0 @@
|
||||
diff --git a/__nix-prepend-search-paths.js b/__nix-prepend-search-paths.js
|
||||
new file mode 100644
|
||||
index 0000000..bf3071b
|
||||
--- /dev/null
|
||||
+++ b/__nix-prepend-search-paths.js
|
||||
@@ -0,0 +1,3 @@
|
||||
+import GIRepository from 'gi://GIRepository';
|
||||
+GIRepository.Repository.prepend_search_path('@gsound@/lib/girepository-1.0');
|
||||
+GIRepository.Repository.prepend_search_path('@libgda6@/lib/girepository-1.0');
|
||||
diff --git a/extension.js b/extension.js
|
||||
index a3d6741..6a38850 100644
|
||||
--- a/extension.js
|
||||
+++ b/extension.js
|
||||
@@ -1,3 +1,4 @@
|
||||
+import './__nix-prepend-search-paths.js';
|
||||
import Gio from 'gi://Gio';
|
||||
import GLib from 'gi://GLib';
|
||||
import Shell from 'gi://Shell';
|
||||
diff --git a/prefs.js b/prefs.js
|
||||
index 5dd94eb..634b2ef 100644
|
||||
--- a/prefs.js
|
||||
+++ b/prefs.js
|
||||
@@ -2,6 +2,7 @@
|
||||
import Gdk from 'gi://Gdk';
|
||||
import Gtk from 'gi://Gtk';
|
||||
import Adw from 'gi://Adw';
|
||||
+import './__nix-prepend-search-paths.js';
|
||||
import Gio from 'gi://Gio';
|
||||
import Pango from 'gi://Pango';
|
||||
import GObject from 'gi://GObject';
|
||||
@ -1,187 +0,0 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
ninja,
|
||||
jdk17,
|
||||
ghc_filesystem,
|
||||
zlib,
|
||||
file,
|
||||
xorg,
|
||||
libpulseaudio,
|
||||
openal,
|
||||
qt6,
|
||||
glfw,
|
||||
pciutils,
|
||||
udev,
|
||||
glxinfo,
|
||||
qt6Packages,
|
||||
libGL,
|
||||
flite,
|
||||
addDriverRunpath,
|
||||
vulkan-loader,
|
||||
msaClientID ? null,
|
||||
extra-cmake-modules,
|
||||
makeWrapper,
|
||||
gamemode,
|
||||
mangohud,
|
||||
glfw-wayland-minecraft,
|
||||
writeShellScript,
|
||||
}:
|
||||
|
||||
let
|
||||
polymc =
|
||||
let
|
||||
binpath = lib.makeBinPath [
|
||||
xorg.xrandr
|
||||
glxinfo
|
||||
pciutils
|
||||
];
|
||||
|
||||
libpath = lib.makeLibraryPath [
|
||||
xorg.libX11
|
||||
xorg.libXext
|
||||
xorg.libXcursor
|
||||
xorg.libXrandr
|
||||
xorg.libXxf86vm
|
||||
libpulseaudio
|
||||
libGL
|
||||
vulkan-loader
|
||||
glfw
|
||||
openal
|
||||
udev
|
||||
flite
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
|
||||
gameLibraryPath = libpath + ":${addDriverRunpath.driverLink}/lib";
|
||||
|
||||
in
|
||||
stdenv.mkDerivation (
|
||||
let
|
||||
version = "6.1";
|
||||
in
|
||||
{
|
||||
pname = "polymc" + (lib.optionalString ((lib.versions.major qt6.qtbase.version) == "5") "-qt5");
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "PolyMC";
|
||||
repo = "PolyMC";
|
||||
rev = version;
|
||||
sha256 = "sha256-AOy13zAWQ0CtsX9z1M+fxH7Sh/QSFy7EdQ/fD9yUYc8=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
dontWrapQtApps = true;
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
extra-cmake-modules
|
||||
ninja
|
||||
jdk17
|
||||
qt6.wrapQtAppsHook
|
||||
file
|
||||
ghc_filesystem
|
||||
];
|
||||
buildInputs = [
|
||||
qt6.qtbase
|
||||
qt6.qtsvg
|
||||
qt6.qtcharts
|
||||
qt6.qtwayland
|
||||
qt6Packages.quazip
|
||||
zlib
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-GNinja"
|
||||
"-DLauncher_QT_VERSION_MAJOR=${lib.versions.major qt6.qtbase.version}"
|
||||
] ++ lib.optionals (msaClientID != null) [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ];
|
||||
|
||||
postPatch = ''
|
||||
# hardcode jdk paths
|
||||
substituteInPlace launcher/java/JavaUtils.cpp \
|
||||
--replace 'scanJavaDir("/usr/lib/jvm")' 'javas.append("${jdk17}/lib/openjdk/bin/java")'
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
|
||||
wrapQtApp $out/bin/polymc \
|
||||
--suffix LD_LIBRARY_PATH : "${gameLibraryPath}" \
|
||||
--suffix PATH : "${binpath}" \
|
||||
--set-default ALSOFT_DRIVERS "pulse"
|
||||
'';
|
||||
passthru = {
|
||||
|
||||
wrap =
|
||||
{
|
||||
extraJDKs ? [ ],
|
||||
extraPaths ? [ ],
|
||||
extraLibs ? [ ],
|
||||
withWaylandGLFW ? false,
|
||||
withMangohud ? true,
|
||||
withGamemode ? true,
|
||||
}:
|
||||
stdenv.mkDerivation (
|
||||
let
|
||||
libsPath =
|
||||
(lib.makeLibraryPath (extraLibs ++ lib.optional withGamemode gamemode.lib))
|
||||
+ lib.optionalString withMangohud "${mangohud + "/lib/mangohud"}";
|
||||
binsPath = lib.makeBinPath (extraPaths ++ lib.optional withMangohud mangohud);
|
||||
waylandPreExec = writeShellScript "waylandGLFW" ''
|
||||
if [ -n "$WAYLAND_DISPLAY" ]; then
|
||||
export LD_LIBRARY_PATH=${lib.getLib glfw-wayland-minecraft}/lib:"$LD_LIBRARY_PATH"
|
||||
fi
|
||||
'';
|
||||
in
|
||||
{
|
||||
pname = "${polymc.pname}-wrapped";
|
||||
inherit (polymc) version;
|
||||
inherit libsPath binsPath waylandPreExec;
|
||||
|
||||
src = polymc;
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
phases = [
|
||||
"installPhase"
|
||||
"fixupPhase"
|
||||
];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
ln -s $src/bin/polymc $out/bin/polymc
|
||||
ln -s $src/share $out/share
|
||||
'';
|
||||
|
||||
postFixup =
|
||||
let
|
||||
javaPaths = lib.makeSearchPath "bin/java" extraJDKs;
|
||||
in
|
||||
''
|
||||
wrapProgram $out/bin/polymc \
|
||||
--suffix LD_LIBRARY_PATH : "${libsPath}" \
|
||||
--suffix POLYMC_JAVA_PATHS : "${javaPaths}" \
|
||||
--suffix PATH : "${binsPath}" ${lib.optionalString withWaylandGLFW "--run ${waylandPreExec}"}
|
||||
|
||||
'';
|
||||
|
||||
preferLocalBuild = true;
|
||||
inherit (polymc) meta;
|
||||
|
||||
}
|
||||
);
|
||||
};
|
||||
meta = {
|
||||
homepage = "https://polymc.org/";
|
||||
downloadPage = "https://polymc.org/download/";
|
||||
changelog = "https://github.com/PolyMC/PolyMC/releases";
|
||||
description = "A free, open source launcher for Minecraft";
|
||||
longDescription = ''
|
||||
Allows you to have multiple, separate instances of Minecraft (each with
|
||||
their own mods, texture packs, saves, etc) and helps you manage them and
|
||||
their associated options with a simple interface.
|
||||
'';
|
||||
platforms = [ "x86_64-linux" ];
|
||||
license = lib.licenses.gpl3Only;
|
||||
};
|
||||
}
|
||||
);
|
||||
in
|
||||
polymc
|
||||
@ -1,69 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
requireFile,
|
||||
buildFHSEnv,
|
||||
unzip,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.8.0";
|
||||
|
||||
super-mario-127 = stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "super-mario-127";
|
||||
inherit version;
|
||||
|
||||
src = requireFile {
|
||||
name = "SuperMario127v${finalAttrs.version}Linux.zip";
|
||||
url = "https://charpurrr.itch.io/super-mario-127";
|
||||
hash = "sha256-l713xdEvwnOV8OMyDQ4/qU7VMj/uDViAJR5gl+R/vCU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,opt/super-mario-127}
|
||||
unzip $src -d $out/opt/super-mario-127
|
||||
chmod +x $out/opt/super-mario-127/Super_Mario_127v${finalAttrs.version}.x86_64
|
||||
ln -s $out/opt/super-mario-127/Super_Mario_127v${finalAttrs.version}.x86_64 $out/bin/super-mario-127
|
||||
'';
|
||||
});
|
||||
in
|
||||
|
||||
buildFHSEnv {
|
||||
pname = "super-mario-127";
|
||||
inherit version;
|
||||
|
||||
targetPkgs =
|
||||
pkgs:
|
||||
[ super-mario-127 ]
|
||||
++ builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
alsa-lib
|
||||
libGL
|
||||
pulseaudio
|
||||
udev
|
||||
;
|
||||
inherit (pkgs.xorg)
|
||||
libX11
|
||||
libXcursor
|
||||
libXext
|
||||
libXi
|
||||
libXinerama
|
||||
libXrandr
|
||||
libXrender
|
||||
;
|
||||
};
|
||||
|
||||
runScript = "super-mario-127";
|
||||
|
||||
meta = {
|
||||
description = "Fan sequel to Super Mario 63";
|
||||
homepage = "https://charpurrr.itch.io/super-mario-127";
|
||||
license = lib.licenses.unfree;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ federicoschonborn ];
|
||||
};
|
||||
}
|
||||
@ -1,89 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchzip,
|
||||
autoPatchelfHook,
|
||||
nss,
|
||||
cairo,
|
||||
xorg,
|
||||
libxkbcommon,
|
||||
alsa-lib,
|
||||
at-spi2-core,
|
||||
mesa,
|
||||
pango,
|
||||
libdrm,
|
||||
vivaldi-ffmpeg-codecs,
|
||||
gtk3,
|
||||
libGL,
|
||||
libglvnd,
|
||||
systemd,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "nextcloud-talk-desktop";
|
||||
version = "1.0.0";
|
||||
|
||||
# Building from source would require building also building Server and Talk components
|
||||
# See https://github.com/nextcloud/talk-desktop?tab=readme-ov-file#%EF%B8%8F-prerequisites
|
||||
src = fetchzip {
|
||||
url = "https://github.com/nextcloud-releases/talk-desktop/releases/download/v${finalAttrs.version}/Nextcloud.Talk-linux-x64.zip";
|
||||
hash = "sha256-XQa4Fa9eEaFlYrWa00S9aMWKJOPPFGSo4NAlRqE23jM=";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
nss
|
||||
cairo
|
||||
alsa-lib
|
||||
at-spi2-core
|
||||
pango
|
||||
libdrm
|
||||
libxkbcommon
|
||||
gtk3
|
||||
vivaldi-ffmpeg-codecs
|
||||
mesa
|
||||
libGL
|
||||
libglvnd
|
||||
]
|
||||
++ (with xorg; [
|
||||
libX11
|
||||
libXcomposite
|
||||
libXdamage
|
||||
libXrandr
|
||||
libXfixes
|
||||
libXcursor
|
||||
]);
|
||||
|
||||
# Required to launch the application and proceed past the zygote_linux fork() process
|
||||
# Fixes `Zygote could not fork`
|
||||
runtimeDependencies = [ systemd ];
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/opt
|
||||
|
||||
cp -r $src/* $out/opt/
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
# Link the application in $out/bin away from contents of `preInstall`
|
||||
ln -s "$out/opt/Nextcloud Talk-linux-x64/Nextcloud Talk" $out/bin/nextcloud-talk-desktop
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Nextcloud Talk Desktop Client";
|
||||
homepage = "https://github.com/nextcloud/talk-desktop";
|
||||
changelog = "https://github.com/nextcloud/talk-desktop/blob/${finalAttrs.version}/CHANGELOG.md";
|
||||
license = licenses.agpl3Only;
|
||||
maintainers = with maintainers; [ kashw2 ];
|
||||
mainProgram = "nextcloud-talk-desktop";
|
||||
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
||||
};
|
||||
})
|
||||
@ -1,46 +0,0 @@
|
||||
diff --git a/src/converter.js b/src/converter.js
|
||||
index af7b4c3..20da407 100644
|
||||
--- a/src/converter.js
|
||||
+++ b/src/converter.js
|
||||
@@ -1,4 +1,4 @@
|
||||
-import open from 'open';
|
||||
+function open() {}
|
||||
|
||||
const os = require("os");
|
||||
const path = require('path');
|
||||
@@ -9,9 +9,9 @@ const rpc = require('./weh-rpc');
|
||||
|
||||
const exec_dir = path.dirname(process.execPath);
|
||||
|
||||
-const ffmpeg = findExecutableFullPath("ffmpeg", exec_dir);
|
||||
-const ffprobe = findExecutableFullPath("ffprobe", exec_dir);
|
||||
-const filepicker = findExecutableFullPath("filepicker", exec_dir);
|
||||
+const ffmpeg = "@ffmpeg@/bin/ffmpeg";
|
||||
+const ffprobe = "@ffmpeg@/bin/ffprobe";
|
||||
+const filepicker = "@filepicker@";
|
||||
|
||||
if (!fileExistsSync(ffmpeg)) {
|
||||
logger.error("ffmpeg not found. Install ffmpeg and make sure it's in your path.");
|
||||
diff --git a/src/main.js b/src/main.js
|
||||
index 47b92de..e2e9402 100644
|
||||
--- a/src/main.js
|
||||
+++ b/src/main.js
|
||||
@@ -1,4 +1,4 @@
|
||||
-const config = require('config.json');
|
||||
+const config = require('./config.json');
|
||||
const converter = require('./converter');
|
||||
const os = require("os");
|
||||
|
||||
diff --git a/src/native-autoinstall.js b/src/native-autoinstall.js
|
||||
index 556a22b..c729568 100644
|
||||
--- a/src/native-autoinstall.js
|
||||
+++ b/src/native-autoinstall.js
|
||||
@@ -1,7 +1,7 @@
|
||||
const os = require("os");
|
||||
const path = require("path");
|
||||
const { spawn, exec } = require('child_process');
|
||||
-const config = require('config.json');
|
||||
+const config = require('./config.json');
|
||||
|
||||
let fs;
|
||||
if (process.versions.node.startsWith("10")) {
|
||||
@ -1,79 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
buildNpmPackage,
|
||||
toml2json,
|
||||
nodejs,
|
||||
ffmpeg,
|
||||
substituteAll,
|
||||
makeWrapper,
|
||||
callPackage,
|
||||
}:
|
||||
|
||||
# This is an adaptation with buildNpmPackage based on https://github.com/milahu/nur-packages/commit/3022ffb3619182ffcd579194e1202e3978e4d55b
|
||||
|
||||
let
|
||||
filepicker = callPackage ./filepicker.nix { };
|
||||
in
|
||||
buildNpmPackage (
|
||||
let
|
||||
version = "2.0.19";
|
||||
pname = "vdhcoapp";
|
||||
src = fetchFromGitHub {
|
||||
owner = "aclap-dev";
|
||||
repo = "${pname}";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-8xeZvqpRq71aShVogiwlVD3gQoPGseNOmz5E3KbsZxU=";
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit pname version src;
|
||||
|
||||
sourceRoot = "${src.name}/app";
|
||||
npmDepsHash = "sha256-E032U2XZdyTER6ROkBosOTn7bweDXHl8voC3BQEz8Wg=";
|
||||
dontNpmBuild = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
toml2json
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = builtins.path {
|
||||
path = ./code.patch;
|
||||
name = "${src.name}-patch";
|
||||
};
|
||||
inherit ffmpeg;
|
||||
filepicker = lib.getExe filepicker;
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Cannot use patch, setting placeholder here
|
||||
substituteInPlace src/native-autoinstall.js \
|
||||
--replace process.execPath "\"${placeholder "out"}/bin/vdhcoapp\""
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
toml2json --pretty ../config.toml > src/config.json
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/opt/vdhcoapp
|
||||
|
||||
cp -r . "$out/opt/vdhcoapp"
|
||||
|
||||
makeWrapper ${nodejs}/bin/node $out/bin/vdhcoapp \
|
||||
--add-flags $out/opt/vdhcoapp/src/main.js
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Companion application for the Video DownloadHelper browser add-on";
|
||||
homepage = "https://www.downloadhelper.net/";
|
||||
license = lib.licenses.gpl2;
|
||||
maintainers = [ lib.maintainers.wolfangaukang ];
|
||||
mainProgram = "vdhcoapp";
|
||||
};
|
||||
}
|
||||
)
|
||||
@ -1,44 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
pkg-config,
|
||||
atk,
|
||||
gtk3,
|
||||
glib,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage (
|
||||
let
|
||||
version = "1.0.1";
|
||||
in
|
||||
{
|
||||
pname = "filepicker";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "paulrouget";
|
||||
repo = "static-filepicker";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-7sRzf3SA9RSBf4O36olXgka8c6Bufdb0qsuTofVe55s=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-aal7ppFkCpNc+QTS4Qklsb9WfJ65QqG6p1eOskiX+/Q=";
|
||||
|
||||
buildInputs = [
|
||||
atk
|
||||
gtk3
|
||||
glib
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
meta = {
|
||||
description = "File picker used by VDHCoApp";
|
||||
homepage = "https://github.com/paulrouget/static-filepicker";
|
||||
license = lib.licenses.gpl2;
|
||||
mainProgram = "filepicker";
|
||||
maintainers = [ lib.maintainers.hannesgith ];
|
||||
};
|
||||
}
|
||||
)
|
||||
Loading…
x
Reference in New Issue
Block a user