Skip to content

Instantly share code, notes, and snippets.

@coder054
Forked from D7x7w9pHnT-cmd/.envrc
Created November 3, 2024 20:29
Show Gist options
  • Save coder054/18c22b2b6b4e259d945424d42e0219b5 to your computer and use it in GitHub Desktop.
Save coder054/18c22b2b6b4e259d945424d42e0219b5 to your computer and use it in GitHub Desktop.
Purescript Environment and IDE in Nix
# Use with direnv. I use it in zsh and it seems to work pretty well for me.
# https://nixos.wiki/wiki/Development_environment_with_nix-shell
# https://direnv.net/
use_nix
# Reference notes on Nix Shell
# https://nix.dev/tutorials/declarative-and-reproducible-developer-environments.html
# https://nix.dev/reference/pinning-nixpkgs.html#ref-pinning-nixpkgs
# Pinned to 20.09 release:
# https://github.com/NixOS/nixpkgs/commit/cd63096d6d887d689543a0b97743d28995bc9bc3
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/cd63096d6d887d689543a0b97743d28995bc9bc3.tar.gz") {} }:
pkgs.mkShell {
buildInputs = (with pkgs; [
purescript
spago
nodePackages.purescript-language-server
nodePackages.pscid
(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 = "ide-purescript";
publisher = "nwolverson";
version = "0.23.2";
sha256 = "56f62302f50bbb83c7c3ec258d445f7f9f74f7961446fd6f8e5d6c85d48d16a3";
}
{
name = "language-purescript";
publisher = "nwolverson";
version = "0.2.4";
sha256 = "fc2cc16515dd9840418ae5deada644c4638a05e51a50f21ac807499ec08c8699";
}
{
name = "dhall-lang";
publisher = "dhall";
version = "0.0.4";
sha256 = "eef610dd3a368488ac9a8f48416456c0ab2ee255d9521d0eafcf560cb3264069";
}
];
})
]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment