Comments (8)
Here's a "repro" (ish):
[nix-shell:~/tmp]$ mkdir issue-257
[nix-shell:~/tmp]$ cd issue-257/
[nix-shell:~/tmp/issue-257]$ nix flake init
[nix-shell:~/tmp/issue-257]$ nvim flake.nix
[nix-shell:~/tmp/issue-257]$ nix flake lock
error: source tree referenced by 'git+file:///home/ollie/tmp?dir=issue-257&ref=master&rev=8944c969d1ff3eb07e3f0c5e3a5db349a41e9d54' does not contain a 'issue-257/flake.nix' file
[nix-shell:~/tmp/issue-257]$ git init
Initialized empty Git repository in /home/ollie/tmp/issue-257/.git/
[nix-shell:~/tmp/issue-257]$ git add flake.nix
[nix-shell:~/tmp/issue-257]$ cat flake.nix
{
description = "A very basic flake";
inputs.nixpkgs-fmt.url = "github:nix-community/nixpkgs-fmt";
outputs = { self, nixpkgs }: {
packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello;
defaultPackage.x86_64-linux = self.packages.x86_64-linux.hello;
};
}
[nix-shell:~/tmp/issue-257]$ nix flake lock
warning: Git tree '/home/ollie/tmp/issue-257' is dirty
error: input 'nixpkgs-fmt/fenix/naersk' follows a non-existent input 'naersk'
(use '--show-trace' to show detailed location information)
[nix-shell:~/tmp/issue-257]$
from nixpkgs-fmt.
if I run nix run
in the repo, I get:
$ nix run --show-trace
error: in pure evaluation mode, 'fetchTarball' requires a 'sha256' argument
… while evaluating the file '/nix/store/d28xpy5rjhvy20p0dfdbvl68way34yg0-source/packages.nix':
Where the source is fenix.
Something is broken in flake land
from nixpkgs-fmt.
fenix is loading flake-compat for some reason
from nixpkgs-fmt.
Are you using the "follows" notation in your flake.nix?
I'm asking because the pinned version of fenix has naersk as a dependency, but not the latest one.
from nixpkgs-fmt.
fenix used to depend on naersk, but the dependency was removed here because of nix-community/naersk#184.
Removing this line should fix the issue:
Line 8 in 35635d6
from nixpkgs-fmt.
What's weird is that nixpkgs-fmt pins an older version of fenix, and flake is not respecting that for some reason.
from nixpkgs-fmt.
What's weird is that nixpkgs-fmt pins an older version of fenix, and flake is not respecting that for some reason.
Yes, this is what puzzled me. I thought the whole point was because it worked at one point it should work now, but no such dice!
from nixpkgs-fmt.
I'm not exactly sure what's happening here, but adding naersk to my dependent flake fixes the issue, viz.
{
inputs.naersk.url = "github:nix-community/naersk";
}
The flake then evaluates correctly and I can see all my flake inputs:
$ nix flake metadata
warning: Git tree '/home/tny/config' is dirty
Resolved URL: git+file:///home/tny/config
Locked URL: git+file:///home/tny/config
Description: {system, home} configuration flake
Path: /nix/store/bmz5kg2p1vi8gsn5qkdcs9y9c29lc0gc-source
Last modified: 2021-08-27 16:04:29
Inputs:
<snip>
├───nixpkgs-format: github:nix-community/nixpkgs-fmt/7849a089bd876dc9ddf529513d887593b9be059c
│ ├───fenix: github:nix-community/fenix/fffd864ad08ed95fcb66554513fa07a5f3d626b5
│ │ ├───naersk follows input 'naersk'
│ │ ├───nixpkgs follows input 'nixpkgs'
│ │ └───rust-analyzer-src: github:rust-analyzer/rust-analyzer/87ef340c19ae5ac73fc9b1cd37909d9d8ad53d09
│ ├───flake-utils: github:numtide/flake-utils/b543720b25df6ffdfcf9227afafc5b8c1fabfae8
│ ├───naersk: github:nmattia/naersk/a3f40fe42cc6d267ff7518fa3199e99ff1444ac4
│ │ └───nixpkgs follows input 'nixpkgs'
│ └───nixpkgs follows input 'nixpkgs'
The commit hash shown for fenix (nix-community/fenix@fffd864) seems to line up with the locked hash.
Line 18 in 7849a08
from nixpkgs-fmt.
Related Issues (20)
- sample: list of floats formatted surpised me HOT 3
- improve CLI ergonomics when parsing errors occur when using parse flag HOT 1
- [Security] Make formatted expression free from CVE-2021-42574 (Trojan Source) HOT 5
- Misaligned lists of attribute sets HOT 1
- sample: List after in has no indentation
- Second comment line is indented after let … in
- Multi-line strings in let/in-expressions are wrongly indented
- Add a binary to Releases
- Re-release for security updates HOT 2
- Wrong indention for attr set as parameter
- Space removed before comments in multi-line inherit expressions HOT 1
- Add option to choose indention style HOT 2
- Confusing attset merging
- Shell completions HOT 1
- Pre-Commit fails sporadically with `failed to compile nixpkgs-fmt`
- sample: HOT 1
- attrsets as function arguments do not get properly indented
- Comments indented wrong in if statements
- multiline string content gets modified, altering outputs HOT 2
- Bump cargo deps (CVE-2022-23639) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nixpkgs-fmt.