mirror of
https://github.com/ilyakooo0/haskell.nix.git
synced 2024-08-15 09:50:27 +03:00
This adds a way to specify the `evalSystem` or `evalPackages` explicitly when calling the `project` functions. Currently if we want to make a `flake` that supports multiple systems we have few options: * Require builders for all the supported systems (even just for `nix flake show`). * Pass `--impure` so that haskell.nix can see `builtins.currentSystem` to set up `pkgs.evalPackages` to use that. Unfortunately this prevents nix from caching some of the work it does and often results in it recalculating for each supported system when it would otherwise be cached and take no time at all. * Add an overlay to replace `evalPackages`. This works, but it is not straight forward. * Materialize the nix files for the project. This change allows `evalSystem = "x86_64-linux";` to be passed telling `haskell.nix` to run `cabal` and `nix-tools` on that system. The user will have to have a builder for that system, but does not need to have builders for the others (unless building outputs for them). |
||
---|---|---|
.. | ||
external-package-demo | ||
external-package-user | ||
hackage | ||
01-index.tar.gz | ||
default.nix | ||
external-package-demo-0.1.0.0.tar.gz | ||
README.md |
Tests for extra Hackage functionality
This directory contains two packages, external-package-demo
and external-package-user
, the
second one depends on the first one. Both packages were created with cabal init
.
external-package-demo
was uploaded to local Hackage at localhost
and 01-index.tar.gz
from that
Hackage was downloaded to this directory. Then the index file was processed with hackage-to-nix
,
the result is in hackage/
directory.
The tests check that cabalProject'
is able to construct plan with dependencies from extra Hackage
and then build the package itself.