-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
62 lines (58 loc) · 2.09 KB
/
flake.nix
File metadata and controls
62 lines (58 loc) · 2.09 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
description = "systemprompt — AI governance gateway";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ (import rust-overlay) ];
};
rustToolchain = pkgs.rust-bin.stable.latest.default;
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
version = cargoToml.workspace.package.version;
in {
packages.default = pkgs.rustPlatform.buildRustPackage {
pname = "systemprompt";
inherit version;
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
allowBuiltinFetchGit = true;
};
nativeBuildInputs = with pkgs; [ pkg-config clang mold ];
buildInputs = with pkgs; [ openssl postgresql ];
SQLX_OFFLINE = "true";
doCheck = false;
meta = with pkgs.lib; {
description = "AI governance gateway for Claude, OpenAI, and Gemini";
homepage = "https://systemprompt.io";
# Template package is MIT (this flake builds the template's source).
# The compiled artifact links systemprompt-core which is BSL-1.1;
# see CONFLICT IN BINARY DISTRIBUTION below — production users need
# a commercial licence for systemprompt-core, but Nix's `meta.license`
# tracks source licence only, so MIT here is correct.
license = licenses.mit;
platforms = platforms.unix;
};
};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
rustToolchain
pkg-config
openssl
postgresql
just
sqlx-cli
];
};
checks.build = self.packages.${system}.default;
});
}