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 ]; + } + ) {}