Skip to content

Commit

Permalink
dotnetCorePackages.fetchNupkg: override avalonia to include upstream fix
Browse files Browse the repository at this point in the history
Backport AvaloniaUI/Avalonia#16835 to versions
11.1.0 through 11.2.0-beta1
  • Loading branch information
MattSturgeon committed Sep 7, 2024
1 parent d3ab1ec commit c63e78f
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions pkgs/build-support/dotnet/fetch-nupkg/overrides.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
autoPatchelfHook,
dotnetCorePackages,
dos2unix,
fetchpatch,
fontconfig,
lib,
libICE,
Expand All @@ -17,6 +19,48 @@
# buildInputs = old.buildInputs or [ ] ++ [ hello ];
# });

"Avalonia" =
package:
package.overrideAttrs (
old:
let
inherit (old) version;
in
# Versions between 11.1.0 and 11.2.0-beta1 (inclusive) need #16835
lib.optionalAttrs
(
builtins.compareVersions version "11.1.0" >= 0
&& (lib.versionOlder version "11.2.0" || version == "11.2.0-beta1")
)
{
patches = [
(fetchpatch {
url = "https://github.com/AvaloniaUI/Avalonia/pull/16835.patch";
hash = "sha256-gJkCOHbfsydlgjavTgVNhOSUVQ79TEr6h4ETunAZWuw=";
})
];

patchFlags = [
"--ignore-whitespace"
"--strip=3"
];

prePatch = ''
cd build
dos2unix AvaloniaBuildTasks.targets
'';

postPatch = ''
unix2dos AvaloniaBuildTasks.targets
cd ..
'';

nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [
dos2unix
];
}
);

"Avalonia.X11" =
package:
package.overrideAttrs (
Expand Down

0 comments on commit c63e78f

Please sign in to comment.