From 83b12d2483a4f64a19637db65987960e9aaf5872 Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Sun, 13 Aug 2023 17:59:59 +0300 Subject: [PATCH] Add shells/* Signed-off-by: Ivan Bushchik --- README.md | 6 +++++- shells/README.md | 13 +++++++++++++ shells/crossShell.nix | 15 +++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 shells/README.md create mode 100644 shells/crossShell.nix diff --git a/README.md b/README.md index a6cbf18..592638e 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,13 @@ Apple Silicon hosts require additional `--impure` flag for firmware installation - vetus (iMac 27" 2017) - celerrime (MacBook Air M2) +## Shells + +I "made" some shell in [shells/](./shells). + ## Dotfiles (from `ivabus/dotfiles`) -I'm installing my dotfiles using (with prepared script) +I install my dotfiles with prepared script ```shell curl https://iva.bz/nix | sh diff --git a/shells/README.md b/shells/README.md new file mode 100644 index 0000000..24c2a85 --- /dev/null +++ b/shells/README.md @@ -0,0 +1,13 @@ +# Shells + +- `crossShell.nix` - Just useful shell for cross compiling + +## Using + +``` +nix-shell PATH_TO_SHELL +``` + +### `crossShell.nix` + +By default configured for `aarch64-unknown-linux-musl`, but target may be replaced by adding crossSystem arg, like `--argstr crossSystem "x86_64-unknown-linux-musl"`. diff --git a/shells/crossShell.nix b/shells/crossShell.nix new file mode 100644 index 0000000..7d00a90 --- /dev/null +++ b/shells/crossShell.nix @@ -0,0 +1,15 @@ +{ crossSystem ? "aarch64-unknown-linux-musl" }: + +let pkgs = import { + crossSystem = { + config = crossSystem; + }; +}; +in + pkgs.callPackage ( + {mkShell, pkg-config, zlib}: + mkShell { + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ zlib ]; + } + ) {}