mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-11 18:58:24 +03:00
nixfmt all the nix source files
This commit is contained in:
parent
fc36b67fba
commit
ebf0e29dac
27
nix/zig.nix
27
nix/zig.nix
@ -3,11 +3,7 @@
|
|||||||
let
|
let
|
||||||
version = "0.8.0";
|
version = "0.8.0";
|
||||||
|
|
||||||
osName =
|
osName = if pkgs.stdenv.isDarwin then "macos" else "linux";
|
||||||
if pkgs.stdenv.isDarwin then
|
|
||||||
"macos"
|
|
||||||
else
|
|
||||||
"linux";
|
|
||||||
|
|
||||||
splitSystem = builtins.split "-" builtins.currentSystem;
|
splitSystem = builtins.split "-" builtins.currentSystem;
|
||||||
arch = builtins.elemAt splitSystem 0;
|
arch = builtins.elemAt splitSystem 0;
|
||||||
@ -16,19 +12,16 @@ let
|
|||||||
archiveName = "zig-${osName}-${arch}-${version}";
|
archiveName = "zig-${osName}-${arch}-${version}";
|
||||||
|
|
||||||
# If you're system is not aarch64, we assume it's x86_64
|
# If you're system is not aarch64, we assume it's x86_64
|
||||||
sha256 =
|
sha256 = if pkgs.stdenv.isDarwin then
|
||||||
if pkgs.stdenv.isDarwin then
|
if isAarch64 then
|
||||||
if isAarch64 then
|
"b32d13f66d0e1ff740b3326d66a469ee6baddbd7211fa111c066d3bd57683111"
|
||||||
"b32d13f66d0e1ff740b3326d66a469ee6baddbd7211fa111c066d3bd57683111"
|
|
||||||
else
|
|
||||||
"279f9360b5cb23103f0395dc4d3d0d30626e699b1b4be55e98fd985b62bc6fbe"
|
|
||||||
else
|
else
|
||||||
if isAarch64 then
|
"279f9360b5cb23103f0395dc4d3d0d30626e699b1b4be55e98fd985b62bc6fbe"
|
||||||
"ee204ca2c2037952cf3f8b10c609373a08a291efa4af7b3c73be0f2b27720470"
|
else if isAarch64 then
|
||||||
else
|
"ee204ca2c2037952cf3f8b10c609373a08a291efa4af7b3c73be0f2b27720470"
|
||||||
"502625d3da3ae595c5f44a809a87714320b7a40e6dff4a895b5fa7df3391d01e";
|
else
|
||||||
in
|
"502625d3da3ae595c5f44a809a87714320b7a40e6dff4a895b5fa7df3391d01e";
|
||||||
pkgs.stdenv.mkDerivation {
|
in pkgs.stdenv.mkDerivation {
|
||||||
pname = "zig";
|
pname = "zig";
|
||||||
version = version;
|
version = version;
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
|
69
shell.nix
69
shell.nix
@ -1,25 +1,21 @@
|
|||||||
{}:
|
{ }:
|
||||||
|
|
||||||
let
|
let
|
||||||
sources = import nix/sources.nix { };
|
sources = import nix/sources.nix { };
|
||||||
pkgs = import sources.nixpkgs { };
|
pkgs = import sources.nixpkgs { };
|
||||||
|
|
||||||
darwinInputs =
|
darwinInputs = with pkgs;
|
||||||
with pkgs;
|
lib.optionals stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [
|
||||||
lib.optionals stdenv.isDarwin (
|
AppKit
|
||||||
with pkgs.darwin.apple_sdk.frameworks; [
|
CoreFoundation
|
||||||
AppKit
|
CoreServices
|
||||||
CoreFoundation
|
CoreVideo
|
||||||
CoreServices
|
Foundation
|
||||||
CoreVideo
|
Metal
|
||||||
Foundation
|
Security
|
||||||
Metal
|
]);
|
||||||
Security
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
linuxInputs =
|
linuxInputs = with pkgs;
|
||||||
with pkgs;
|
|
||||||
lib.optionals stdenv.isLinux [
|
lib.optionals stdenv.isLinux [
|
||||||
valgrind
|
valgrind
|
||||||
vulkan-headers
|
vulkan-headers
|
||||||
@ -37,7 +33,7 @@ let
|
|||||||
|
|
||||||
zig = import ./nix/zig.nix { inherit pkgs; };
|
zig = import ./nix/zig.nix { inherit pkgs; };
|
||||||
|
|
||||||
inputs = with pkgs;[
|
inputs = with pkgs; [
|
||||||
# build libraries
|
# build libraries
|
||||||
rustc
|
rustc
|
||||||
cargo
|
cargo
|
||||||
@ -64,27 +60,20 @@ let
|
|||||||
# faster builds - see https://github.com/rtfeldman/roc/blob/trunk/BUILDING_FROM_SOURCE.md#use-lld-for-the-linker
|
# faster builds - see https://github.com/rtfeldman/roc/blob/trunk/BUILDING_FROM_SOURCE.md#use-lld-for-the-linker
|
||||||
llvmPkgs.lld
|
llvmPkgs.lld
|
||||||
];
|
];
|
||||||
in
|
in pkgs.mkShell {
|
||||||
pkgs.mkShell
|
buildInputs = inputs ++ darwinInputs ++ linuxInputs;
|
||||||
{
|
|
||||||
buildInputs = inputs ++ darwinInputs ++ linuxInputs;
|
|
||||||
|
|
||||||
# Additional Env vars
|
# Additional Env vars
|
||||||
LLVM_SYS_120_PREFIX = "${llvmPkgs.llvm.dev}";
|
LLVM_SYS_120_PREFIX = "${llvmPkgs.llvm.dev}";
|
||||||
LD_LIBRARY_PATH =
|
LD_LIBRARY_PATH = with pkgs;
|
||||||
with pkgs;
|
lib.makeLibraryPath ([
|
||||||
lib.makeLibraryPath
|
pkg-config
|
||||||
(
|
stdenv.cc.cc.lib
|
||||||
[
|
llvmPkgs.libcxx
|
||||||
pkg-config
|
llvmPkgs.libcxxabi
|
||||||
stdenv.cc.cc.lib
|
libunwind
|
||||||
llvmPkgs.libcxx
|
libffi
|
||||||
llvmPkgs.libcxxabi
|
ncurses
|
||||||
libunwind
|
zlib
|
||||||
libffi
|
] ++ linuxInputs);
|
||||||
ncurses
|
}
|
||||||
zlib
|
|
||||||
]
|
|
||||||
++ linuxInputs
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user