tfc / cpp-nix-2023

Code repository for blog article series https://nixcademy.com/2023/10/31/cpp-with-nix-in-2023-part-1-shell/
https://nixcademy.com/2023/10/31/cpp-with-nix-in-2023-part-1-shell/
10 stars 0 forks source link

`flake-parts` input missing from all flake.nix files #2

Open multivac61 opened 6 months ago

tfc commented 6 months ago

Did you get an error message from somewhere? flake-parts should be obtained from the registry, the way the flake is written now.

multivac61 commented 6 months ago

Apologies! I wasn't aware flake-parts had been moved into nixpkgs. Closing the issue. Thank you.

tfc commented 6 months ago

No problem.

However, flake-parts has not been moved into nixpkgs. Flakes have this magic feature:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  };

  outputs = inputs@{ foo, bar, baz, ... }:

...

The inputs foo, bar, baz are not listed in the inputs, so the nix registry will be checked if it knows such entries. This way you don't have control which version of them is used on the next flake update, but sometimes you don't care.

multivac61 commented 6 months ago

Ah, now I remember where I had the issue:

CleanShot 2024-05-30 at 11 21 15@2x

multivac61 commented 6 months ago

Does not happen if I explicitly add flake-parts.url = "github:hercules-ci/flake-parts"; to the inputs 😄