Skip to content

nixpkgs: can not build a QEMU image inside stdenv #1687

@igor-ramazanov

Description

@igor-ramazanov

To reproduce:

 nix build \
   --impure \
   --expr \
   "with import <nixpkgs> {};
    runCommandWith {
      name = ''hello-qemu'';
      runLocal = true;
      derivationArgs = { nativeBuildInputs = [ops]; NIX_DEBUG = 7;};
    } ''ops build ${hello}/bin/hello''"

Log:

...
++ ops build /bin/hello
version lookup failed, using local.
No local build found.
+ exitHandler
+ exitCode=1
+ set +e
+ '[' -n '' ']'
+ ((  1 != 0  ))
+ runHook failureHook
...

The reason is apparently because ops tries to access the network which is prohibited in the stdenv.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions