File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 7
7
devshell = final : prev : {
8
8
devshell = let
9
9
in {
10
- packages = final . shell . nativeBuildInputs
11
- # Cannot add the whole final.shell.buildInputs list because many collide with each other when fused.
12
- # So we only add what is really used (by pkg-config):
13
- ++ map ( p : p . dev or p ) ( lib . concatLists ( lib . concatMap ( p : p . components . library . pkgconfig or [ ] ++ p . components . setup . pkgconfig or [ ] ++ lib . concatMap ( c : lib . concatMap ( a : a . pkgconfig ) ( lib . attrValues c ) ) ( lib . attrValues ( removeAttrs p . components [ "library" "setup" ] ) ) )
14
- ( lib . attrValues final . pkg-set . config . packages ) ) )
10
+ packages = lib . filter lib . isDerivation ( final . shell . nativeBuildInputs
15
11
# devshell does not use pkgs.mkShell / pkgs.stdenv.mkDerivation,
16
12
# so we need to explicit required dependencies which
17
13
# are provided implicitely by stdenv when using the normal shell:
18
- ++ ( lib . filter lib . isDerivation final . shell . stdenv . defaultNativeBuildInputs )
14
+ ++ final . shell . stdenv . defaultNativeBuildInputs )
19
15
++ lib . optional final . shell . stdenv . targetPlatform . isGnu final . pkgs . buildPackages . binutils ;
20
16
# We need to expose all the necessary env variables:
21
17
env = [
22
18
{
23
19
name = "PKG_CONFIG_PATH" ;
24
- # devshell fuse every all `packages` into a single directory ($DEVSHELL_DIR), so we use it:
25
- prefix = "$DEVSHELL_DIR/lib/pkgconfig" ;
20
+ value = lib . makeSearchPath "lib/pkgconfig" final . shell . buildInputs ;
26
21
}
27
22
] ++ lib . mapAttrsToList lib . nameValuePair ( {
28
23
inherit ( final . shell ) NIX_GHC_LIBDIR ;
You can’t perform that action at this time.
0 commit comments