forked from uiua-lang/uiua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
37 lines (35 loc) · 1.13 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
description = "A stack-based array programming language";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
outputs = { self, nixpkgs, flake-utils, crane }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
craneLib = crane.lib.${system};
uiua-crate = craneLib.buildPackage {
src = craneLib.cleanCargoSource (craneLib.path ./.);
buildInputs = nixpkgs.lib.optionals pkgs.stdenv.isDarwin [
pkgs.iconv
pkgs.darwin.apple_sdk.frameworks.CoreServices
pkgs.darwin.apple_sdk.frameworks.Foundation
];
};
in
{
packages.default = uiua-crate;
devShell = pkgs.mkShell {
inputsFrom = builtins.attrValues self.packages.${system};
nativeBuildInputs = [
pkgs.clippy
pkgs.rust-analyzer
pkgs.rustfmt
];
};
});
}