···
8
+
aot ? dotnetCorePackages.sdk_9_0.hasILCompiler && !stdenv.hostPlatform.isDarwin,
11
+
buildDotnetModule rec {
15
+
src = fetchFromGitHub {
16
+
owner = "GGG-KILLER";
18
+
tag = "v${version}";
19
+
hash = "sha256-jqVXKp5ShWkIMAgmcwu9/QHy+Ey9d1Piv62wsO0Xm44=";
22
+
nativeBuildInputs = lib.optional aot stdenv.cc;
24
+
projectFile = "src/PatchCil.csproj";
25
+
nugetDeps = ./deps.json;
27
+
dotnet-sdk = dotnetCorePackages.sdk_9_0;
28
+
dotnet-runtime = if aot then null else dotnetCorePackages.runtime_9_0;
30
+
selfContainedBuild = aot;
31
+
dotnetFlags = lib.optionals (!aot) [
33
+
"-p:PublishAot=false"
34
+
"-p:InvariantGlobalization=false"
35
+
"-p:EventSourceSupport=true"
36
+
"-p:HttpActivityPropagationSupport=true"
37
+
"-p:MetadataUpdaterSupport=true"
38
+
"-p:MetricsSupport=true"
39
+
"-p:UseNativeHttpHandler=false"
40
+
"-p:XmlResolverIsNetworkingEnabledByDefault=true"
41
+
"-p:EnableGeneratedComInterfaceComImportInterop=true"
42
+
"-p:_ComObjectDescriptorSupport=true"
43
+
"-p:_DataSetXmlSerializationSupport=true"
44
+
"-p:_DefaultValueAttributeSupport=true"
45
+
"-p:_DesignerHostSupport=true"
46
+
"-p:_EnableConsumingManagedCodeFromNativeHosting=true"
47
+
"-p:_UseManagedNtlm=true"
50
+
preFixup = lib.optionalString aot ''
51
+
# Remove debug symbols as they shouldn't have anything in them.
52
+
rm $out/lib/patchcil/patchcil.dbg
55
+
executables = [ "patchcil" ];
58
+
updateScript = nix-update-script { };
62
+
description = "A small utility to modify the library paths from PInvoke in .NET assemblies.";
63
+
homepage = "https://github.com/GGG-KILLER/patchcil";
64
+
license = lib.licenses.mit;
65
+
maintainers = with lib.maintainers; [ ggg ];
66
+
mainProgram = "patchcil";