Skip to content

Commit

Permalink
Update flake
Browse files Browse the repository at this point in the history
  • Loading branch information
cigrainger committed Dec 13, 2023
1 parent f8c6780 commit 83ad8e8
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 44 deletions.
69 changes: 63 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

87 changes: 49 additions & 38 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,63 @@
description = "Tokenizers";

inputs = {
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
outputs = {
self,
nixpkgs,
flake-utils,
fenix,
}:
flake-utils.lib.eachSystem [
flake-utils.lib.system.x86_64-linux
flake-utils.lib.system.x86_64-darwin
flake-utils.lib.system.aarch64-darwin
flake-utils.lib.system.aarch64-linux
]
(system:
let pkgs = import nixpkgs { inherit system; };
in
{
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
act
binutils
cargo
cc
clang
clippy
elixir_1_14
erlang
gdb
gcc
libiconv
openssl
pkg-config
rustc
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Foundation
darwin.apple_sdk.frameworks.Carbon
darwin.apple_sdk.frameworks.AppKit
];
shellHook = ''
mkdir -p .nix-mix
mkdir -p .nix-hex
export MIX_HOME=$PWD/.nix-mix
export HEX_HOME=$PWD/.nix-hex
export PATH=$MIX_HOME/bin:$PATH
export PATH=$HEX_HOME/bin:$PATH
export PATH=$MIX_HOME/escripts:$PATH
export ERL_AFLAGS="-kernel shell_history enabled"
'';
};
});
(system: let
pkgs = import nixpkgs {inherit system;};
in {
devShell = pkgs.mkShell {
buildInputs = with pkgs;
[
act
binutils
clang
elixir_1_15
(fenix.packages."${system}".complete.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
gcc
libiconv
openssl
pkg-config
]
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Foundation
darwin.apple_sdk.frameworks.Carbon
darwin.apple_sdk.frameworks.AppKit
];
shellHook = ''
mkdir -p .nix-mix
mkdir -p .nix-hex
export MIX_HOME=$PWD/.nix-mix
export HEX_HOME=$PWD/.nix-hex
export PATH=$MIX_HOME/bin:$PATH
export PATH=$HEX_HOME/bin:$PATH
export PATH=$MIX_HOME/escripts:$PATH
export ERL_AFLAGS="-kernel shell_history enabled"
'';
};
});
}

0 comments on commit 83ad8e8

Please sign in to comment.