Create unfuck shell for people, who can't use default nix shell, that is installing packages

This commit is contained in:
Andrei Borzenkov 2024-10-21 11:57:56 +04:00
parent 2b97d5a164
commit 103fb2e98a
No known key found for this signature in database
1 changed files with 34 additions and 28 deletions

View File

@ -113,6 +113,36 @@ outputs = { self, nixpkgs, flake-utils, ... }@inputs:
packagesDynamic = makePackages pkgs;
packagesStatic = makePackages pkgs.pkgsStatic;
makeShell = packages_: pkgs.haskellPackages.shellFor {
packages = _: packages_;
buildInputs = (
with pkgs.haskellPackages; [
ghc
ghcid
cabal-install
haskell-language-server
hoogle
# htags
text-icu
pkgs.icu72
pkgs.openssl
weeder
]
++
[ pkgs.pkg-config
pkgs.libsodium
pkgs.file
pkgs.zlib
inputs.hspup.packages.${pkgs.system}.default
]
);
shellHook = ''
export GIT_HASH="${self.rev or self.dirtyRev or "dirty"}"
'';
};
in {
legacyPackages = pkgs;
overlays.default = defaultOverlay;
@ -134,35 +164,11 @@ outputs = { self, nixpkgs, flake-utils, ... }@inputs:
};
devShells.default = pkgs.haskellPackages.shellFor {
packages = _: [];
buildInputs = (
with pkgs.haskellPackages; [
ghc
ghcid
cabal-install
haskell-language-server
hoogle
# htags
text-icu
magic
pkgs.icu72
pkgs.openssl
weeder
]
++
[ pkgs.pkg-config
pkgs.libsodium
pkgs.file
pkgs.zlib
inputs.hspup.packages.${pkgs.system}.default
]
devShells = {
default = makeShell (
pkgs.lib.attrVals (packageNames ++ miscellaneous) pkgs.haskellPackages
);
shellHook = ''
export GIT_HASH="${self.rev or self.dirtyRev or "dirty"}"
'';
unfuck = makeShell [];
};
}
);