Update
This commit is contained in:
parent
0c1be27fe1
commit
47b2e7664a
4 changed files with 312 additions and 0 deletions
68
etc/nixos/modules/pkgs/lutris-gamepad-ui/default.nix
Normal file
68
etc/nixos/modules/pkgs/lutris-gamepad-ui/default.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
let
|
||||
lutrisUnwrapped = pkgs.lutris-unwrapped;
|
||||
|
||||
lutrisPythonPatched = pkgs.runCommand "lutris-python-patched" {} ''
|
||||
cp -r ${lutrisUnwrapped}/lib $out
|
||||
chmod -R +w $out
|
||||
mkdir -p $out/lib/${pkgs.python3.libPrefix}/site-packages/share
|
||||
ln -s ${lutrisUnwrapped}/share/lutris $out/lib/${pkgs.python3.libPrefix}/site-packages/share/lutris
|
||||
'';
|
||||
|
||||
pythonEnv = pkgs.python3.withPackages (ps: [
|
||||
ps.pygobject3
|
||||
ps.dbus-python
|
||||
ps.pyyaml
|
||||
]);
|
||||
|
||||
pythonPath = pkgs.lib.concatStringsSep ":" [
|
||||
"${lutrisPythonPatched}/lib/${pkgs.python3.libPrefix}/site-packages"
|
||||
"${pythonEnv}/${pythonEnv.sitePackages}"
|
||||
];
|
||||
|
||||
extraPkgsList = with pkgs; [
|
||||
lutrisUnwrapped
|
||||
gobject-introspection
|
||||
glib
|
||||
gtk3
|
||||
pango
|
||||
harfbuzz
|
||||
gdk-pixbuf
|
||||
at-spi2-core
|
||||
pulseaudio
|
||||
bluez
|
||||
];
|
||||
|
||||
girepositoryPath = pkgs.lib.makeSearchPath "lib/girepository-1.0" extraPkgsList;
|
||||
|
||||
pythonWrapper = pkgs.writeShellScriptBin "python3" ''
|
||||
export PYTHONPATH="${pythonPath}''${PYTHONPATH:+:$PYTHONPATH}"
|
||||
export GI_TYPELIB_PATH="${girepositoryPath}''${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
|
||||
exec ${pkgs.python3}/bin/python3 "$@"
|
||||
'';
|
||||
|
||||
in pkgs.appimageTools.wrapType2 {
|
||||
pname = "lutris-gamepad-ui";
|
||||
version = "0.1.32";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://github.com/andrew-ld/lutris-gamepad-ui/releases/download/v0.1.32/lutris-gamepad-ui-x64.AppImage";
|
||||
hash = "sha256-68j04sSnDtoNZfCGRmWpq0xcy8F1xBEDPqFIuTwYcEo=";
|
||||
};
|
||||
|
||||
extraPkgs = _: extraPkgsList ++ [ pythonWrapper ];
|
||||
|
||||
extraInstallCommands = ''
|
||||
fhsrootfs=$(grep -o '/nix/store/[^-]*-[^/]*-fhsenv-rootfs' $out/bin/lutris-gamepad-ui | head -1)
|
||||
typelib_path="${girepositoryPath}:$fhsrootfs/usr/lib/girepository-1.0:$fhsrootfs/usr/lib64/girepository-1.0"
|
||||
wrapper_bin="${pythonWrapper}/bin"
|
||||
|
||||
# Write a preamble script then reconstruct the wrapper
|
||||
head -n -1 $out/bin/lutris-gamepad-ui > /tmp/wrapper_new.sh
|
||||
echo "export PATH=\"$wrapper_bin:\$PATH\"" >> /tmp/wrapper_new.sh
|
||||
echo "export GI_TYPELIB_PATH=\"$typelib_path\"" >> /tmp/wrapper_new.sh
|
||||
tail -n 1 $out/bin/lutris-gamepad-ui >> /tmp/wrapper_new.sh
|
||||
chmod +x /tmp/wrapper_new.sh
|
||||
cp /tmp/wrapper_new.sh $out/bin/lutris-gamepad-ui
|
||||
'';
|
||||
}
|
||||
113
etc/nixos/modules/pkgs/vital-stable/default.nix
Normal file
113
etc/nixos/modules/pkgs/vital-stable/default.nix
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
{ lib, stdenv, fetchzip, fetchurl, autoPatchelfHook, makeBinaryWrapper
|
||||
, alsa-lib, libjack2, curl, xorg, libGL, freetype, zenity, makeDesktopItem
|
||||
, copyDesktopItems, libsecret, glib, gnutls, dpkg, nettle, libidn2, nghttp2
|
||||
, libpsl, zlib, zstd, brotli, openldap, libkrb5, rtmpdump, libssh2, libssh }:
|
||||
let
|
||||
icon = fetchurl {
|
||||
url = "https://vital.audio/images/apple_touch_icon.png";
|
||||
hash = "sha256-NZ/AQ2gjBXUPUj3ITbowD7HuxRmEDuATOWidLqLNrww=";
|
||||
};
|
||||
|
||||
# Fetch libcurl-gnutls from Ubuntu Noble package
|
||||
libcurlGnutls = stdenv.mkDerivation {
|
||||
name = "libcurl-gnutls";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://security.ubuntu.com/ubuntu/pool/main/c/curl/libcurl3t64-gnutls_8.5.0-2ubuntu10.6_amd64.deb";
|
||||
sha256 = "38167d8ff4c180eceb0afb1a9bd3f343b07f87308894dd86866c5b1a3c14eebd";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ dpkg autoPatchelfHook ];
|
||||
buildInputs = [ gnutls nettle libidn2 nghttp2 libpsl zlib zstd brotli
|
||||
openldap libkrb5 rtmpdump libssh2 libssh stdenv.cc.cc.lib ];
|
||||
|
||||
unpackPhase = ''
|
||||
dpkg-deb -x $src .
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cp -P usr/lib/x86_64-linux-gnu/libcurl-gnutls.so* $out/lib/
|
||||
'';
|
||||
};
|
||||
in stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "vital";
|
||||
version = "1.0.7";
|
||||
|
||||
src = fetchzip {
|
||||
url =
|
||||
"https://builds.vital.audio/VitalAudio/vital/${builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version}/VitalInstaller.zip";
|
||||
hash = "sha256-qnkyoFRnA78B/5q1oBjOBqqOXG9C3XvICjKspEa+Ids=";
|
||||
};
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
type = "Application";
|
||||
name = "vital";
|
||||
desktopName = "Vital";
|
||||
comment = "Spectral warping wavetable synth";
|
||||
icon = "Vital";
|
||||
exec = "Vital";
|
||||
categories = [ "Audio" "AudioVideo" ];
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs =
|
||||
[ autoPatchelfHook makeBinaryWrapper copyDesktopItems ];
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
(lib.getLib stdenv.cc.cc)
|
||||
libGL
|
||||
xorg.libSM
|
||||
xorg.libICE
|
||||
xorg.libX11
|
||||
freetype
|
||||
libjack2
|
||||
libsecret
|
||||
glib
|
||||
libcurlGnutls
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm444 ${icon} $out/share/pixmaps/Vital.png
|
||||
|
||||
# fetchzip strips the top-level directory, so files are directly accessible
|
||||
# Install standalone binary
|
||||
install -Dm755 vital $out/bin/Vital
|
||||
|
||||
# Install VST2
|
||||
mkdir -p $out/lib/vst
|
||||
cp Vital.so $out/lib/vst/Vital.so
|
||||
|
||||
# Install VST3
|
||||
mkdir -p $out/lib/vst3
|
||||
cp -r Vital.vst3 $out/lib/vst3/
|
||||
|
||||
# Install LV2
|
||||
mkdir -p $out/lib/lv2
|
||||
cp -r Vital.lv2 $out/lib/lv2/
|
||||
|
||||
wrapProgram $out/bin/Vital \
|
||||
--prefix LD_LIBRARY_PATH : "${libcurlGnutls}/lib:${
|
||||
lib.makeLibraryPath [ libjack2 ]
|
||||
}" \
|
||||
--prefix PATH : "${lib.makeBinPath [ zenity ]}"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Spectral warping wavetable synth";
|
||||
homepage = "https://vital.audio/";
|
||||
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
||||
license = lib.licenses.unfree; # https://vital.audio/eula/
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with lib.maintainers; [ PowerUser64 l1npengtul ];
|
||||
mainProgram = "Vital";
|
||||
};
|
||||
})
|
||||
64
etc/nixos/modules/pkgs/xwayland-satellite/default.nix
Normal file
64
etc/nixos/modules/pkgs/xwayland-satellite/default.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, libxcb
|
||||
, makeBinaryWrapper
|
||||
, nix-update-script
|
||||
, pkg-config
|
||||
, rustPlatform
|
||||
, xcb-util-cursor
|
||||
, xwayland
|
||||
, withSystemd ? true
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "xwayland-satellite";
|
||||
version = "0.8.0-a879e5e0896a326adc79c474bf457b8b99011027";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Supreeeme";
|
||||
repo = "xwayland-satellite";
|
||||
rev = "a879e5e0896a326adc79c474bf457b8b99011027";
|
||||
hash = "sha256-wToKwH7IgWdGLMSIWksEDs4eumR6UbbsuPQ42r0oTXQ=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-jbEihJYcOwFeDiMYlOtaS8GlunvSze80iWahDj1qDrs=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeBinaryWrapper
|
||||
pkg-config
|
||||
rustPlatform.bindgenHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libxcb
|
||||
xcb-util-cursor
|
||||
];
|
||||
|
||||
buildNoDefaultFeatures = true;
|
||||
buildFeatures = lib.optional withSystemd "systemd";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
postInstall = lib.optionalString withSystemd ''
|
||||
install -Dm0644 resources/xwayland-satellite.service -t $out/lib/systemd/user
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/xwayland-satellite \
|
||||
--prefix PATH : "${lib.makeBinPath [ xwayland ]}"
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "xwayland-satellite with XSETTINGS crash fix";
|
||||
longDescription = ''
|
||||
Grants rootless Xwayland integration to any Wayland compositor implementing xdg_wm_base.
|
||||
This version includes a fix for XSETTINGS-related crashes with Electron applications.
|
||||
'';
|
||||
homepage = "https://github.com/Supreeeme/xwayland-satellite";
|
||||
license = lib.licenses.mpl20;
|
||||
mainProgram = "xwayland-satellite";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
67
etc/nixos/modules/pkgs/xwayland-satellite/default.nix.bak
Normal file
67
etc/nixos/modules/pkgs/xwayland-satellite/default.nix.bak
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, libxcb
|
||||
, makeBinaryWrapper
|
||||
, nix-update-script
|
||||
, pkg-config
|
||||
, rustPlatform
|
||||
, xcb-util-cursor
|
||||
, xwayland
|
||||
, withSystemd ? true
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "xwayland-satellite";
|
||||
version = "0.8.0-fix5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "myNicole98";
|
||||
repo = "xwayland-satellite";
|
||||
# Use 'rev' for a specific commit hash (recommended for reproducibility)
|
||||
rev = "5791082542687dfc0d5d7cb4df24cb4950ae1579";
|
||||
# OR use 'tag' if you want to use a git tag
|
||||
# tag = "v0.8.0-fix";
|
||||
hash = "sha256-uuyvKzKJrR1E6yxnaUYcdugCO/bkhbrZ2Vkov2L6uBU=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-16L6gsvze+m7XCJlOA1lsPNELE3D364ef2FTdkh0rVY=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeBinaryWrapper
|
||||
pkg-config
|
||||
rustPlatform.bindgenHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libxcb
|
||||
xcb-util-cursor
|
||||
];
|
||||
|
||||
buildNoDefaultFeatures = true;
|
||||
buildFeatures = lib.optional withSystemd "systemd";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
postInstall = lib.optionalString withSystemd ''
|
||||
install -Dm0644 resources/xwayland-satellite.service -t $out/lib/systemd/user
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/xwayland-satellite \
|
||||
--prefix PATH : "${lib.makeBinPath [ xwayland ]}"
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "xwayland-satellite with XSETTINGS crash fix";
|
||||
longDescription = ''
|
||||
Grants rootless Xwayland integration to any Wayland compositor implementing xdg_wm_base.
|
||||
This version includes a fix for XSETTINGS-related crashes with Electron applications.
|
||||
'';
|
||||
homepage = "https://github.com/myNicole98/xwayland-satellite";
|
||||
license = lib.licenses.mpl20;
|
||||
mainProgram = "xwayland-satellite";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue