mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 06:52:43 +01:00
Merge pull request #14489 from roberth/shell-a-la-carte
Infer devShell deps, provide smaller one
This commit is contained in:
commit
918c1a9e58
10 changed files with 264 additions and 90 deletions
|
|
@ -2,7 +2,16 @@
|
|||
lib,
|
||||
stdenv,
|
||||
mkMesonDerivation,
|
||||
buildPackages,
|
||||
|
||||
meson,
|
||||
ninja,
|
||||
pkg-config,
|
||||
|
||||
jq,
|
||||
git,
|
||||
mercurial,
|
||||
unixtools,
|
||||
util-linux,
|
||||
|
||||
nix-store,
|
||||
nix-expr,
|
||||
|
|
@ -37,17 +46,20 @@ mkMesonDerivation (
|
|||
./.
|
||||
];
|
||||
|
||||
# Hack for sake of the dev shell. Need to "manually splice" since
|
||||
# this isn't a specially-recognized list of dependencies.
|
||||
passthru.externalNativeBuildInputs = [
|
||||
buildPackages.meson
|
||||
buildPackages.ninja
|
||||
buildPackages.pkg-config
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
|
||||
buildPackages.jq
|
||||
buildPackages.git
|
||||
buildPackages.mercurial
|
||||
buildPackages.unixtools.script
|
||||
jq
|
||||
git
|
||||
mercurial
|
||||
unixtools.script
|
||||
|
||||
# Explicitly splice the hostHost variant to fix LLVM tests. The nix-cli
|
||||
# has to be in PATH, but must come from the host context where it's built
|
||||
# with libc++.
|
||||
(nix-cli.__spliced.hostHost or nix-cli)
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
# For various sandboxing tests that needs a statically-linked shell,
|
||||
|
|
@ -56,14 +68,7 @@ mkMesonDerivation (
|
|||
# For Overlay FS tests need `mount`, `umount`, and `unshare`.
|
||||
# For `script` command (ensuring a TTY)
|
||||
# TODO use `unixtools` to be precise over which executables instead?
|
||||
buildPackages.util-linux
|
||||
];
|
||||
|
||||
nativeBuildInputs = finalAttrs.passthru.externalNativeBuildInputs ++ [
|
||||
# Explicitly splice the hostHost variant to fix LLVM tests. The nix-cli
|
||||
# has to be in PATH, but must come from the host context where it's built
|
||||
# with libc++.
|
||||
(nix-cli.__spliced.hostHost or nix-cli)
|
||||
util-linux
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue