mirror of
https://github.com/roc-lang/roc.git
synced 2024-10-26 18:28:43 +03:00
flake works, albeit with ncurses version spam
This commit is contained in:
parent
28a3ae85e3
commit
de5b9b2731
43
flake.lock
Normal file
43
flake.lock
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1647090816,
|
||||
"narHash": "sha256-XFr50BVxUJjYxWBmeaPLtq4FisiNRQftbO4Gh1nrQEs=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "758e0334ab64f6ac0fcecc03531f78bc2572a8d4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1646955661,
|
||||
"narHash": "sha256-AYLta1PubJnrkv15+7G+6ErW5m9NcI9wSdJ+n7pKAe0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e9545762b032559c27d8ec9141ed63ceca1aa1ac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
69
flake.nix
Normal file
69
flake.nix
Normal file
@ -0,0 +1,69 @@
|
||||
{
|
||||
description = "Roc flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs";
|
||||
nixpkgs-unstable = { url = "github:NixOS/nixpkgs/nixpkgs-unstable"; };
|
||||
# zig = { url = "github:roarkanize/zig-overlay"; };
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable }:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
unstable-pkgs = nixpkgs-unstable.legacyPackages.x86_64-linux;
|
||||
llvmPkgs = pkgs.llvmPackages_12;
|
||||
|
||||
linuxInputs = with pkgs; [
|
||||
valgrind # used in cli tests, see cli/tests/cli_run.rs
|
||||
vulkan-headers
|
||||
vulkan-loader
|
||||
vulkan-tools
|
||||
vulkan-validation-layers
|
||||
xorg.libX11
|
||||
xorg.libXcursor
|
||||
xorg.libXrandr
|
||||
xorg.libXi
|
||||
xorg.libxcb
|
||||
alsa-lib
|
||||
];
|
||||
|
||||
sharedInputs = (with pkgs; [
|
||||
# build libraries
|
||||
cmake
|
||||
git
|
||||
python3
|
||||
llvmPkgs.llvm.dev
|
||||
llvmPkgs.clang
|
||||
libxkbcommon
|
||||
pkg-config
|
||||
zig # roc builtins are implemented in zig, see compiler/builtins/bitcode/
|
||||
|
||||
# lib deps
|
||||
libffi
|
||||
libxml2
|
||||
ncurses
|
||||
zlib
|
||||
libiconv
|
||||
|
||||
# faster builds - see https://github.com/rtfeldman/roc/blob/trunk/BUILDING_FROM_SOURCE.md#use-lld-for-the-linker
|
||||
llvmPkgs.lld
|
||||
# debugir
|
||||
]) ++ (with unstable-pkgs; [
|
||||
rustc
|
||||
cargo
|
||||
clippy
|
||||
rustfmt
|
||||
]);
|
||||
in {
|
||||
|
||||
devShell.x86_64-linux = pkgs.mkShell {
|
||||
buildInputs = sharedInputs ++ linuxInputs;
|
||||
|
||||
LLVM_SYS_120_PREFIX = "${llvmPkgs.llvm.dev}";
|
||||
LD_LIBRARY_PATH = with pkgs;
|
||||
lib.makeLibraryPath
|
||||
([ pkg-config stdenv.cc.cc.lib libffi ncurses zlib ] ++ linuxInputs);
|
||||
};
|
||||
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user