-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
51 lines (47 loc) · 1.45 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
39
40
41
42
43
44
45
46
47
48
49
50
51
{
description = "Image-to-text converter";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
extrude-licenses =
pkgs.rustPlatform.buildRustPackage rec {
pname = "extrude-licenses";
version = "1.0.0";
src = pkgs.fetchFromGitHub {
owner = "usagi";
repo = pname;
rev = version;
sha256 = "1sg64rbv165zmigmjf7xrrlpqibhl13zvlqzkx1n3ribfvhy5lh0";
};
cargoSha256 = "kkPQqwxFpez3ffCx0NtL8wipkVTs9tRiLd6T0/6yTJ8=";
};
in
{
packages.default = pkgs.mkShell {
# TODO: support building the img2text CLI and web app by flake
nativeBuildInputs =
(with pkgs;
[
pkg-config
cargo-license
extrude-licenses
wasm-pack
wasm-bindgen-cli
binaryen
rustup
lessc
openssl_1_1
libiconv
jq
python3Packages.fonttools
python3Packages.brotli
])
++ [ extrude-licenses ];
};
});
}