Skip to content

Instantly share code, notes, and snippets.

@countoren
Created August 17, 2019 21:51
Show Gist options
  • Save countoren/8991e7a71d0356de89e2dc74c4d813e6 to your computer and use it in GitHub Desktop.
Save countoren/8991e7a71d0356de89e2dc74c4d813e6 to your computer and use it in GitHub Desktop.
hie = (import (fetchFromGitHub {
owner="domenkozar";
repo="hie-nix";
# 0.6.0.0
rev="6794005";
sha256="0pc90ns0xcsa6b630d8kkq5zg8yzszbgd7qmnylkqpa0l58zvnpn";
}) { });
hieWrapper = writeShellScriptBin "hieWrapper" ''
${hie.hie86}/bin/hie "$@"
'';
vscode = vscode-with-extensions.override {
# When the extension is already available in the default extensions set.
vscodeExtensions = with vscode-extensions;
[
bbenoist.Nix
]
++
# Concise version from the vscode market place when not available in the default set.
vscode-utils.extensionsFromVscodeMarketplace [
{
name = "theme-dracula-at-night";
publisher = "bceskavich";
version = "2.5.0";
sha256 = "03wxaizmhsq8k1mlfz246g8p8kkd21h2ajqvvcqfc78978cwvx3p";
}
{
name = "vsc-material-theme";
publisher = "equinusocio";
version = "2.8.2";
sha256 = "04hixd2bv7dd46pcs4mflr7xzfz273zai91k67jz6589bd8m93av";
}
{
name = "gitlens";
publisher = "eamodio";
version = "9.5.1";
sha256 = "10s2g98wv8i0w6fr0pr5xyi8zmh229zn30jn1gg3m5szpaqi1v92";
}
{
name = "vscode-hie-server";
publisher = "alanz";
version = "0.0.25";
sha256 = "0m21w03v94qxm0i54ki5slh6rg7610zfxinfpngr0hfpgw2nnxvc";
}
{
name = "language-haskell";
publisher = "justusadam";
version = "2.5.0";
sha256 = "10jqj8qw5x6da9l8zhjbra3xcbrwb4cpwc3ygsy29mam5pd8g6b3";
}
# {
# name = "brittany";
# publisher="maxgabriel";
# version="0.0.6";
# sha256= "1v47an1bad5ss4j5sajxia94r1r4yfyvbim5wax4scr0d5bdgv54";
# }
];
};
codeWrapper = runCommand "${vscode.name}" { nativeBuildInputs = [ makeWrapper ]; } ''
mkdir -p $out/bin
makeWrapper \
${vscode}/bin/code \
$out/bin/code \
--prefix PATH : ${lib.makeBinPath [ hieWrapper cabal-install ]}
'';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment