3 , buildPackages # buildDotnetModule
8 # Note: without structured attributes, we can’t use derivation arguments that
9 # contain spaces unambiguously because arguments are passed as space-separated
10 # environment variables.
11 copyrightString = "Public domain 🅮";
13 inherit (buildPackages) buildDotnetModule;
15 app = buildDotnetModule {
16 name = "structured-attrs-test-application";
18 nugetDeps = ./nuget-deps.nix;
19 dotnetFlags = [ "--property:Copyright=${copyrightString}" ];
20 env.TargetFramework = "net${lib.versions.majorMinor (lib.getVersion dotnet-sdk)}";
21 __structuredAttrs = true;
25 no-structured-attrs = testers.testBuildFailure (app.overrideAttrs {
26 __structuredAttrs = false;
29 check-output = testers.testEqualContents {
30 assertion = "buildDotnetModule sets AssemblyCopyrightAttribute with structured attributes";
31 expected = builtins.toFile "expected-copyright.txt" copyrightString;
32 actual = runCommand "dotnet-structured-attrs-test" { } ''
33 ${app}/bin/Application >"$out"