You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting from Nix 2.20, an error appears when evaluating a Rust derivation built with dream2nix's rust-cargo-lock and buildRustPackage:
error: Cannot find Git revision 'a1bf3a613f451af7fc0a59411c56abc47fe8e8e1' in ref 'refs/heads/master' of repository 'https://github.com/salsa-rs/salsa.git'! Please make sure that the rev exists on the ref you've specified or add allRefs = true; to fetchGit.
Steps to reproduce
Place the flake.nix and flake.lock files in the "Reproduction files" in the same directory and cd.
Run nix run github:NixOS/nix/2.19-maintenance flake check path:., and see successful result.
Run nix run github:NixOS/nix/2.20-maintenance flake check path:., and see the error:
❯ nix run github:NixOS/nix/2.20-maintenance flake check path:.
error:
… while checking flake output 'packages'
… while checking the derivation 'packages.x86_64-linux.ruff'
… while calling the 'head' builtin
at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/lib/attrsets.nix:1575:11:
1574| || pred here (elemAt values 1) (head values) then
1575| head values
| ^
1576| else
(stack trace truncated; use '--show-trace' to show the full trace)
error: Cannot find Git revision 'a1bf3a613f451af7fc0a59411c56abc47fe8e8e1' in ref 'refs/heads/master' of repository 'https://github.com/salsa-rs/salsa.git'! Please make sure that the rev exists on the ref you've specified or add allRefs = true; to fetchGit.
Reproduction files
flake.nix
{inputs.nixpkgs.url="github:NixOS/nixpkgs/nixos-24.05";inputs.flake-parts.url="github:hercules-ci/flake-parts";# Build ruff of custom version with dream2nixinputs.dream2nix.url="github:nix-community/dream2nix";# The branch name contains an unfortunate typo.inputs.ruff-source.url="github:astral-sh/ruff/0.5.5";inputs.ruff-source.flake=false;outputs={self, ...} @ inputs: letinherit(inputs.nixpkgs)lib;ininputs.flake-parts.lib.mkFlake{inheritinputs;}{perSystem={config,self',inputs',pkgs,system,
...
}: letcallDream2NixModule=module:
inputs.dream2nix.lib.evalModules{packageSets.nixpkgs=pkgs;modules=[module{paths.projectRoot=./.;paths.projectRootFile=./flake.nix;paths.package=./.;}];};in{packages={ruff=callDream2NixModule({config,lib,dream2nix,
...
}: {imports=[dream2nix.modules.dream2nix.rust-cargo-lockdream2nix.modules.dream2nix.buildRustPackage];deps={nixpkgs, ...}: {inherit(nixpkgs)installShellFilesrust-jemalloc-sys;CoreService=ifnixpkgs.stdenv.isDarwinthennixpkgs.darwin.apple_sdk.frameworks.CoreServiceelsenull;# For phasesruff-nixpkgs=nixpkgs.ruff;};name=lib.mkForce"ruff";version=lib.mkForce"0.5.5";mkDerivation={src=inputs.ruff-source.outPath;nativeBuildInputs=withconfig.deps;[installShellFiles];buildInputs=withconfig.deps;[rust-jemalloc-sysCoreService];# Install shell filesinherit(config.deps.ruff-nixpkgs)postInstall;};public={meta={inherit(config.deps.ruff-nixpkgs.meta)descriptionmainProgram;};};});};};systems=lib.attrNamesinputs.nixpkgs.legacyPackages;};}
Description
Starting from Nix 2.20, an error appears when evaluating a Rust derivation built with dream2nix's
rust-cargo-lock
andbuildRustPackage
:Steps to reproduce
flake.nix
andflake.lock
files in the "Reproduction files" in the same directory andcd
.nix run github:NixOS/nix/2.19-maintenance flake check path:.
, and see successful result.nix run github:NixOS/nix/2.20-maintenance flake check path:.
, and see the error:Reproduction files
flake.nix
flake.lock
The text was updated successfully, but these errors were encountered: