Open pniedzwiedzinski opened 1 month ago
@pniedzwiedzinski This seems to work:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixenvs = {
url = "github:nix-community/nix-environments";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ nixpkgs, nixenvs, ... }:
let
system = "x86_64-linux";
in
{
devShell.${system} =
let
pkgs = import nixpkgs { inherit system; };
arduino = import (builtins.toPath nixenvs.outPath + "/envs/arduino/shell.nix") {
inherit pkgs;
extraPkgs = with pkgs; [ arduino-cli ];
};
in
arduino;
};
}
mkShell
has this helper called inputsFrom
which might be useful. Doesn't work for fhs env very well so.
I actually copied and modified .nix files for arduino-ide and arduino-cli to allow overriding extraPkgs, as I needed python with pyserial, which none of those could use both with mkShell and fhs env.
Hi, Is there a way to add extraPkgs while using flakes? I'm trying to overrideAttrs, but that's not working with
buildFHSUserEnv
: