feat: add nix package (#29)
This commit is contained in:
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@@ -93,3 +93,14 @@ jobs:
|
|||||||
run: command -v expect || brew install expect
|
run: command -v expect || brew install expect
|
||||||
- run: cargo build
|
- run: cargo build
|
||||||
- run: expect tests/integration.exp
|
- run: expect tests/integration.exp
|
||||||
|
|
||||||
|
nix-build:
|
||||||
|
name: Nix Build
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: cachix/install-nix-action@v31
|
||||||
|
- run: nix build .# -L
|
||||||
|
|||||||
24
README.md
24
README.md
@@ -160,6 +160,30 @@ claude-chill creates a pseudo-terminal (PTY) and spawns Claude Code as a child p
|
|||||||
5. **History tracking**: Maintains a buffer of output for lookback mode since the last full redraw
|
5. **History tracking**: Maintains a buffer of output for lookback mode since the last full redraw
|
||||||
6. **Signal forwarding**: Window resize (SIGWINCH), interrupt (SIGINT), and terminate (SIGTERM) signals are forwarded to Claude
|
6. **Signal forwarding**: Window resize (SIGWINCH), interrupt (SIGINT), and terminate (SIGTERM) signals are forwarded to Claude
|
||||||
|
|
||||||
|
## Installation with Nix
|
||||||
|
|
||||||
|
### Any System (Linux / MacOS)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install directly from GitHub
|
||||||
|
nix profile install github:davidbeesley/claude-chill
|
||||||
|
|
||||||
|
# Or run without installing
|
||||||
|
nix run github:davidbeesley/claude-chill -- --help
|
||||||
|
```
|
||||||
|
|
||||||
|
### NixOS
|
||||||
|
|
||||||
|
Add the following to your `flake.nix`:
|
||||||
|
```nix
|
||||||
|
inputs.claude-chill.url = "github:davidbeesley/claude-chill";
|
||||||
|
```
|
||||||
|
|
||||||
|
And then the following package to your environment.systemPackages or home.packages:
|
||||||
|
```nix
|
||||||
|
inputs.claude-chill.packages.${system}.default
|
||||||
|
```
|
||||||
|
|
||||||
## Disclaimer
|
## Disclaimer
|
||||||
|
|
||||||
This tool was developed for personal convenience. It works for me on Linux and macOS, but it hasn't been extensively tested across different terminals or edge cases. Don't use it to send anyone to space, perform surgery, or run critical infrastructure. If it breaks, you get to keep both pieces.
|
This tool was developed for personal convenience. It works for me on Linux and macOS, but it hasn't been extensively tested across different terminals or edge cases. Don't use it to send anyone to space, perform surgery, or run critical infrastructure. If it breaks, you get to keep both pieces.
|
||||||
|
|||||||
61
flake.lock
generated
Normal file
61
flake.lock
generated
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1769461804,
|
||||||
|
"narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
40
flake.nix
Normal file
40
flake.nix
Normal 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;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
));
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user