Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
48 lines (48 loc) · 1.85 KB
/
Copy pathflake.nix
File metadata and controls
48 lines (48 loc) · 1.85 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, rust-overlay, flake-utils }:
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ] (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ rust-overlay.overlays.default ]; };
rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
rustPlatform = pkgs.makeRustPlatform { cargo = rust; rustc = rust; };
honkd = rustPlatform.buildRustPackage {
pname = "honkd";
version = "0.0.0";
src = pkgs.lib.fileset.toSource {
root = ./.;
fileset = pkgs.lib.fileset.unions [
./Cargo.toml
./Cargo.lock
./crates
];
};
cargoLock.lockFile = ./Cargo.lock;
# Nixpkgs 26.11's Rust build hook sets RUSTONIG_SYSTEM_LIBONIG=1 so
# onig_sys links against system oniguruma via pkg-config instead of
# compiling its bundled C source under GCC 16.
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = [ pkgs.oniguruma ];
cargoBuildFlags = [ "-p" "honkd" "-p" "honk" ];
# Real test suite needs a live goose / stub instance and is run by CI.
doCheck = false;
meta = {
mainProgram = "honkd";
description = "Durable ACP proxy and relay for goose";
};
};
in {
packages = {
inherit honkd;
default = honkd;
};
devShells.default = pkgs.mkShell {
packages = [ rust pkgs.pkg-config pkgs.openssl pkgs.jq pkgs.websocat pkgs.shellcheck ];
};
});
}