Skip to content

mkShellArgs.packages does not work #436

Description

@MiksuR

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"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions