I’m trying to run a development shell with a self-contained nix store (specifying --store
argument) on NixOS.
When I run the command, it fails with:
$ nix develop --store /tmp/nixstuff/storage
error (ignored): error: package 'nixpkgs#bashInteractive' does not provide a 'bin/bash'
error: unable to exec 'bash': No such file or directory
File structure (/tmp/nixstuff
):
.
├── src
│ ├── flake.lock
│ └── flake.nix
└── storage
└── nix
├── store
└── var
flake.nix
{
description = "Simple test";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
in
{
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.bashInteractive
pkgs.hello
];
};
}
);
}
Any ideas?