mirror of
https://github.com/simplex-chat/haskell.nix.git
synced 2026-06-03 09:17:32 +00:00
a443611ecf
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).
17 lines
443 B
Nix
17 lines
443 B
Nix
# Cabal packages can depend on operating system packages. However
|
|
# package names vary between distributions - there is no standard.
|
|
#
|
|
# This file augments the nixpkgs package set with extra attributes
|
|
# from the system packages map file.
|
|
#
|
|
# This package set will be used when resolving system package
|
|
# dependencies of package descriptions.
|
|
|
|
pkgs:
|
|
|
|
# Base packages.
|
|
pkgs
|
|
|
|
# Apply the mapping.
|
|
// import ./system-nixpkgs-map.nix pkgs
|