20 , autoSignDarwinBinariesHook
23 buildDotnetModule rec {
24 pname = "avalonia-ilspy";
27 src = fetchFromGitHub {
28 owner = "icsharpcode";
29 repo = "AvaloniaILSpy";
31 sha256 = "cCQy5cSpJNiVZqgphURcnraEM0ZyXGhzJLb5AThNfPQ=";
35 # Remove dead nuget package source
36 ./remove-broken-sources.patch
42 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ bintools fixDarwinDylibNames ]
43 ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ autoSignDarwinBinariesHook ];
46 # Dependencies of nuget packages w/ native binaries
47 (lib.getLib stdenv.cc.cc)
65 icotool --icon -x ILSpy/ILSpy.ico
66 for i in 16 32 48 256; do
68 install -Dm444 *_''${size}x32.png $out/share/icons/hicolor/$size/apps/ILSpy.png
70 '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
71 install -Dm444 ILSpy/Info.plist $out/Applications/ILSpy.app/Contents/Info.plist
72 install -Dm444 ILSpy/ILSpy.icns $out/Applications/ILSpy.app/Contents/Resources/ILSpy.icns
73 mkdir -p $out/Applications/ILSpy.app/Contents/MacOS
74 ln -s $out/bin/ILSpy $out/Applications/ILSpy.app/Contents/MacOS/ILSpy
77 dotnet-sdk = dotnetCorePackages.sdk_6_0;
78 dotnet-runtime = dotnetCorePackages.runtime_6_0;
80 projectFile = "ILSpy/ILSpy.csproj";
81 nugetDeps = ./deps.nix;
82 executables = [ "ILSpy" ];
87 desktopName = "ILSpy";
90 comment = ".NET assembly browser and decompiler";
103 description = ".NET assembly browser and decompiler";
104 homepage = "https://github.com/icsharpcode/AvaloniaILSpy";
105 license = with licenses; [
107 # third party dependencies
111 sourceProvenance = with sourceTypes; [ fromSource binaryBytecode binaryNativeCode ];
112 maintainers = with maintainers; [ AngryAnt emilytrau ];
113 mainProgram = "ILSpy";