Files
wehub-resource-sync 76a9e7a0cc
Automation / Format (push) Waiting to run
Automation / File Labeler (push) Waiting to run
Automation / Gemini Reviewed (push) Waiting to run
Coverage / Coverage (push) Waiting to run
Publish OpenClaw Skills / publish (push) Has been cancelled
Audit / Security Audit (push) Has been cancelled
Automation / Gemini Review (push) Has been cancelled
CI / Detect Changes (push) Has been cancelled
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Nix (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Cargo Deny (push) Has been cancelled
CI / Verify Skills (push) Has been cancelled
CI / Lint Skills (push) Has been cancelled
CI / Build (Linux x86_64) (push) Has been cancelled
CI / Build (macos-latest, aarch64-apple-darwin) (push) Has been cancelled
CI / Build (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
CI / Build (ubuntu-latest, aarch64-unknown-linux-gnu) (push) Has been cancelled
CI / Build (windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
CI / API Smoketest (push) Has been cancelled
Policy / Policy Check (push) Has been cancelled
Release (Changeset) / Release (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:38:06 +08:00

78 lines
2.1 KiB
Nix

{
description = "Google Workspace CLI — dynamic command surface from Discovery Service";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
# Extract version from CLI crate's Cargo.toml
cargoToml = builtins.fromTOML (builtins.readFile ./crates/google-workspace-cli/Cargo.toml);
version = cargoToml.package.version;
# System dependencies
# On Linux, keyring often needs libsecret
# On macOS, it uses Security framework
linuxDeps = with pkgs; [
libsecret
];
darwinDeps = with pkgs; [
libiconv
apple-sdk
];
gws = pkgs.rustPlatform.buildRustPackage {
pname = "gws";
inherit version;
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = pkgs.lib.optionals pkgs.stdenv.isLinux linuxDeps
++ pkgs.lib.optionals pkgs.stdenv.isDarwin darwinDeps;
# Tests are disabled by default in buildRustPackage if not specified,
# but we'll be explicit. Some tests might require network.
doCheck = false;
meta = with pkgs.lib; {
description = cargoToml.package.description;
homepage = cargoToml.package.homepage;
license = licenses.asl20;
maintainers = [{ name = "Justin Poehnelt"; email = "justin.poehnelt@gmail.com"; }];
mainProgram = "gws";
};
};
in
{
packages.default = gws;
packages.gws = gws;
apps.default = flake-utils.lib.mkApp {
drv = gws;
};
devShells.default = pkgs.mkShell {
inputsFrom = [ gws ];
buildInputs = with pkgs; [
rustc
cargo
rust-analyzer
clippy
rustfmt
];
};
}
);
}