Add shells/*

Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
This commit is contained in:
Ivan Bushchik 2023-08-13 17:59:59 +03:00
parent 07c32ad701
commit 83b12d2483
No known key found for this signature in database
GPG key ID: 2F16FBF3262E090C
3 changed files with 33 additions and 1 deletions

View file

@ -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

13
shells/README.md Normal file
View file

@ -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"`.

15
shells/crossShell.nix Normal file
View file

@ -0,0 +1,15 @@
{ crossSystem ? "aarch64-unknown-linux-musl" }:
let pkgs = import <nixpkgs> {
crossSystem = {
config = crossSystem;
};
};
in
pkgs.callPackage (
{mkShell, pkg-config, zlib}:
mkShell {
nativeBuildInputs = [ pkg-config ];
buildInputs = [ zlib ];
}
) {}