Skip to content

Add 'flakes' to extra experimental features#220

Merged
figsoda merged 1 commit into
nix-community:mainfrom
the-furry-hubofeverything:patch-1
Jan 1, 2026
Merged

Add 'flakes' to extra experimental features#220
figsoda merged 1 commit into
nix-community:mainfrom
the-furry-hubofeverything:patch-1

Conversation

@the-furry-hubofeverything

@the-furry-hubofeverything the-furry-hubofeverything commented Oct 20, 2023

Copy link
Copy Markdown
Contributor

In my flake setup, I use flake: for my nixPaths because I wanted compatibility with legacy commands. However, this didn't work well with nurl when I was using it -

[hubble@Gulo-Laptop:/run/media/hubble/Data/GithubFurry/nixpkgs/pkgs/applications/misc/blender]$ nurl --fetcher fetchFromGitea https://projects.blender.org/blender/blender-addons v3.6.5 --arg-str postFetch 'patch -p3 -d $out < ${./draco-p2.patch}'
$ nix build --experimental-features nix-command --impure --no-link --expr '(import(<nixpkgs>){}).fetchFromGitea{domain="projects.blender.org";owner="blender";repo="blender-addons";rev="v3.6.5";hash="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";postFetch="patch -p3 -d $out < ${./draco-p2.patch}";}'
Error: failed to find the hash from error messages
stdout: 
stderr:
error:
       … while calling the 'import' builtin

         at «string»:1:2:

            1| (import(<nixpkgs>){}).fetchFromGitea{domain="projects.blender.org";owner="blender";repo="blender-addons";rev="v3.6.5";hash="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";postFetch="patch -p3 -d $out < ${./draco-p2.patch}";}
             |  ^

       … while calling the 'findFile' builtin

         at «string»:1:9:

            1| (import(<nixpkgs>){}).fetchFromGitea{domain="projects.blender.org";owner="blender";repo="blender-addons";rev="v3.6.5";hash="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";postFetch="patch -p3 -d $out < ${./draco-p2.patch}";}
             |         ^

       error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override

... particularly in for fod_prefetch.

With this PR:

[hubble@Gulo-Laptop:/run/media/hubble/Data/GithubFurry/nixpkgs/pkgs/applications/misc/blender]$ nurl --fetcher fetchFromGitea https://projects.blender.org/blender/blender-addons v3.6.5 --arg-str postFetch 'patch -p3 -d $out < ${./draco-p2.patch}'
$ nix build --extra-experimental-features 'nix-command flakes' --impure --no-link --expr '(import(<nixpkgs>){}).fetchFromGitea{domain="projects.blender.org";owner="blender";repo="blender-addons";rev="v3.6.5";hash="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";postFetch="patch -p3 -d $out < ${./draco-p2.patch}";}'
fetchFromGitea {
  domain = "projects.blender.org";
  owner = "blender";
  repo = "blender-addons";
  rev = "v3.6.5";
  hash = "sha256-K4jbWuWaXtSjEqbmZC+7SnsNUJCcru1U1HuI4LCuuGM=";
  postFetch = "patch -p3 -d $out < ${./draco-p2.patch}";
}

Let me know if this is an acceptable solution for this problem

For resolving "flake:" nixPaths

@figsoda figsoda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@figsoda figsoda merged commit ca083af into nix-community:main Jan 1, 2026
@nixos-discourse

Copy link
Copy Markdown

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nurl-generate-nix-fetcher-calls-from-repository-urls/24374/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants