File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change
1
+ # Mark everthing in the install-plan as "planned"
2
+ { getComponents } :
3
+ { config , lib , ...} : {
4
+ packages = lib . listToAttrs ( map ( p :
5
+ let components =
6
+ if p ? component-name
7
+ then { ${ p . component-name } = { inherit ( p ) depends exe-depends ; } ; }
8
+ else p . components or { } ;
9
+ in {
10
+ name = p . id ;
11
+ value . components = lib . mapAttrs ( type : x :
12
+ if type == "library" || type == "setup"
13
+ then { planned = lib . mkOverride 900 true ; }
14
+ else
15
+ lib . mapAttrs ( _ : _ : {
16
+ planned = lib . mkOverride 900 true ;
17
+ } ) x
18
+ ) ( getComponents null { } p ) ;
19
+ } ) config . plan-json . install-plan ) ;
20
+ }
Original file line number Diff line number Diff line change @@ -678,7 +678,6 @@ final: prev: {
678
678
name = final . lib . removePrefix "${ prefix } :" n ;
679
679
value = ( if cabal2nixComponents == null then { } else cabal2nixComponents . ${ collectionName } . ${ name } ) // {
680
680
buildable = true ;
681
- planned = final . lib . mkOverride 900 true ;
682
681
} // lookupDependencies hsPkgs c . depends c . exe-depends ;
683
682
in { inherit name value ; }
684
683
) ) components ) ) ;
@@ -687,12 +686,10 @@ final: prev: {
687
686
// final . lib . optionalAttrs ( components ? lib ) {
688
687
library = ( if cabal2nixComponents == null then { } else cabal2nixComponents . library ) // {
689
688
buildable = true ;
690
- planned = final . lib . mkOverride 900 true ;
691
689
} // lookupDependencies hsPkgs components . lib . depends components . lib . exe-depends ;
692
690
} // final . lib . optionalAttrs ( components ? setup ) {
693
691
setup = {
694
692
buildable = true ;
695
- planned = final . lib . mkOverride 900 true ;
696
693
} // lookupDependencies hsPkgs . pkgsBuildBuild ( components . setup . depends or [ ] ) ( components . setup . exe-depends or [ ] ) ;
697
694
} ;
698
695
callProjectResults = callCabalProjectToNix config ;
@@ -782,6 +779,7 @@ final: prev: {
782
779
{ inherit plan-json ; }
783
780
( import ../modules/install-plan/non-reinstallable.nix )
784
781
( import ../modules/install-plan/override-package-by-name.nix )
782
+ ( import ../modules/install-plan/planned.nix { inherit getComponents ; } )
785
783
( import ../modules/install-plan/redirect.nix )
786
784
] ;
787
785
} ;
You can’t perform that action at this time.
0 commit comments