dotnetCorePackages.fetchNupkg: override avalonia.x11 to find native libs

This commit is contained in:
David McFarland 2024-09-04 01:18:41 -03:00
parent cc9c59c478
commit e6c700ed11
14 changed files with 37 additions and 120 deletions

View File

@ -5,9 +5,6 @@
, dotnetCorePackages
, dbus
, fontconfig
, libICE
, libSM
, libX11
, portaudio
}:
@ -32,9 +29,6 @@ buildDotnetModule rec {
runtimeDeps = [
dbus
libICE
libSM
libX11
portaudio
];

View File

@ -2,21 +2,16 @@
, fetchFromGitHub
, buildDotnetModule
, dotnetCorePackages
, libX11
, libICE
, libSM
, libsecret
, git
, git-credential-manager
, gnupg
, pass
, testers
, withGuiSupport ? true
, withLibsecretSupport ? true
, withGpgSupport ? true
}:
assert withLibsecretSupport -> withGuiSupport;
buildDotnetModule rec {
pname = "git-credential-manager";
version = "2.5.1";
@ -36,8 +31,7 @@ buildDotnetModule rec {
executables = [ "git-credential-manager" ];
runtimeDeps =
lib.optionals withGuiSupport [ libX11 libICE libSM ]
++ lib.optional withLibsecretSupport libsecret;
lib.optional withLibsecretSupport libsecret;
makeWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath ([ git ] ++ lib.optionals withGpgSupport [ gnupg pass ])}"
];

View File

@ -3,7 +3,11 @@
dotnetCorePackages,
fontconfig,
lib,
libICE,
libSM,
libX11,
stdenv,
writeText,
}:
{
# e.g.
@ -13,22 +17,39 @@
# buildInputs = old.buildInputs or [ ] ++ [ hello ];
# });
"Avalonia.X11" =
package:
package.overrideAttrs (
old:
lib.optionalAttrs (!stdenv.isDarwin) {
setupHook = writeText "setupHook.sh" ''
prependToVar dotnetRuntimeDeps \
"${lib.getLib libICE}" \
"${lib.getLib libSM}" \
"${lib.getLib libX11}"
'';
}
);
"SkiaSharp.NativeAssets.Linux" =
package:
package.overrideAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ autoPatchelfHook ];
package.overrideAttrs (
old:
lib.optionalAttrs stdenv.isLinux {
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ autoPatchelfHook ];
buildInputs = old.buildInputs or [ ] ++ [ fontconfig ];
buildInputs = old.buildInputs or [ ] ++ [ fontconfig ];
preInstall =
old.preInstall or ""
+ ''
cd runtimes
for platform in *; do
[[ $platform == "${dotnetCorePackages.systemToDotnetRid stdenv.hostPlatform.system}" ]] ||
rm -r "$platform"
done
cd - >/dev/null
'';
});
preInstall =
old.preInstall or ""
+ ''
cd runtimes
for platform in *; do
[[ $platform == "${dotnetCorePackages.systemToDotnetRid stdenv.hostPlatform.system}" ]] ||
rm -r "$platform"
done
cd - >/dev/null
'';
}
);
}

View File

