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
7 , buildPackages # buildDotnetModule
12 inherit (buildPackages) buildDotnetModule;
14 nugetDeps = ./nuget-deps.nix;
16 # Specify the TargetFramework via an environment variable so that we don't
17 # have to update the .csproj files when updating dotnet-sdk
18 TargetFramework = "net${lib.versions.majorMinor (lib.getVersion dotnet-sdk)}";
20 library = buildDotnetModule {
21 name = "project-references-test-library";
24 env.TargetFramework = TargetFramework;
29 application = buildDotnetModule {
30 name = "project-references-test-application";
33 env.TargetFramework = TargetFramework;
35 projectReferences = [ library ];
39 runCommand "project-references-test" { } ''
40 ${application}/bin/Application