-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix compile error on OTP 24 * nix for m1 mac
- Loading branch information
Showing
7 changed files
with
25 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
eval "$(lorri direnv)" | ||
use nix | ||
|
||
export MIX_HOME=$(pwd)/.mix | ||
export PATH=$PATH:$(pwd)/.mix/escripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ erl_crash.dump | |
/docs/all.json | ||
/bench/snapshots | ||
/bench/graphs | ||
.mix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,20 @@ | ||
let | ||
sources = import ./nix/sources.nix; | ||
commands = import ./nix/commands.nix; | ||
|
||
nixos = import sources.nixpkgs {}; | ||
darwin = import sources.darwin {}; | ||
unstable = import sources.unstable {}; | ||
|
||
pkgs = if darwin.stdenv.isDarwin then darwin else nixos; | ||
tasks = commands { | ||
inherit pkgs; | ||
inherit unstable; | ||
}; | ||
|
||
deps = { | ||
common = | ||
[ pkgs.niv | ||
]; | ||
|
||
elixir = | ||
[ unstable.elixir | ||
]; | ||
|
||
platform = | ||
if pkgs.stdenv.isDarwin then | ||
[ unstable.darwin.apple_sdk.frameworks.CoreServices | ||
unstable.darwin.apple_sdk.frameworks.Foundation | ||
] | ||
else if pkgs.stdenv.isLinux then | ||
[ pkgs.inotify-tools | ||
] | ||
else | ||
[]; | ||
}; | ||
in | ||
|
||
pkgs.mkShell { | ||
name = "Witchcraft"; | ||
nativeBuildInputs = builtins.concatLists [ | ||
deps.common | ||
deps.elixir | ||
deps.platform | ||
tasks | ||
]; | ||
let | ||
nixpkgs = import (fetchTarball { | ||
url = "https://github.com/jechol/nixpkgs/archive/21.11-otp24-no-jit.tar.gz"; | ||
sha256 = "sha256:1lka707hrnkp70vny99m9fmp4a8136vl7addmpfsdvkwb81d1jk9"; | ||
}) { }; | ||
platform = if nixpkgs.stdenv.isDarwin then [ | ||
nixpkgs.darwin.apple_sdk.frameworks.CoreServices | ||
nixpkgs.darwin.apple_sdk.frameworks.Foundation | ||
] else if nixpkgs.stdenv.isLinux then | ||
[ nixpkgs.inotify-tools ] | ||
else | ||
[ ]; | ||
in nixpkgs.mkShell { | ||
buildInputs = with nixpkgs; | ||
[ | ||
# OTP | ||
erlang | ||
elixir | ||
] ++ platform; | ||
} |