{
description = "virtual environment with python and streamlit";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
python=pkgs.python311;
python_packages= python.withPackages(ps: with ps;[
ipython
matplotlib
pandas
streamlit
]);
myDevTools = [
python_packages
];
in {
devShells.default = pkgs.mkShell {
buildInputs = myDevTools;
};
});
}
the command nix develop works fine until I add the package streamlit
error: … while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available) … while evaluating derivation 'nix-shell' whose name attribute is located at /nix/store/s1z7nb9n6r5n0r34fabp6yybwkbr8mjk-source/pkgs/stdenv/generic/make-derivation.nix:303:7 … while evaluating attribute 'buildInputs' of derivation 'nix-shell' at /nix/store/s1z7nb9n6r5n0r34fabp6yybwkbr8mjk-source/pkgs/stdenv/generic/make-derivation.nix:350:7: 349| depsHostHost = lib.elemAt (lib.elemAt dependencies 1) 0; 350| buildInputs = lib.elemAt (lib.elemAt dependencies 1) 1; | ^ 351| depsTargetTarget = lib.elemAt (lib.elemAt dependencies 2) 0; (stack trace truncated; use '--show-trace' to show the full trace) error: undefined variable 'streamlit' at /nix/store/zxv0741pn2r7h0vk1f1i9knvybfh3yff-source/flake.nix:15:11: 14| pandas 15| streamlit