cachix / devenv

Fast, Declarative, Reproducible, and Composable Developer Environments
https://devenv.sh
Apache License 2.0
3.47k stars 252 forks source link

Build failing on flake input update #1154

Closed becknik closed 2 weeks ago

becknik commented 2 weeks ago

Describe the bug

After the the update of my flake-managed devenv setup from rev github:cachix/devenv/de824c66bce7a07f3f454062aef67471038905ad' (2024-04-13) to github:cachix/devenv/48392b3a98ecbdcd68619e80bcc6b43c3447d686' (2024-04-19) the build of devenv failed on my weekly scheduled system update.

The last few lines of the build log (concurrent build log messages filtered out):

devenv> Finished cargoSetupPostUnpackHook
devenv> Running phase: patchPhase
devenv> Executing cargoSetupPostPatchHook
devenv> Validating consistency between /build/source/Cargo.lock and /build/cargo-vendor-dir/Cargo.lock
devenv> Finished cargoSetupPostPatchHook
devenv> Running phase: updateAutotoolsGnuConfigScriptsPhase
devenv> Running phase: configurePhase
devenv> Running phase: buildPhase
devenv> Executing cargoBuildHook
devenv> ++ env CC_X86_64_UNKNOWN_LINUX_GNU=/nix/store/4kwk49k8rc8cg8c387kbbjcrl8i0y693-gcc-wrapper-13.2.0/bin/cc CXX_X86_64_UNKNOWN_LINUX_GNU=/nix/store/4kwk49k8rc8cg8c387kbbjcrl8i0y693-gcc-wrapper-13.2.0/bin/c++ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=/nix/store/4kwk49k8rc8cg8c387kbbjcrl8i0y693-gcc-wrapper-13.2.0/bin/cc CC_X86_64_UNKNOWN_LINUX_GNU=/nix/store/4kwk49k8rc8cg8c387kbbjcrl8i0y693-gcc-wrapper-13.2.0/bin/cc CXX_X86_64_UNKNOWN_LINUX_GNU=/nix/store/4kwk49k8rc8cg8c387kbbjcrl8i0y693-gcc-wrapper-13.2.0/bin/c++ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=/nix/store/4kwk49k8rc8cg8c387kbbjcrl8i0y693-gcc-wrapper-13.2.0/bin/cc CARGO_BUILD_TARGET=x86_64-unknown-linux-gnu HOST_CC=/nix/store/4kwk49k8rc8cg8c387kbbjcrl8i0y693-gcc-wrapper-13.2.0/bin/cc HOST_CXX=/nix/store/4kwk49k8rc8cg8c387kbbjcrl8i0y693-gcc-wrapper-13.2.0/bin/c++ cargo build -j 7 --target x86_64-unknown-linux-gnu --frozen --profile release
devenv> error: failed to load manifest for workspace member `/build/source/devenv`
devenv> Caused by:
devenv>   failed to load manifest for dependency `devenv_core`
devenv> Caused by:
devenv>   failed to read `/build/source/devenv_core/Cargo.toml`
devenv> Caused by:
devenv>   No such file or directory (os error 2)
error: builder for '/nix/store/y642sxiiavqzn5ab1i092yrc0wm1ybp0-devenv-1.0.4.drv' failed with exit code 101
error: 1 dependencies of derivation '/nix/store/d2b8nsv519nkh87j2lndr772gzcqpv50-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/06pr3mgw8fvlxnf5skqj69cislfr1v2h-home-manager-generation.drv' failed to build
building '/nix/store/9i0ccdr4ay59zqmj7wg40qb8dlz3ys1w-php-grammar-0.0.0+rev=29838ad.drv'...
error: 1 dependencies of derivation '/nix/store/cqh61m0x63xjs4cjl2mv7pmnlgfgaw4n-user-environment.drv' failed to build
error: 1 dependencies of derivation '/nix/store/apx77z7im3bcjd11cvqizw9h0qvnslsa-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/vvg1iqnz3w2wwdiqmp15lxq0wkfycz64-nixos-system-dnix-23.11.20240417.e402c3e.drv' failed to build

To reproduce

