Skip to content

Commit

Permalink
ilspycmd: format file and switch to finalAttrs
Browse files Browse the repository at this point in the history
  • Loading branch information
GGG-KILLER committed Dec 18, 2024
1 parent ed2be98 commit 314ceb9
Showing 1 changed file with 29 additions and 21 deletions.
50 changes: 29 additions & 21 deletions pkgs/development/tools/ilspycmd/default.nix
Original file line number Diff line number Diff line change
@@ -1,52 +1,60 @@
{ lib
, stdenv
, fetchFromGitHub
, buildDotnetModule
, dotnetCorePackages
, powershell
, autoSignDarwinBinariesHook
, glibcLocales
{
lib,
stdenv,
fetchFromGitHub,
buildDotnetModule,
dotnetCorePackages,
powershell,
autoSignDarwinBinariesHook,
glibcLocales,
}:
buildDotnetModule rec {
buildDotnetModule (finalAttrs: {
pname = "ilspycmd";
version = "8.0";

src = fetchFromGitHub {
owner = "icsharpcode";
repo = "ILSpy";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-ERBYXgpBRXISfqBSBEydEQuD/5T1dvJ+wNg2U5pKip4=";
};

nativeBuildInputs = [
powershell
] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ autoSignDarwinBinariesHook ];
nativeBuildInputs =
[
powershell
]
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
autoSignDarwinBinariesHook
];

# https://github.com/NixOS/nixpkgs/issues/38991
# bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
env.LOCALE_ARCHIVE = lib.optionalString stdenv.hostPlatform.isLinux "${glibcLocales}/lib/locale/locale-archive";

dotnet-sdk = dotnetCorePackages.sdk_6_0;
dotnet-runtime = dotnetCorePackages.runtime_6_0;
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.runtime_8_0;

projectFile = "ICSharpCode.ILSpyCmd/ICSharpCode.ILSpyCmd.csproj";
nugetDeps = ./deps.nix;

# see: https://github.com/tunnelvisionlabs/ReferenceAssemblyAnnotator/issues/94
linkNugetPackages = true;

meta = with lib; {
meta = {
description = "Tool for decompiling .NET assemblies and generating portable PDBs";
mainProgram = "ilspycmd";
homepage = "https://github.com/icsharpcode/ILSpy";
changelog = "https://github.com/icsharpcode/ILSpy/releases/tag/${src.rev}";
license = with licenses; [
changelog = "https://github.com/icsharpcode/ILSpy/releases/tag/${finalAttrs.src.rev}";
license = with lib.licenses; [
mit
# third party dependencies
mspl
asl20
];
sourceProvenance = with sourceTypes; [ fromSource binaryBytecode ];
maintainers = with maintainers; [ emilytrau ];
sourceProvenance = with lib.sourceTypes; [
fromSource
binaryBytecode
];
maintainers = with lib.maintainers; [ emilytrau ];
};
}
})

0 comments on commit 314ceb9

Please sign in to comment.