forked from huggingface/tokenizers
-
Notifications
You must be signed in to change notification settings - Fork 4
/
flake.nix
38 lines (38 loc) · 1.19 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
38
{
description = "Tokenizers";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
naersk.url = "github:nix-community/naersk";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = { self, nixpkgs, naersk, ... }:
let systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = f: builtins.listToAttrs (map (name: { inherit name; value = f name; }) systems);
overlay = final: prev: {
tokenizersPackages = import ./nix/rust.nix {
pkgs = final.pkgs;
stdenv = final.pkgs.stdenv;
};
};
in {
packages = forAllSystems (system:
let pkgs = import nixpkgs {
overlays = [
overlay
naersk.overlay
];
inherit system;
};
in {
tokenizers = pkgs.tokenizersPackages.tokenizers;
tokenizers-haskell = pkgs.tokenizersPackages.tokenizers-haskell;
}
);
overlays.default = overlay;
defaultPackage = forAllSystems (system: self.packages.${system}.tokenizers-haskell);
# lib = pkgs;
};
}