Merge pull request #37 from Artturin/addsupportfornewshcmea

add support for new style of defaults
This commit is contained in:
Eelco Dolstra 2022-03-25 10:10:09 +01:00 committed by GitHub
commit 64a525ee38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -190,9 +190,11 @@ in
rec { rec {
defaultNix = defaultNix =
result result
// (if result ? defaultPackage.${system} then { default = result.defaultPackage.${system}; } else {}); // (if result ? defaultPackage.${system} then { default = result.defaultPackage.${system}; } else {})
// (if result ? packages.${system}.default then { default = result.packages.${system}.default; } else {});
shellNix = shellNix =
defaultNix defaultNix
// (if result ? devShell.${system} then { default = result.devShell.${system}; } else {}); // (if result ? devShell.${system} then { default = result.devShell.${system}; } else {})
// (if result ? devShells.${system}.default then { default = result.devShells.${system}.default; } else {});
} }