Skip to content

Commit

Permalink
Use extra-packages in modules/hackage-project.nix (#2310)
Browse files Browse the repository at this point in the history
This is a step towards removing the dependency on `hackage.nix`.

Instead of looking up the source for a tool using `hackage.nix` it lets `make-install-plan` to it using the cabal planner (based on an `extra-packages:` entry in a `cabal.project` file).
  • Loading branch information
hamishmack authored Feb 5, 2025
1 parent cc140d1 commit 908d11a
Show file tree
Hide file tree
Showing 141 changed files with 1,107 additions and 7,031 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/upload-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Wait for nix-tools meta job
uses: input-output-hk/actions/wait-for-hydra@angerman/support-prs
with:
status: 'ci/hydra-build:nix-tools'
check: 'nix-tools'

- name: "Pull nix-tools"
run: |
Expand Down
4 changes: 3 additions & 1 deletion lib/load-cabal-plan.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ in {
then import (nixFilesDir + "/cabal-files/${p.pkg-name}.nix")
else if builtins.pathExists (nixFilesDir + "/.plan.nix/${p.pkg-name}.nix")
then import (nixFilesDir + "/.plan.nix/${p.pkg-name}.nix")
else (((hackage.${p.pkg-name}).${p.pkg-version}).revisions).default) (args // { hsPkgs = {}; });
else
# TODO make this an error?
__trace "WARNING no `.nix` file for ${p.pkg-name} in ${nixFilesDir}." {}) (args // { hsPkgs = {}; });
in pkgs.lib.optionalAttrs (p ? pkg-src-sha256) {
sha256 = p.pkg-src-sha256;
} // pkgs.lib.optionalAttrs (p.pkg-src.type or "" == "source-repo") {
Expand Down
141 changes: 0 additions & 141 deletions materialized/alex-3.2.7.1/.plan.nix/alex.nix

This file was deleted.

57 changes: 57 additions & 0 deletions materialized/alex-3.2.7.1/cabal-files/alex.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions materialized/alex-3.2.7.1/ghc902/default.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 908d11a

Please sign in to comment.