Skip to content

Instantly share code, notes, and snippets.

@Kiwi

Kiwi/shell.nix Secret

Created December 20, 2020 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kiwi/e055dc459d8c967851f1f76c7ac8a790 to your computer and use it in GitHub Desktop.
Save Kiwi/e055dc459d8c967851f1f76c7ac8a790 to your computer and use it in GitHub Desktop.
mostlyabsurd shell.nix for shapr haskell-language-server
{ nixpkgs ? ((fetchTarball "channel:nixos-20.09")), compiler ? "ghc884" }:
let
config = {
allowBroken = true;
packageOverrides = super:
let self = super.pkgs;
in {
haskell = super.haskell // {
packages = super.haskell.packages // {
${compiler} = super.haskell.packages.${compiler}.override {
overrides = self: super:
with pkgs.haskell.lib; {
pandoc-include-code = doJailbreak super.pandoc-include-code;
hakyll = super.callHackageDirect {
pkg = "hakyll";
ver = "4.13.4.1";
sha256 =
"sha256-s1VfSPYwCbT3wagcibTXPRWQouJmDOqm7k+bQUo6yTY=";
} { };
};
};
};
};
};
};
hindent =
(import (fetchTarball "channel:nixos-20.03") { }).haskellPackages.hindent;
pkgs = import nixpkgs { inherit config; };
ghc = pkgs.haskell.packages.${compiler}.ghcWithHoogle (ps:
with ps; [
JuicyPixels
JuicyPixels-extra
hakyll
hakyll-images
#######
brittany
cabal-bounds
cabal-edit
haskell-language-server
hlint
#######
blaze-html
bytestring
constraints
containers
enclosed-exceptions
filepath
fsnotify
hinotify
http2
http-conduit
lifted-async
lifted-base
pandoc
pandoc-citeproc
pandoc-include-code
pandoc-types
rfc5051
shelly
split
text
time
unordered-containers
wai-app-static
wai-extra
warp
xml-conduit
]);
purifycss = (import ./nix/purifycss { inherit pkgs; }).purifycss;
in pkgs.stdenv.mkDerivation {
name = "www-mostlyabsurd-com";
buildInputs = with pkgs; [
cabal-install
ghc
ghcid
hindent
html-tidy
imagemagick
inotifyTools
nodePackages.node2nix
nodePackages.npm
nodePackages.prettier
nodejs
purifycss
sass
which
zlib
];
shellHook = ''
eval $(egrep ^export ${ghc}/bin/ghc)
export HIE_HOOGLE_DATABASE="$(cat $(which hoogle) | sed -n -e 's|.*--database \(.*\.hoo\).*|\1|p')"
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment