lab-intent-classifier/flake.nix

60 lines
1.2 KiB
Nix
Raw Normal View History

2025-01-07 20:13:13 -08:00
{
2025-01-07 20:50:42 -08:00
description = "Classifying intent of UCSB physics queries";
2025-01-07 20:13:13 -08:00
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
crane.url = "github:ipetkov/crane";
};
outputs =
{
self,
nixpkgs,
crane,
}:
let
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
in
{
packages = forAllSystems (
system:
let
pkgs = import nixpkgs { inherit system; };
craneLib = crane.mkLib pkgs;
in
{
default = craneLib.buildPackage {
src = craneLib.cleanCargoSource ./.;
buildInputs = with pkgs; [
fasttext
];
};
}
);
devShells = forAllSystems (
system:
let
pkgs = import nixpkgs { inherit system; };
craneLib = crane.mkLib pkgs;
in
{
default = craneLib.devShell {
inputsFrom = [ self.packages.${system}.default ];
packages = with pkgs; [
clippy
rust-analyzer
];
};
}
);
};
}