File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 6
6
7
7
# Only include derivations that exist in the current pkgs.
8
8
# This allows us to use this mapping to be used in allPkgConfigWrapper.
9
- # See ./overlas
9
+ # See ./overlays
10
10
lookupAttrsIn = x : __mapAttrs ( _pname : names :
11
- # The first entry is should be used for the version by allPkgConfigWrapper
12
- # so we need it to be present.
13
- if __length names != 0 && x ? ${ __head names }
14
- then
15
- pkgs . lib . concatMap (
16
- name : if x ? ${ name } then [ x . ${ name } ] else [ ] ) names
17
- else [ ] ) ;
11
+ # The first entry is should be used for the version by allPkgConfigWrapper
12
+ # so we need it to be present.
13
+ with pkgs . lib ; optionals ( __length names != 0 && x ? ${ __head names } )
14
+ ( concatMap
15
+ ( name : optionals ( x ? ${ name } )
16
+ ( let p = __tryEval ( x . ${ name } ) ; in optionals p . success p . value ) )
17
+ names ) ) ;
18
18
in lookupAttrsIn pkgs ( {
19
19
# Based on https://github.com/NixOS/cabal2nix/blob/11c68fdc79461fb74fa1dfe2217c3709168ad752/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs#L23
20
20
You can’t perform that action at this time.
0 commit comments