-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
builtins.getFlake
fails with "cannot write modified lock file"
#6541
Labels
Comments
We do have to make sure that pure evaluation continues to fail, e.g.
has to fail if there are unlocked inputs. I think this will fail before it even gets to writing the lock file though (e.g. |
Yes, the suggested fix doesn't change that |
ncfavier
added a commit
to ncfavier/nix
that referenced
this issue
May 18, 2022
ncfavier
added a commit
to ncfavier/nix
that referenced
this issue
May 18, 2022
ncfavier
added a commit
to ncfavier/home-manager
that referenced
this issue
May 21, 2022
Add a lockfile to work around NixOS/nix#6541 (and because it's a good idea anyway). Also use flake-utils, and restrict ourselves to the five platforms supported by nixpkgs. Otherwise, the IFD for nmd fails on weird platforms. This fixes `nix flake check`. Remove the redundant `apps` output, see nix-community#2442 (comment)
ncfavier
added a commit
to ncfavier/home-manager
that referenced
this issue
Jun 5, 2022
Add a lockfile to work around NixOS/nix#6541 (and because it's a good idea anyway). Also use flake-utils, and restrict ourselves to the five platforms supported by nixpkgs. Otherwise, the IFD for nmd fails on weird platforms. This fixes `nix flake check`. Remove the redundant `apps` output, see nix-community#2442 (comment)
ncfavier
added a commit
to ncfavier/home-manager
that referenced
this issue
Jun 7, 2022
Add a lockfile to work around NixOS/nix#6541 (and because it's a good idea anyway). Also use flake-utils, and restrict ourselves to the five platforms supported by nixpkgs. Otherwise, the IFD for nmd fails on weird platforms. This fixes `nix flake check`. Remove the redundant `apps` output, see nix-community#2442 (comment)
teto
pushed a commit
to nix-community/home-manager
that referenced
this issue
Jun 7, 2022
* Add flake.lock and clean up flake.nix Add a lockfile to work around NixOS/nix#6541 (and because it's a good idea anyway). Also use flake-utils, and restrict ourselves to the five platforms supported by nixpkgs. Otherwise, the IFD for nmd fails on weird platforms. This fixes `nix flake check`. Remove the redundant `apps` output, see #2442 (comment) * nixos,nix-darwin: factor out into a common module * nixos,nix-darwin: make `home-managers.users` shallowly visible Make sure the option is included in the NixOS/nix-darwin manual (but the HM submodule options aren't). Also add a static description to the HM submodule type so that we don't need to evaluate the submodules just to build the option manual. This makes nixos-search able to index the home-manager flake. Also clean up some TODOs. * flake: add nmd and nmt This avoids having to use `pkgs.fetchFromGitLab` in an IFD, which causes issues when indexing packages with nixos-search because `pkgs` is instantiated with every platform.
jevy
pushed a commit
to jevy/home-manager
that referenced
this issue
Jul 1, 2022
* Add flake.lock and clean up flake.nix Add a lockfile to work around NixOS/nix#6541 (and because it's a good idea anyway). Also use flake-utils, and restrict ourselves to the five platforms supported by nixpkgs. Otherwise, the IFD for nmd fails on weird platforms. This fixes `nix flake check`. Remove the redundant `apps` output, see nix-community#2442 (comment) * nixos,nix-darwin: factor out into a common module * nixos,nix-darwin: make `home-managers.users` shallowly visible Make sure the option is included in the NixOS/nix-darwin manual (but the HM submodule options aren't). Also add a static description to the HM submodule type so that we don't need to evaluate the submodules just to build the option manual. This makes nixos-search able to index the home-manager flake. Also clean up some TODOs. * flake: add nmd and nmt This avoids having to use `pkgs.fetchFromGitLab` in an IFD, which causes issues when indexing packages with nixos-search because `pkgs` is instantiated with every platform.
spacekookie
pushed a commit
to spacekookie/home-manager
that referenced
this issue
Feb 10, 2023
* Add flake.lock and clean up flake.nix Add a lockfile to work around NixOS/nix#6541 (and because it's a good idea anyway). Also use flake-utils, and restrict ourselves to the five platforms supported by nixpkgs. Otherwise, the IFD for nmd fails on weird platforms. This fixes `nix flake check`. Remove the redundant `apps` output, see nix-community#2442 (comment) * nixos,nix-darwin: factor out into a common module * nixos,nix-darwin: make `home-managers.users` shallowly visible Make sure the option is included in the NixOS/nix-darwin manual (but the HM submodule options aren't). Also add a static description to the HM submodule type so that we don't need to evaluate the submodules just to build the option manual. This makes nixos-search able to index the home-manager flake. Also clean up some TODOs. * flake: add nmd and nmt This avoids having to use `pkgs.fetchFromGitLab` in an IFD, which causes issues when indexing packages with nixos-search because `pkgs` is instantiated with every platform.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
builtins.getFlake
fails with "cannot write modified lock file" when using it on a repository without a lock file, e.g. home-manager, even when passing--no-write-lock-file
.Steps To Reproduce
Expected behavior
No such error, i.e. don't attempt to write a lock file in
builtins.getFlake
.nix-env --version
outputnix (Nix) 2.9.0pre20220505_f4102de
Additional context
nix/src/libexpr/flake/flake.cc
Lines 722 to 729 in fdc97fc
We should probably add
.writeLockFile = false
here? I'll PR that in a while if there's no response here.The text was updated successfully, but these errors were encountered: