-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
41 lines (33 loc) · 1 KB
/
Copy pathdefault.nix
File metadata and controls
41 lines (33 loc) · 1 KB
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
{ pkgs ? import <nixpkgs> {} }:
let
version = "0.2.0";
src = ./.;
# 常规动态构建(二进制名是 mind)
mindcache = pkgs.rustPlatform.buildRustPackage {
pname = "mindcache";
inherit version src;
cargoLock.lockFile = ./Cargo.lock;
meta = with pkgs.lib; {
description = "MindCache — filesystem-first personal knowledge base CLI (command: mind)";
license = licenses.mit;
maintainers = [];
platforms = platforms.linux;
};
};
# 静态 musl 构建(二进制可 scp 到任意 Linux 机器直接跑)
mindcache-musl = pkgs.pkgsCross.musl64.rustPlatform.buildRustPackage {
pname = "mindcache";
inherit version src;
cargoLock.lockFile = ./Cargo.lock;
RUSTFLAGS = "-C target-feature=+crt-static";
meta = with pkgs.lib; {
description = "MindCache CLI (static musl build, command: mind)";
license = licenses.mit;
maintainers = [];
platforms = [ "x86_64-linux" ];
};
};
in
{
inherit mindcache mindcache-musl;
}