Closed Ben-Miller0 closed 1 day ago
Have you tried setting NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1
or one of the other quick fixes?
Can you do that inside a flake?
Yes, using --impure
:
Note: When using
nix shell
,nix build
,nix develop
, etc with a flake, then pass--impure
in order to allow use of environment variables.
i mean something in the flake.nix that reproduceably does that.
this is what i get if i try doing what you say
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/r8kvbay6x1d13zl93fgj18pgzyg5q0a4-avr-libc-2.2.1.tar.bz2
source root is avr-libc-2.2.1
setting SOURCE_DATE_EPOCH to timestamp 1721363985 of file avr-libc-2.2.1/avr-libc.spec
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Updating Autotools / GNU config script to a newer upstream version: ./config.sub
Updating Autotools / GNU config script to a newer upstream version: ./config.guess
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
patching script interpreter paths in ./configure
./configure: interpreter directive changed from "#! /bin/sh" to "/nix/store/0irlcqx2n3qm6b1pc9rsd2i8qpvcccaj-bash-5.2p37/bin/sh"
configure flags: --disable-dependency-tracking --prefix=/nix/store/wawhvkwgzf4ylf9dnqrvrdg5blr3zdxw-avr-libc-2.2.1
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking if configuring for cross compile... no
configure: WARNING:
configure: WARNING: AVR-LibC must be built using an avr cross-compiler.
configure: WARNING: Try configuring with:
configure: WARNING: "./configure --build=`./config.guess` --host=avr"
configure: WARNING:
configure: error: aborting configure
Why do you use avr.buildPackages and not just avr?
I'm asking because the error message actually suggests you are trying to build avrlibc for your build platform.
how are you supposed to build avrlibc
I'd assume
avr = with pkgs.pkgsCross.avr; [
binutils
gcc
avrdude
avrlibc
];
but I did not test.
doesn't work
pkgsCross.avr.stdenv.cc.libc
is in the cache on hydra.
this flake works
{
description = "Avr Dev Env";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, ... }:
{
devShell."x86_64-linux" =
let
pkgs = import nixpkgs {
system = "x86_64-linux";
};
avr = with pkgs.pkgsCross.avr; [
stdenv.cc
stdenv.cc.libc
];
in
pkgs.mkShell {
name = "Wearables-shell";
buildInputs = avr;
nativeBuildInputs = with pkgs; [ avrdude ];
};
};
}
Steps To Reproduce
Steps to reproduce the behavior:
build the flake
Build log
Build Log
``` error: … while calling the 'derivationStrict' builtin atAdditional context
none
Metadata
"x86_64-linux"
Linux 6.6.61, NixOS, 25.05 (Warbler), 25.05beta708622.5e4fbfb6b3de
yes
yes
nix-env (Nix) 2.24.10
"home-manager, nixos, nixos-24.05-24.05"
/nix/var/nix/profiles/per-user/root/channels/nixos
Notify maintainers
Note for maintainers: Please tag this issue in your PR.
Add a :+1: reaction to issues you find important.