dotnetCorePackages.fetchNupkg: override skiasharp to find fontconfig

This commit is contained in:
David McFarland 2024-09-03 23:34:56 -03:00
parent 1f6cd35f5e
commit 9a0be2fd28
14 changed files with 30 additions and 25 deletions

View File

@ -32,7 +32,6 @@ buildDotnetModule rec {
runtimeDeps = [
dbus
fontconfig
libICE
libSM
libX11

View File

@ -5,7 +5,6 @@
, libX11
, libICE
, libSM
, fontconfig
, libsecret
, git
, git-credential-manager
@ -36,8 +35,8 @@ buildDotnetModule rec {
dotnetInstallFlags = [ "--framework" "net8.0" ];
executables = [ "git-credential-manager" ];
runtimeDeps = [ fontconfig ]
++ lib.optionals withGuiSupport [ libX11 libICE libSM ]
runtimeDeps =
lib.optionals withGuiSupport [ libX11 libICE libSM ]
++ lib.optional withLibsecretSupport libsecret;
makeWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath ([ git ] ++ lib.optionals withGpgSupport [ gnupg pass ])}"

View File

@ -1,4 +1,10 @@
{ autoPatchelfHook }:
{
autoPatchelfHook,
dotnetCorePackages,
fontconfig,
lib,
stdenv,
}:
{
# e.g.
# "Package.Id" =
@ -6,4 +12,23 @@
# package.overrideAttrs (old: {
# buildInputs = old.buildInputs or [ ] ++ [ hello ];
# });
"SkiaSharp.NativeAssets.Linux" =
package:
package.overrideAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ autoPatchelfHook ];
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
'';
});
}

View File

@ -8,7 +8,6 @@
libX11,
libICE,
libSM,
fontconfig,
xdg-utils,
}:
@ -42,7 +41,6 @@ buildDotnetModule rec {
libX11
libICE
libSM
fontconfig
];
# Required for OneClick

View File

@ -83,7 +83,6 @@ buildDotnetModule rec {
libgdiplus
glib
libXrandr
fontconfig
] ++ lib.optionals stdenv.hostPlatform.isLinux [ blender ];
# there is no "*.so.3" or "*.so.5" in nixpkgs. So ignore the warning

View File

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

View File

@ -13,7 +13,6 @@
libXcursor,
libXext,
libXrandr,
fontconfig,
glew,
gtk3,
}:
@ -55,7 +54,6 @@ buildDotnetModule rec {
libXcursor
libXext
libXrandr
fontconfig
glew
# For file dialogs
gtk3

View File

@ -5,7 +5,6 @@
dotnetCorePackages,
zlib,
icu,
fontconfig,
openssl,
libX11,
libICE,
@ -36,7 +35,6 @@ buildDotnetModule rec {
runtimeDeps = [
zlib
icu
fontconfig
openssl
libX11
libICE

View File

@ -63,7 +63,6 @@ buildDotnetModule (finalAttrs: {
runtimeInputs = [ desktop-file-utils ];
runtimeDeps = [
fontconfig
libICE
libSM
libX11

View File

@ -4,7 +4,6 @@
, copyDesktopItems
, makeDesktopItem
, lib
, fontconfig
, libX11
, libXcursor
, libICE
@ -44,7 +43,6 @@ buildDotnetModule {
];
runtimeDeps = [
fontconfig
libX11
libICE
libXcursor

View File

@ -16,7 +16,6 @@
, libXcursor
, libXext
, libXrandr
, fontconfig
, glew
, libGL
, udev
@ -61,7 +60,6 @@ buildDotnetModule rec {
libXcursor
libXext
libXrandr
fontconfig
glew
# Headless executable

View File

@ -13,7 +13,6 @@
, libXcursor
, libXext
, libXrandr
, fontconfig
, glew
, SDL2
, glfw
@ -102,7 +101,6 @@ buildDotnetModule rec {
libXcursor
libXext
libXrandr
fontconfig
glew
];

View File

@ -6,7 +6,6 @@
, libX11
, libICE
, libSM
, fontconfig
, gtk3
, copyDesktopItems
, icoutils
@ -35,7 +34,6 @@ buildDotnetModule rec {
libX11
libICE
libSM
fontconfig
gtk3
];

View File

@ -4,7 +4,6 @@
, dotnet-runtime_8
, buildDotnetModule
, fetchFromGitHub
, fontconfig
, xorg
, libglvnd
, makeDesktopItem
@ -34,7 +33,7 @@ buildDotnetModule rec {
copyDesktopItems
];
buildInputs = [ stdenv.cc.cc.lib fontconfig ];
buildInputs = [ stdenv.cc.cc.lib ];
postInstall = ''
rm -rf $out/lib/${lib.toLower pname}/runtimes/{*musl*,win*}