1
1
mirror of https://github.com/oxalica/nil.git synced 2024-12-03 06:42:27 +03:00
nil/crates/ide
oxalica a7d651421d Set rest type for system fields in flake outputs
This helps inference for the common dynamic system access pattern.
Example:

```nix
{
  outputs =
    { flake-utils, nixpkgs, ... }:
    flake-utils.lib.eachDefaultSystem (system: {
      packages.hello = nixpkgs.legacyPackages.${system}.hello;
                                              # ^       ^ What should this resolve to?
                                              # ^ Dynamic attribute.
    }
}
```

Thus we pick a specific "default" system for fallback. Then
`nixpkgs.legacyPackages.${system}.hello` can be resolved to, for
example, `nixpkgs.legacyPackages.x86_64-linux.hello`, which we know is
a `derivation`.
2023-04-22 09:19:15 +08:00
..
src Set rest type for system fields in flake outputs 2023-04-22 09:19:15 +08:00
Cargo.toml Update dependencies 2023-04-14 02:12:57 +08:00