TODO: what is this document about
for Scale by The Bay
Content:
- 1. Why Nix?
- 2. Developmnent shell
- 3. Declarative development environment
- 4. Reproducible CI
- 5. Better docker images
- 6. Sbt + Nix
$ curl -L https://nixos.org/nix/install | sh
$ nix-shell -p scala sbt
$ cat shell.nix
{ pkgs ? import <nixpkgs> {}
}:
pkgs.mkShell {
buildInputs =
[ pkgs.sbt
];
}
$ nix-shell
$ nix-shell --command "scala"
$ nix-shell --command "sbt clean compile test"
$ cat docker.nix
{ pkgs ? import <nixpkgs> {}
}:
pkgs.dockerTools.buildLayeredImage {
name = "nix-scala";
tag = "latest";
contents =
[ pkgs.sbt
];
}
$ mkdir demo
$ cd demo
$ sbt new gvolpe/sbt-nix.g8