@ -5,10 +5,6 @@
dotnetCorePackages,
libX11,
libICE,
libSM,
xdg-utils,
}:
@ -37,11 +33,6 @@ buildDotnetModule rec {
nugetDeps = ./deps.nix;
runtimeDeps = [
libX11
libICE
libSM
];
# Required for OneClick
makeWrapperArgs = [

View File

@ -6,9 +6,6 @@
dotnetCorePackages,
xz,
pcre,
libX11,
libICE,
libSM,
autoPatchelfHook,
bintools,
fixDarwinDylibNames,
@ -77,9 +74,6 @@ buildDotnetModule rec {
runtimeDeps = [
xz
pcre
libX11
libICE
libSM
libgdiplus
glib
libXrandr

View File

@ -3,7 +3,6 @@
, fetchFromGitHub
, lib
, openal
, xorg
}:
buildDotnetModule rec {
@ -22,7 +21,7 @@ buildDotnetModule rec {
nugetDeps = ./deps.nix;
executables = [ "Knossos.NET" ];
runtimeDeps = [ openal xorg.libX11 xorg.libICE xorg.libSM ];
runtimeDeps = [ openal ];
meta = with lib; {
homepage = "https://github.com/KnossosNET/Knossos.NET";

View File

@ -6,13 +6,6 @@
dotnetCorePackages,
wrapGAppsHook3,
libX11,
libICE,
libSM,
libXi,
libXcursor,
libXext,
libXrandr,
glew,
gtk3,
}:
@ -47,13 +40,6 @@ buildDotnetModule rec {
runtimeDeps = [
# For Avalonia UI
libX11
libICE
libSM
libXi
libXcursor
libXext
libXrandr
glew
# For file dialogs
gtk3

View File

@ -6,9 +6,6 @@
zlib,
icu,
openssl,
libX11,
libICE,
libSM,
icoutils,
copyDesktopItems,
makeDesktopItem,
@ -36,9 +33,6 @@ buildDotnetModule rec {
zlib
icu
openssl
libX11
libICE
libSM
];
nativeBuildInputs = [

View File

@ -7,9 +7,6 @@
fetchFromGitHub,
fontconfig,
lib,
libICE,
libSM,
libX11,
runCommand,
pname ? "nexusmods-app",
}:
@ -62,12 +59,6 @@ buildDotnetModule (finalAttrs: {
runtimeInputs = [ desktop-file-utils ];
runtimeDeps = [
libICE
libSM
libX11
];
executables = [ "NexusMods.App" ];
doCheck = true;

View File

@ -4,10 +4,6 @@
, copyDesktopItems
, makeDesktopItem
, lib
, libX11
, libXcursor
, libICE
, libSM
, runCommandLocal
}:
let
@ -42,13 +38,6 @@ buildDotnetModule {
copyDesktopItems
];
runtimeDeps = [
libX11
libICE
libXcursor
libSM
];
projectFile = [
"RetroSpyX/RetroSpyX.csproj"
"GBPemuX/GBPemuX.csproj"

View File

@ -10,12 +10,6 @@
, sndio
, pulseaudio
, vulkan-loader
, libICE
, libSM
, libXi
, libXcursor
, libXext
, libXrandr
, glew
, libGL
, udev
@ -54,12 +48,6 @@ buildDotnetModule rec {
udev
# Avalonia UI
libICE
libSM
libXi
libXcursor
libXext
libXrandr
glew
# Headless executable

View File

@ -6,13 +6,6 @@
, iconConvTools
, copyDesktopItems
, makeDesktopItem
, libX11
, libICE
, libSM
, libXi
, libXcursor
, libXext
, libXrandr
, glew
, SDL2
, glfw
@ -94,13 +87,6 @@ buildDotnetModule rec {
gdk-pixbuf
# Avalonia UI dependencies.
libX11
libICE
libSM
libXi
libXcursor
libXext
libXrandr
glew
];

View File

@ -3,9 +3,6 @@
, fetchFromGitHub
, glibc
, zlib
, libX11
, libICE
, libSM
, gtk3
, copyDesktopItems
, icoutils
@ -31,9 +28,6 @@ buildDotnetModule rec {
runtimeDeps = [
glibc
zlib
libX11
libICE
libSM
gtk3
];

View File

@ -4,7 +4,6 @@
, dotnet-runtime_8
, buildDotnetModule
, fetchFromGitHub
, xorg
, libglvnd
, makeDesktopItem
, copyDesktopItems
@ -41,9 +40,6 @@ buildDotnetModule rec {
runtimeDeps = [
libglvnd
xorg.libSM
xorg.libICE
xorg.libX11
];
desktopItems = makeDesktopItem {