Skip to content

Add available targets to plan.json #2238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions nix-tools-static.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
pkgs: let baseurl = "https://github.com/input-output-hk/haskell.nix/releases/download/nix-tools-0.2.3/"; in {
pkgs: let baseurl = "https://github.com/input-output-hk/haskell.nix/releases/download/nix-tools-0.2.6/"; in {
aarch64-darwin = pkgs.fetchurl {
name = "aarch64-darwin-nix-tools-static";
url = "${baseurl}aarch64-darwin-nix-tools-static.zip";
sha256 = "sha256-nqoUqIS5rf8xSmhNzIlJQ0RoWEP/YtcDfDhCynLtoUo=";
sha256 = "sha256-9WpTIWlpUvG3pI+tcbAMh6sMH0QO/coZrxDYWD43iq0=";
};
x86_64-darwin = pkgs.fetchurl {
name = "x86_64-darwin-nix-tools-static";
url = "${baseurl}x86_64-darwin-nix-tools-static.zip";
sha256 = "sha256-JyMCCAgxjzPvHguROSfsxgXhd0r6VUfTz0EptXIlA1k=";
sha256 = "sha256-UUr9bo2OpLPsvHRSeO2B6DKVDVTsHepRlTqN6UZoZ2M=";
};
aarch64-linux = pkgs.fetchurl {
name = "aarch64-linux-nix-tools-static";
url = "${baseurl}aarch64-linux-nix-tools-static.zip";
sha256 = "sha256-gntMNnt9eqca7HDE9d2G1qa42hpaQHUxZydLvDeGWrk=";
sha256 = "sha256-96s6RXN8st0JK0eYSOkTJvnlTxYVdE81+ZUGJEsC46A=";
};
x86_64-linux = pkgs.fetchurl {
name = "x86_64-linux-nix-tools-static";
url = "${baseurl}x86_64-linux-nix-tools-static.zip";
sha256 = "sha256-eDKGGAHtzAK4DiYputoE96yf/pbVRB9RBr2bVqEES4c=";
sha256 = "sha256-LMFVUKNycjVFBb3ChZsPbRNgab50zOHl7nMBrDdeTrQ=";
};
}
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