Skip to content
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

Add 'flakes' to extra experimental features #220

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

the-furry-hubofeverything
Copy link

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
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.

None yet

1 participant