Skip to content

Commit

Permalink
Add available targets to plan.json
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Aug 9, 2024
1 parent 1d112d8 commit 3e1c1b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions nix-tools/cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ allow-newer:
hnix-store-core:cryptonite,
hnix-store-core:bytestring

source-repository-package
type: git
location: /~https://github.com/haskell/cabal.git
tag: c0647bc914928ab6362278c73f17b084ca3ed9ab
subdir: cabal-install
--sha256: sha256-BQs6ciCKWNzsEdUewEvUu4lcyrI5DH7abKzM4035lSc=

source-repository-package
type: git
location: /~https://github.com/michaelpj/hackage-db.git
Expand Down
4 changes: 2 additions & 2 deletions nix-tools/nix-tools/make-install-plan/MakeInstallPlan.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Distribution.Client.NixStyleOptions (NixStyleFlags (..), defaultNixStyleF
import Distribution.Client.ProjectConfig
import Distribution.Client.ProjectOrchestration
import Distribution.Client.ProjectPlanOutput (writePlanExternalRepresentation)
import Distribution.Client.ProjectPlanning (ElaboratedConfiguredPackage (..), rebuildInstallPlan)
import Distribution.Client.ProjectPlanning (ElaboratedConfiguredPackage (..), rebuildInstallPlan, availableTargets)
import Distribution.Client.Setup
import Distribution.Client.Types.PackageLocation (PackageLocation (..))
import Distribution.Client.Types.Repo (LocalRepo (..), RemoteRepo (..), Repo (..))
Expand Down Expand Up @@ -74,7 +74,7 @@ installPlanAction verbosity cliConfig = do

-- Write plan.json
Cabal.notice verbosity $ "Writing plan.json to " ++ distProjectCacheFile distDirLayout "plan.json"
writePlanExternalRepresentation distDirLayout elaboratedPlan elaboratedSharedConfig
writePlanExternalRepresentation distDirLayout elaboratedPlan elaboratedSharedConfig (availableTargets elaboratedPlan)

-- Write cabal.freeze
let freezeConfig = projectFreezeConfig elaboratedPlan totalIndexState activeRepos
Expand Down

0 comments on commit 3e1c1b9

Please sign in to comment.