Full `flake.lock` update commit message ``` commit 6c02667683b56758aac372fc8e54a6ac34a16404 (HEAD -> main) Author: Nix Auto Upgrade Date: 2024-04-20 12:05:06 +0200 flake.lock: Update Flake lock file updates: • Updated input 'darwin': 'github:lnl7/nix-darwin/36524adc31566655f2f4d55ad6b875fb5c1a4083' (2024-03-30) → 'github:lnl7/nix-darwin/9e7c20ffd056e406ddd0276ee9d89f09c5e5f4ed' (2024-04-19) • Updated input 'devenv': 'github:cachix/devenv/de824c66bce7a07f3f454062aef67471038905ad' (2024-04-13) → 'github:cachix/devenv/48392b3a98ecbdcd68619e80bcc6b43c3447d686' (2024-04-19) • Updated input 'devenv/cachix/flake-compat': 'github:edolstra/flake-compat/0f9255e01c2351cc7d116c072cb317785dd33b33' (2023-10-04) → follows 'devenv/flake-compat' • Updated input 'devenv/cachix/pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/5df5a70ad7575f6601d91f0efec95dd9bc619431' (2024-02-15) → follows 'devenv/pre-commit-hooks' • Removed input 'devenv/cachix/pre-commit-hooks/flake-compat' • Removed input 'devenv/cachix/pre-commit-hooks/flake-utils' • Removed input 'devenv/cachix/pre-commit-hooks/flake-utils/systems' • Removed input 'devenv/cachix/pre-commit-hooks/gitignore' • Removed input 'devenv/cachix/pre-commit-hooks/gitignore/nixpkgs' • Removed input 'devenv/cachix/pre-commit-hooks/nixpkgs' • Removed input 'devenv/cachix/pre-commit-hooks/nixpkgs-stable' • Updated input 'devenv/nix/flake-compat': 'github:edolstra/flake-compat/35bb57c0c8d8b62bbfd284272c928ceb64ddbde9' (2023-01-17) → follows 'devenv/flake-compat' • Updated input 'disko': 'github:nix-community/disko/8d4ae698eaac8bd717e23507da2ca8b345bec4b5' (2024-04-12) → 'github:nix-community/disko/1efd500e9805a9efbce401ed5999006d397b9f11' (2024-04-18) • Updated input 'nix-index-database': 'github:nix-community/nix-index-database/4676d72d872459e1e3a248d049609f110c570e9a' (2024-04-07) → 'github:nix-community/nix-index-database/93aed67288be60c9ef6133ba2f8de128f4ef265c' (2024-04-14) • Updated input 'nixos-hardware': 'github:NixOS/nixos-hardware/f58b25254be441cd2a9b4b444ed83f1e51244f1f' (2024-04-12) → 'github:NixOS/nixos-hardware/5d48925b815fd202781bfae8fb6f45c07112fdb2' (2024-04-19) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/51651a540816273b67bc4dedea2d37d116c5f7fe' (2024-04-11) → 'github:NixOS/nixpkgs/e402c3eb6d88384ca6c52ef1c53e61bdc9b84ddd' (2024-04-17) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/1042fd8b148a9105f3c0aca3a6177fd1d9360ba5' (2024-04-10) → 'github:NixOS/nixpkgs/5c24cf2f0a12ad855f444c30b2421d044120c66f' (2024-04-19) • Updated input 'nixvim': 'github:nix-community/nixvim/f4018967d40ccab752c1898cc3d81330368eb7a4' (2024-04-13) → 'github:nix-community/nixvim/83a7ce9846b1b01a34b3e6b25077c1a5044ad7b3' (2024-04-19) • Updated input 'nixvim/home-manager': 'github:nix-community/home-manager/31357486b0ef6f4e161e002b6893eeb4fafc3ca9' (2024-04-10) → 'github:nix-community/home-manager/40ab43ae98cb3e6f07eaeaa3f3ed56d589da21b0' (2024-04-13) • Updated input 'ohmyzsh': 'github:ohmyzsh/ohmyzsh/31f2025e0fa963788655fe197e0179c47588b175' (2024-04-12) → 'github:ohmyzsh/ohmyzsh/1b5503a3eefeb3e248bbc07a2f4e4b7591924307' (2024-04-19) • Updated input 'sops-nix': 'github:Mic92/sops-nix/538c114cfdf1f0458f507087b1dcf018ce1c0c4c' (2024-04-08) → 'github:Mic92/sops-nix/a929a011a09db735abc45a8a45d1ff7fdee62755' (2024-04-19) ```

My flake-contained setup can be narrowed down as follows:

flake.nix:

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

    nixos-hardware.url = "github:NixOS/nixos-hardware/master";
    disko = {
      url = "github:nix-community/disko";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    devenv = {
      url = "github:cachix/devenv";
      inputs.nixpkgs.follows = "nixpkgs-unstable"; # requires > rustc-1.74.0
    };
    # --snip--
  };

  outputs = { ... }@inputs: let
    let
      systems = [ "x86_64-darwin" "x86_64-linux" ];
      forAllSystems = nixpkgs.lib.genAttrs systems;
    in {
    # --snip--
      devShell = forAllSystems
        (system:
          let
            pkgs = nixpkgs.legacyPackages.${system};
          in
          inputs.devenv.lib.mkShell {
            inherit inputs pkgs;
            modules = [
              ({ pkgs, config, ... }: {
                # https://devenv.sh/guides/using-with-flakes/
                # https://devenv.sh/reference/options/
                # https://github.com/expipiplus1/update-nix-fetchgit
                packages = [ pkgs.update-nix-fetchgit ];

                languages.nix.enable = true;

                pre-commit.hooks = {
                  nixpkgs-fmt.enable = true;
                };

                scripts.update-fetchgit.exec = "update-nix-fetchgit $DEVENV_ROOT/overlays/modifications.nix";
              })
            ];
          }
        );
    };
}

If this shouldn't be enough: see permalink to dotfiles repo

Version

devenv version
devenv: 1.0.4
domenkozar commented 2 weeks ago

reverted in 9c134f73b11b298674317b84292fa126744a65fb