我正在寻找类似的东西:
shell.nix
{ pkgs ? import <nixpkgs> {} }:
let
threadscope = ...
speedscope = ...
in
stdenv.mkDerivation {
name = "haskell-env";
nativeBuildInputs = [
# Haskell tools
ghcid ghc
# Profiling tools
threadscope
speedscope
];
}
然后我可以使用nix-shell
:
% nix-shell
...
nix-shell % threadscope <some-commands>
nix-shell % speedscope <some-commands>
您通常只是从 github/hackage/stackage 的源代码构建还是使用pkgs.haskellPackages.<my-package>
?