diff --git a/doc/build-helpers.md b/doc/build-helpers.md index 06737e166760..010665484cfd 100644 --- a/doc/build-helpers.md +++ b/doc/build-helpers.md @@ -20,6 +20,7 @@ There is no uniform interface for build helpers. build-helpers/fetchers.chapter.md build-helpers/trivial-build-helpers.chapter.md build-helpers/testers.chapter.md +build-helpers/dev-shell-tools.chapter.md build-helpers/special.md build-helpers/images.md hooks/index.md diff --git a/doc/build-helpers/dev-shell-tools.chapter.md b/doc/build-helpers/dev-shell-tools.chapter.md new file mode 100644 index 000000000000..09b9893daff7 --- /dev/null +++ b/doc/build-helpers/dev-shell-tools.chapter.md @@ -0,0 +1,14 @@ +# Development Shell helpers {#chap-devShellTools} + +The `nix-shell` command has popularized the concept of transient shell environments for development or testing purposes. + +However, `nix-shell` is not the only way to create such environments, and even `nix-shell` itself can indirectly benefit from this library. + +This library provides a set of functions that help create such environments. + + diff --git a/pkgs/build-support/dev-shell-tools/README.md b/pkgs/build-support/dev-shell-tools/README.md new file mode 100644 index 000000000000..d6d9a8c8ad0d --- /dev/null +++ b/pkgs/build-support/dev-shell-tools/README.md @@ -0,0 +1,13 @@ + +# `devShellTools` + +This directory implements the `pkgs.devShellTools` library. + +# Contributing to `devShellTools` + +- Documentation should be contributed to the Nixpkgs manual, not here. + +- Tests are available in the `tests` directory. + You may run them with `nix-build -A tests.devShellTools`. + +- See [../../README.md](../../README.md) for more information on contributing to Nixpkgs. diff --git a/pkgs/build-support/dev-shell-tools/default.nix b/pkgs/build-support/dev-shell-tools/default.nix new file mode 100644 index 000000000000..b61813bb4eb6 --- /dev/null +++ b/pkgs/build-support/dev-shell-tools/default.nix @@ -0,0 +1,4 @@ +{ }: + +{ +} diff --git a/pkgs/build-support/dev-shell-tools/tests/default.nix b/pkgs/build-support/dev-shell-tools/tests/default.nix new file mode 100644 index 000000000000..d8147ea85118 --- /dev/null +++ b/pkgs/build-support/dev-shell-tools/tests/default.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + +} diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index 2b978ff3e1bc..1b7882bcbed3 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -83,6 +83,8 @@ with pkgs; inherit gccTests; }; + devShellTools = callPackage ../build-support/dev-shell-tools/tests { }; + stdenv-inputs = callPackage ./stdenv-inputs { }; stdenv = callPackage ./stdenv { }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c202166f41a8..f5520bfe3631 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -837,6 +837,8 @@ with pkgs; grsync = callPackage ../applications/misc/grsync { }; + devShellTools = callPackage ../build-support/dev-shell-tools { }; + dockerTools = callPackage ../build-support/docker { writePython3 = buildPackages.writers.writePython3; } // { __attrsFailEvaluation = true; };