-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a shell.nix and instructions for using it
I have mixed feelings about this. On the one hand, it feels like which tools a developer uses in their environment shouldn't bleed into the source repository. On the other hand, getting a proper Cats development environment includes wrangling some finicky bits that can be tricky for a Scala developer (such as managing Jekyll and Node.js versions). I'm generally in favor of lowering this barrier and using a deterministic build environment. I've been using something like this for a while when working on Cats and thought that I'd put together this PR in case others are interested in doing the same. If people aren't crazy about this, it's no big deal; it's easy enough to have it ignored by git.
- Loading branch information
Showing
2 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
let | ||
|
||
# use a pinned version of nixpkgs for reproducability | ||
nixpkgs-version = "18.09"; | ||
pkgs = import (builtins.fetchTarball { | ||
# Descriptive name to make the store path easier to identify | ||
name = "nixpkgs-${nixpkgs-version}"; | ||
url = "https://github.com/nixos/nixpkgs/archive/${nixpkgs-version}.tar.gz"; | ||
# Hash obtained using `nix-prefetch-url --unpack <url>` | ||
sha256 = "1ib96has10v5nr6bzf7v8kw7yzww8zanxgw2qi1ll1sbv6kj6zpd"; | ||
}) {}; | ||
in | ||
with pkgs; | ||
stdenv.mkDerivation { | ||
name = "cats-dev-env"; | ||
|
||
buildInputs = with pkgs; [ | ||
sbt | ||
git # used by sbt-buildinfo | ||
nodejs # used by scala.js | ||
jekyll # used by sbt-microsites | ||
gawk # used by scripts/parse-test-durations.awk | ||
graphviz # used for ScalaDoc diagrams | ||
]; | ||
} |