`mkShellArgs.packages` does not work
Nobody has claimed this yet.
- Dominant language
- Nix
- Stars
- 240
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
An application I'm writing uses an SQLite database, so I wanted to include the sqlite3 executable in the nix develop shell. I passed sqlite-interactive through mkShellArgs and the package is added to the nix store, but the PATH variable is not updated. My flake.nix looks like
{
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = nixpkgs.lib.systems.flakeExposed;
imports = [ inputs.haskell-flake.flakeModule ];
perSystem = { self', pkgs, ... }: {
haskellProjects.default = {
packages = { };
devShell = {
tools = hp: { };
mkShellArgs = {
packages = [ pkgs.sqlite-interactive ];
};
};
};
packages.default = self'.packages.imgr;
};
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";
};
}
I currently use a shellHook as a work-around:
shellHook = "export PATH=$PATH:${pkgs.sqlite-interactive}/bin"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the mkShellArgs configuration in the reported flake.nix and reproduce the issue with nix develop. Trace how packages is passed into the development shell, then verify that the resulting shell PATH includes the sqlite3 executable without relying on shellHook.
Written by the indexing model from the issue text.
Assessment
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100