about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-12-03 20:55:32 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-12-03 20:55:32 -0800
commit294c135d3ffd8e937bef404703695d7d79599f8e (patch)
treef6aab2b939cc5d1ba98220bc02e6cf3056c17410
parent267489c19fb8f80fec8f8edc0f174dbd08aa657c (diff)
downloadteliva-294c135d3ffd8e937bef404703695d7d79599f8e.tar.gz
elaborate a little more on install instructions
Thanks to Mariano Guerra for the Nix command, and to Konrad Hinsen for
the Guix command.
-rw-r--r--README.md13
-rw-r--r--shell.nix19
2 files changed, 29 insertions, 3 deletions
diff --git a/README.md b/README.md
index a52ff8a..ae2ce76 100644
--- a/README.md
+++ b/README.md
@@ -32,9 +32,16 @@ Make a change, hit `ctrl-e` again, and the app will run with your updates.
 ([video](https://archive.org/details/akkartik-2021-11-14))
 
 You will need some Unix-like platform with a C compiler and the ncurses and
-openssl libraries. So far I've tested Teliva on Linux, Mac OS X and OpenBSD;
-should also work on other flavors of BSD, WSL on Windows, etc. with only minor
-modifications.
+openssl libraries. Some possible commands to install them, depending on your
+OS and package manager of choice:
+
+* `guix shell -D lua openssl -- make linux`
+* `nix-shell --pure` (from a directory containing shell.nix in this repo)
+* `sudo apt install libncursesw6-dev openssl`
+* `brew install ncurses openssl`
+
+So far I've tested Teliva on Linux, Mac OS X and OpenBSD; it should also work
+on other flavors of BSD, WSL on Windows, etc. with only minor modifications.
 
 ## Isn't this just an IDE?
 
diff --git a/shell.nix b/shell.nix
new file mode 100644
index 0000000..17540fe
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1,19 @@
+{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-21.11.tar.gz") {} }:
+
+pkgs.mkShell {
+	LOCALE_ARCHIVE_2_27 = if (pkgs.glibcLocales != null) then "${pkgs.glibcLocales}/lib/locale/locale-archive" else "";
+
+	buildInputs = [
+		pkgs.glibcLocales
+		pkgs.git
+		pkgs.gnumake
+		pkgs.ncurses
+		pkgs.gcc
+		pkgs.openssl
+	];
+	shellHook = ''
+		export LC_ALL=en_US.UTF-8
+		export GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt
+		export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
+	'';
+}