mirror of
https://github.com/roc-lang/roc.git
synced 2024-10-26 18:28:43 +03:00
Enable nix shell on aarch64
This commit is contained in:
parent
a989d48239
commit
af4fba940b
10
nix/zig.nix
10
nix/zig.nix
@ -1,4 +1,4 @@
|
|||||||
{ pkgs, isMacOS }:
|
{ pkgs, isMacOS, isAarch64 }:
|
||||||
|
|
||||||
# We require at least specific commit of Zig after the latest tagged
|
# We require at least specific commit of Zig after the latest tagged
|
||||||
# release (0.6.0), so we just download the binaries for that commit
|
# release (0.6.0), so we just download the binaries for that commit
|
||||||
@ -9,10 +9,16 @@ let
|
|||||||
if isMacOS
|
if isMacOS
|
||||||
then "macos"
|
then "macos"
|
||||||
else "linux";
|
else "linux";
|
||||||
archiveName = "zig-${osName}-x86_64-${version}";
|
archName =
|
||||||
|
if isAarch64
|
||||||
|
then "aarch64"
|
||||||
|
else "x86_64";
|
||||||
|
archiveName = "zig-${osName}-${archName}-${version}";
|
||||||
sha256 =
|
sha256 =
|
||||||
if isMacOS
|
if isMacOS
|
||||||
then "665c1a7f472cfc5e0715f0ddf6ff8409fb749ac91cbbae68c443b4a37ebd058e"
|
then "665c1a7f472cfc5e0715f0ddf6ff8409fb749ac91cbbae68c443b4a37ebd058e"
|
||||||
|
else if isAarch64
|
||||||
|
then "116ms44vx4xz57m9z9lsgrxd1g22qp00m5qbmklky8xdd2jmj24w"
|
||||||
else "bab70ae3bd0af538022bc3ef50d8f34fa8dceac39ba7d9e5d528eee7e6d5a1cf";
|
else "bab70ae3bd0af538022bc3ef50d8f34fa8dceac39ba7d9e5d528eee7e6d5a1cf";
|
||||||
in
|
in
|
||||||
pkgs.stdenv.mkDerivation {
|
pkgs.stdenv.mkDerivation {
|
||||||
|
11
shell.nix
11
shell.nix
@ -1,6 +1,10 @@
|
|||||||
{ }:
|
{ }:
|
||||||
|
|
||||||
with {
|
let
|
||||||
|
splitSystem = builtins.split "-" builtins.currentSystem;
|
||||||
|
currentArch = builtins.elemAt splitSystem 0;
|
||||||
|
currentOS = builtins.elemAt splitSystem 2;
|
||||||
|
in with {
|
||||||
# Look here for information about how pin version of nixpkgs
|
# Look here for information about how pin version of nixpkgs
|
||||||
# → https://nixos.wiki/wiki/FAQ/Pinning_Nixpkgs
|
# → https://nixos.wiki/wiki/FAQ/Pinning_Nixpkgs
|
||||||
pkgs = import (builtins.fetchGit {
|
pkgs = import (builtins.fetchGit {
|
||||||
@ -10,7 +14,8 @@ with {
|
|||||||
rev = "502845c3e31ef3de0e424f3fcb09217df2ce6df6";
|
rev = "502845c3e31ef3de0e424f3fcb09217df2ce6df6";
|
||||||
}) { };
|
}) { };
|
||||||
|
|
||||||
isMacOS = builtins.currentSystem == "x86_64-darwin";
|
isMacOS = currentOS == "darwin";
|
||||||
|
isAarch64 = currentArch == "aarch64";
|
||||||
};
|
};
|
||||||
|
|
||||||
with (pkgs);
|
with (pkgs);
|
||||||
@ -42,7 +47,7 @@ let
|
|||||||
[ ];
|
[ ];
|
||||||
|
|
||||||
llvmPkgs = pkgs.llvmPackages_10;
|
llvmPkgs = pkgs.llvmPackages_10;
|
||||||
zig = import ./nix/zig.nix { inherit pkgs isMacOS; };
|
zig = import ./nix/zig.nix { inherit pkgs isMacOS isAarch64; };
|
||||||
inputs = [
|
inputs = [
|
||||||
# build libraries
|
# build libraries
|
||||||
rustc
|
rustc
|
||||||
|
Loading…
Reference in New Issue
Block a user