haskell.nix
haskell.nix copied to clipboard
shellFor results in cache misses for curl, perl, ...
Quite possibly expected behavior or a user error, but I'm surprised to see all the cache misses with nix-shell -A shellFor
. The haskell-related stuff seems to get pulled from cache as expected, but I'm having to build perl
and curl
and [...] for some reason. Which is weird as the Nix hydra definitely has these basic packages cached for 20.09. I'm guessing it's either due to a) overlays or b) an old 20.09 commit pinned.
{ # Fetch the latest haskell.nix and import its default.nix
haskellNix ? import (builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz") {}
# haskell.nix provides access to the nixpkgs pins which are used by our CI,
# hence you will be more likely to get cache hits when using these.
# But you can also just use your own, e.g. '<nixpkgs>'.
, nixpkgsSrc ? haskellNix.sources.nixpkgs-2009
# haskell.nix provides some arguments to be passed to nixpkgs, including some
# patches and also the haskell.nix functionality itself as an overlay.
, nixpkgsArgs ? haskellNix.nixpkgsArgs
# import nixpkgs with overlays
, pkgs ? import nixpkgsSrc nixpkgsArgs
}: pkgs.haskell-nix.project {
# 'cleanGit' cleans a source directory based on the files known by git
src = pkgs.haskell-nix.haskellLib.cleanGit {
name = "tylerbenstercom";
src = ./.;
};
postInstall = ''
wrapProgram $out/bin/site \
--set LANG "en_US.UTF-8" \
--set LOCALE_ARCHIVE "${pkgs.glibcLocales}/lib/locale/locale-archive"
'';
# Specify the GHC version to use.
compiler-nix-name = "ghc8102"; # Not required for `stack.yaml` based projects.
}
That is odd. Is https://cache.nixos.org
included in substituters
in your nix.config
along with its trusted-public-keys
entry cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.