Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Improve downstream usabillity. #25

Merged
merged 3 commits into from
Sep 2, 2024
Merged

Conversation

hsjobeki
Copy link
Contributor

@hsjobeki hsjobeki commented Aug 27, 2024

Remove all dependencies.

Dev and check dependencies can be added back in a seperate flake.nix:

Like in:

When using this flake properly in a third party library currently the following expression is needed:

inputs = {
....
    systems.url = "github:nix-systems/default";
    treefmt-nix.url = "github:numtide/treefmt-nix";
    treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";

    nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
    nixos-facter-modules.inputs.nixpkgs.follows = "nixpkgs";

    nixos-facter-modules.inputs.systems.follows = "systems";
    nixos-facter-modules.inputs.blueprint.follows = "blueprint";
    nixos-facter-modules.inputs.treefmt-nix.follows = "treefmt-nix";

    blueprint.url = "github:numtide/blueprint";
    blueprint.inputs.nixpkgs.follows = "nixpkgs";
    blueprint.inputs.systems.follows = "systems";
}

NOTE: I MUST override every single input and add transitive inputs to the toplevel of the flake. Otherwise my own downstream users cannot use follow. Every new layer MUST add their own dependencies, which accumulates really fast.

see: NixOS/nix#5790

After this PR:

inputs = {
....
    nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
    nixos-facter-modules.inputs.nixpkgs.follows = "nixpkgs";
}

@Mic92
Copy link
Member

Mic92 commented Sep 2, 2024

@mergify queue

Copy link

mergify bot commented Sep 2, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at bde1599

@mergify mergify bot merged commit bde1599 into numtide:main Sep 2, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants