feat: add nix package (#29)

This commit is contained in:
Cameron
2026-02-06 18:10:55 -08:00
committed by GitHub
parent b821abdd2a
commit 896e431321
4 changed files with 136 additions and 0 deletions

40
flake.nix Normal file
View File

@@ -0,0 +1,40 @@
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = inputs @ { self, ... }:
(inputs.flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import inputs.nixpkgs {
inherit system;
};
inherit (builtins) readFile fromTOML;
claude-chill = pkgs.rustPlatform.buildRustPackage {
pname = (fromTOML (readFile ./crates/claude-chill/Cargo.toml)).package.name;
version = (fromTOML (readFile ./Cargo.toml)).workspace.package.version;
src = pkgs.lib.cleanSourceWith {
src = ./.;
filter = path: type: !(pkgs.lib.hasSuffix ".nix" path);
};
cargoLock = {
lockFile = ./Cargo.lock;
};
};
in
{
packages = {
default = claude-chill;
claude-chill = claude-chill;
};
}
));
}