hercules-ci / flake-parts

❄️ Simplify Nix Flakes with the module system
https://flake.parts
MIT License
699 stars 38 forks source link

`flake-parts` doesn't evaluate. #218

Closed computerscience-person closed 4 months ago

computerscience-person commented 4 months ago

A small flake-parts file.

{
  description = "Developer environment for AquaTerra.";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    flake-parts.url = "github:hercules-ci/flake-parts";
    devshell.url = "github:numtide/devshell";
  };

  outputs = { self, nixpkgs, flake-parts, ... }@inputs:
    flake-parts.lib.mkFlake { inherit inputs; } {
      imports = [ inputs.devshell.flakeModule ];
      flake = { };
      systems = [ "x86_64-linux" ];
      perSystem = { config, pkgs, ... }: {
        devshells.default = {
          packages = with pkgs;[
            nodePackages.nodejs bun
            nodePackages.expo-cli
          ];
        };
      };
    };
}

evaluates to an error when evaluated by nix flake lock.

error:
       … while updating the lock file of flake 'git+file:///mnt/Shtuffs/home/Dev/CIT214?ref=refs/heads/master&rev=07846b815d21746b90ea517cef921d3f7e3aa7a1'

       … while updating the flake input 'flake-parts'

       error: getting status of '/nix/store/2hc9lg18zd6yabw9jqj0wy3s9kyvkzp0-source': No such file or directory

For some reason, flake-parts doesn't evaluate here. Also related to [https://github.com/nix-community/nixvim/issues/1241](), as the same nix store path is referenced in the error.

roberth commented 4 months ago

This is beyond flake-parts' control. Which version of Nix are you using? Does it still happen after rm ~/.cache/nix/fetcher-cache*?

computerscience-person commented 4 months ago

This is beyond flake-parts' control. Which version of Nix are you using? Does it still happen after rm ~/.cache/nix/fetcher-cache*?

I'm using a flake based configuration, and nix was just updated to the 2.18.1 version. Tried your solution, didn't work.

computerscience-person commented 4 months ago

Seems like something broke in my nix-store path resolution, and was fixed with `sudo nix-store --verify --check-contents --repair.