nix-build fails unexpectedly due to flake-compat issue #19

Closed
opened 2024-04-24 17:00:56 +00:00 by lunaphied · 2 comments
Owner
irides@Mira ~/code/lix-nixos-module (main) @ nix-build
error:
       … while calling the 'import' builtin
         at /Users/irides/code/lix-nixos-module/default.nix:1:2:
            1| (import
             |  ^
            2|   (

       … while calling the 'fetchTarball' builtin
         at /Users/irides/code/lix-nixos-module/default.nix:4:5:
            3|     let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
            4|     fetchTarball {
             |     ^
            5|       url = lock.nodes.flake-compat.locked.url or "https://git.lix.systems/lix-project/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";

       error: unable to download 'ssh://git@git.lix.systems/lix-project/flake-compat': Unsupported protocol (1)
``` irides@Mira ~/code/lix-nixos-module (main) @ nix-build error: … while calling the 'import' builtin at /Users/irides/code/lix-nixos-module/default.nix:1:2: 1| (import | ^ 2| ( … while calling the 'fetchTarball' builtin at /Users/irides/code/lix-nixos-module/default.nix:4:5: 3| let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in 4| fetchTarball { | ^ 5| url = lock.nodes.flake-compat.locked.url or "https://git.lix.systems/lix-project/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; error: unable to download 'ssh://git@git.lix.systems/lix-project/flake-compat': Unsupported protocol (1) ```
lunaphied changed title from Legacy build command fails unexpectedly to 'Legacy' build command fails unexpectedly 2024-04-24 18:26:02 +00:00
lunaphied changed title from 'Legacy' build command fails unexpectedly to `nix-build` fails unexpectedly due to flake-compat issue 2024-04-24 18:26:21 +00:00
Owner

not sure this is fixable at all until without dropping to https (because of course flakes use entirely different protocol sets for fetchers), and that would force downstream users to set overrides in the flake to use ssh for fetching :/

ceterum censeo flakes ...

not sure this is fixable at all until without dropping to https (because of course flakes use entirely different protocol sets for fetchers), and that would force downstream users to set overrides in the flake to use ssh for fetching :/ ~~ceterum censeo flakes ...~~
Owner

This was fixed by deleting flake-compat, since imo you shouldn't use it for this as it gives anyone using it an extreme case of the "flakes don't support configuration". This repo and the instructions are written so one can just directly import the module, which is the preferred method for non-flakes.

I also fixed the forgejo so that flake-compat supports being fetched as a tarball, see the new readme at: https://git.lix.systems/lix-project/flake-compat

This was fixed by deleting flake-compat, since imo you shouldn't use it for this as it gives anyone using it an extreme case of the "flakes don't support configuration". This repo and the instructions are written so one can just directly import the module, which is the preferred method for non-flakes. I also fixed the forgejo so that flake-compat supports being fetched as a tarball, see the new readme at: https://git.lix.systems/lix-project/flake-compat
jade closed this issue 2024-05-04 00:27:11 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/nixos-module#19
No description provided.