From 9160a7908906e5b7ac6d933d99b02754a5c1ea92 Mon Sep 17 00:00:00 2001 From: Andrey Vlasov Date: Sun, 14 Apr 2024 20:27:28 +0400 Subject: [PATCH 1/3] Add shell.nix --- shell.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 shell.nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..af43cbc --- /dev/null +++ b/shell.nix @@ -0,0 +1,11 @@ +let + nixpkgs = builtins.fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/294c3605a3a57773242d8585ab1815cd61d4a65f.tar.gz"; + }; + pkgs = import nixpkgs {}; +in + pkgs.mkShell { + nativeBuildInputs = [ + pkgs.racket + ]; + } From 0f41153a9899803f85c80fe72d5e502b4eee7a47 Mon Sep 17 00:00:00 2001 From: Andrey Vlasov Date: Sun, 14 Apr 2024 20:32:04 +0400 Subject: [PATCH 2/3] Mention shell.nix README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4abe6a7..774025c 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Here’s some sample Hackett code that demonstrates some of Hackett’s features To reiterate: **Hackett is extremely experimental right now.** Things are not guaranteed to work correctly (or work at all), and things are likely to change dramatically. If you really want to install Hackett to play around with it, though, you can. -You will need to have Racket installed to use Hackett. Using `raco`, you can install Hackett as a package: +You will need to have Racket v6 installed to use Hackett. Using `raco`, you can install Hackett as a package: ``` $ raco pkg install hackett @@ -69,3 +69,9 @@ Now you can use Hackett by writing `#lang hackett` at the top of a file. [hackett-docs]: https://lexi-lambda.github.io/hackett/ [types-as-macros]: http://www.ccs.neu.edu/home/stchang/pubs/ckg-popl2017.pdf + +### Nix + +Since Racket v6 is quite old, `shell.nix` is provided for convenience. Use `nix-shell` to enter shell with Racket v6.12. + +> To install Nix, use either [official](https://nixos.org/download/) or [modernized](https://determinate.systems/posts/determinate-nix-installer/) installer. From feb15a2199a1839d565396ac748b69e8a81a691a Mon Sep 17 00:00:00 2001 From: Andrey Vlasov Date: Sun, 14 Apr 2024 20:39:49 +0400 Subject: [PATCH 3/3] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 774025c..d282128 100644 --- a/README.md +++ b/README.md @@ -75,3 +75,5 @@ Now you can use Hackett by writing `#lang hackett` at the top of a file. Since Racket v6 is quite old, `shell.nix` is provided for convenience. Use `nix-shell` to enter shell with Racket v6.12. > To install Nix, use either [official](https://nixos.org/download/) or [modernized](https://determinate.systems/posts/determinate-nix-installer/) installer. + +> Note that you don't need this repository cloned to use the `shell.nix`. Only file itself is needed.