Commit e6c700ed authored by David McFarland's avatar David McFarland
Browse files

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

parent cc9c59c4
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -5,9 +5,6 @@
, dotnetCorePackages
, dbus
, fontconfig
, libICE
, libSM
, libX11
, portaudio
}:

@@ -32,9 +29,6 @@ buildDotnetModule rec {

  runtimeDeps = [
    dbus
    libICE
    libSM
    libX11
    portaudio
  ];

+1 −7
Original line number Diff line number Diff line
@@ -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 ])}"
  ];
+35 −14
Original line number Diff line number Diff line
@@ -3,7 +3,11 @@
  dotnetCorePackages,
  fontconfig,
  lib,
  libICE,
  libSM,
  libX11,
  stdenv,
  writeText,
}:
{
  # e.g.
@@ -13,9 +17,25 @@
  #     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: {
    package.overrideAttrs (
      old:
      lib.optionalAttrs stdenv.isLinux {
        nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ autoPatchelfHook ];

        buildInputs = old.buildInputs or [ ] ++ [ fontconfig ];
@@ -30,5 +50,6 @@
            done
            cd - >/dev/null
          '';
    });
      }
    );
}
+0 −9
Original line number Diff line number Diff line
@@ -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 = [
+0 −6
Original line number Diff line number Diff line
@@ -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
Loading