pdfstudio: fix hash mismatch (#360194)
[NixPkgs.git] / pkgs / development / tools / ilspycmd / default.nix
blob7ddd12299b8171102b8ff9f5c47fc0592f6705a1
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , buildDotnetModule
5 , dotnetCorePackages
6 , powershell
7 , autoSignDarwinBinariesHook
8 , glibcLocales
9 }:
10 buildDotnetModule rec {
11   pname = "ilspycmd";
12   version = "8.0";
14   src = fetchFromGitHub {
15     owner = "icsharpcode";
16     repo = "ILSpy";
17     rev = "v${version}";
18     hash = "sha256-ERBYXgpBRXISfqBSBEydEQuD/5T1dvJ+wNg2U5pKip4=";
19   };
21   nativeBuildInputs = [
22     powershell
23   ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ autoSignDarwinBinariesHook ];
25   # https://github.com/NixOS/nixpkgs/issues/38991
26   # bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
27   env.LOCALE_ARCHIVE = lib.optionalString stdenv.hostPlatform.isLinux "${glibcLocales}/lib/locale/locale-archive";
29   dotnet-sdk = dotnetCorePackages.sdk_6_0;
30   dotnet-runtime = dotnetCorePackages.runtime_6_0;
32   projectFile = "ICSharpCode.ILSpyCmd/ICSharpCode.ILSpyCmd.csproj";
33   nugetDeps = ./deps.nix;
35   # see: https://github.com/tunnelvisionlabs/ReferenceAssemblyAnnotator/issues/94
36   linkNugetPackages = true;
38   meta = with lib; {
39     description = "Tool for decompiling .NET assemblies and generating portable PDBs";
40     mainProgram = "ilspycmd";
41     homepage = "https://github.com/icsharpcode/ILSpy";
42     changelog = "https://github.com/icsharpcode/ILSpy/releases/tag/${src.rev}";
43     license = with licenses; [
44       mit
45       # third party dependencies
46       mspl
47       asl20
48     ];
49     sourceProvenance = with sourceTypes; [ fromSource binaryBytecode ];
50     maintainers = with maintainers; [ emilytrau ];
51   };