1 # Tests the `projectReferences = [ ... ];` feature of buildDotnetModule.
2 # The `library` derivation exposes a .nupkg, which is then consumed by the `application` derivation.
3 # https://nixos.org/manual/nixpkgs/unstable/index.html#packaging-a-dotnet-application
12 nugetDeps = ./nuget-deps.nix;
14 # Specify the TargetFramework via an environment variable so that we don't
15 # have to update the .csproj files when updating dotnet-sdk
16 TargetFramework = "net${lib.versions.majorMinor (lib.getVersion dotnet-sdk)}";
18 library = buildDotnetModule {
19 name = "project-references-test-library";
21 inherit nugetDeps TargetFramework;
26 application = buildDotnetModule {
27 name = "project-references-test-application";
29 inherit nugetDeps TargetFramework;
31 projectReferences = [ library ];
35 runCommand "project-references-test" { } ''
36 ${application}/bin/Application