mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
29 lines
686 B
Nix
29 lines
686 B
Nix
{
|
|
pkgs ? import <nixpkgs> { },
|
|
treefmt ? null,
|
|
nix-direnv ? (pkgs.callPackage ./default.nix { }),
|
|
test_pkgs ? (pkgs.lib.callPackagesWith pkgs ./tests { inherit nix-direnv; }),
|
|
}:
|
|
let
|
|
inherit (pkgs) lib;
|
|
in
|
|
pkgs.mkShell {
|
|
DIRENV_STDLIB = "${test_pkgs.direnv-stdlib}";
|
|
BATS_LIB_PATH = lib.strings.makeSearchPath "" (
|
|
with test_pkgs;
|
|
[
|
|
bats-support
|
|
bats-assert
|
|
]
|
|
);
|
|
packages =
|
|
(builtins.attrValues {
|
|
inherit (pkgs)
|
|
bats
|
|
direnv
|
|
shellcheck
|
|
;
|
|
})
|
|
++ (builtins.attrValues (lib.attrsets.filterAttrs (name: _val: name != "direnv-stdlib") test_pkgs))
|
|
++ lib.optionals (treefmt != null) [ treefmt ];
|
|
}
|