init
This commit is contained in:
commit
a42bb56a97
1 changed files with 991 additions and 0 deletions
64
flake.nix
Normal file
64
flake.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
description = "functional language written in rust";
|
||||
|
||||
inputs = {
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs:
|
||||
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
imports = [
|
||||
];
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
|
||||
perSystem =
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
libs = with pkgs; [
|
||||
llvm.lib
|
||||
libxml2
|
||||
zlib
|
||||
];
|
||||
utils = with pkgs; [
|
||||
llvm.dev
|
||||
pkg-config
|
||||
];
|
||||
in
|
||||
{
|
||||
packages.functlang = pkgs.rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "functlang";
|
||||
version = "0.1.0";
|
||||
|
||||
src = ./.;
|
||||
|
||||
cargoHash = "sha256-39EegylerKYD03GD8GzdoATYIJxlyk9PKZnZwIR4SpI=";
|
||||
|
||||
buildInputs = libs;
|
||||
nativeBuildInputs = utils;
|
||||
});
|
||||
packages.default = config.packages.functlang;
|
||||
devShells.default = pkgs.mkShell {
|
||||
inputFrom = [ config.packages.functlang ];
|
||||
buildInputs = libs;
|
||||
nativeBuildInputs =
|
||||
with pkgs;
|
||||
[
|
||||
rust-analyzer
|
||||
rustfmt
|
||||
]
|
||||
++ utils;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue