summaryrefslogtreecommitdiffstatshomepage
path: root/nix/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/flake.nix')
-rw-r--r--nix/flake.nix186
1 files changed, 184 insertions, 2 deletions
diff --git a/nix/flake.nix b/nix/flake.nix
index 834e213..d871ce7 100644
--- a/nix/flake.nix
+++ b/nix/flake.nix
@@ -35,6 +35,8 @@
...
}:
let
+ releases = builtins.fromJSON (builtins.readFile ./releases.json);
+ hermes = builtins.getFlake "github:NousResearch/hermes-agent/${releases.hermes.rev}";
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
@@ -44,10 +46,190 @@
(final: prev: {
tuicr = tuicr.packages.${system}.default;
aibox = aibox.packages.${system}.default;
+ claude-release = prev.claude-code.overrideAttrs {
+ version = releases.claude.version;
+ src = final.fetchurl {
+ inherit (releases.claude) url hash;
+ };
+ };
+ copilot-release = final.stdenvNoCC.mkDerivation {
+ pname = "github-copilot-cli";
+ version = releases.copilot.version;
+ src = final.fetchurl {
+ inherit (releases.copilot) url hash;
+ };
+ sourceRoot = ".";
+ nativeBuildInputs = [
+ final.autoPatchelfHook
+ final.makeBinaryWrapper
+ ];
+ buildInputs = [
+ final.glibc
+ final.stdenv.cc.cc.lib
+ final.glib
+ final.libsecret
+ ];
+ runtimeDependencies = [
+ final.glibc
+ final.stdenv.cc.cc.lib
+ final.glib
+ final.libsecret
+ ];
+ dontStrip = true;
+ installPhase = ''
+ runHook preInstall
+ install -Dm755 copilot "$out/libexec/copilot"
+ makeWrapper "$out/libexec/copilot" "$out/bin/copilot" \
+ --add-flag --no-auto-update \
+ --set-default SSL_CERT_DIR ${final.cacert}/etc/ssl/certs \
+ --prefix PATH : ${final.lib.makeBinPath [ final.bash ]}
+ runHook postInstall
+ '';
+ meta = {
+ description = "GitHub Copilot CLI";
+ homepage = "https://github.com/github/copilot-cli";
+ license = final.lib.licenses.unfree;
+ mainProgram = "copilot";
+ platforms = [ "x86_64-linux" ];
+ sourceProvenance = with final.lib.sourceTypes; [
+ binaryNativeCode
+ binaryBytecode
+ obfuscatedCode
+ ];
+ };
+ };
+ codex-release = final.stdenvNoCC.mkDerivation {
+ pname = "codex";
+ version = releases.codex.version;
+ src = final.fetchurl {
+ inherit (releases.codex) url hash;
+ };
+ sourceRoot = ".";
+ nativeBuildInputs = [ final.autoPatchelfHook ];
+ buildInputs = [
+ final.glibc
+ final.ncurses
+ ];
+ runtimeDependencies = [
+ final.glibc
+ final.ncurses
+ ];
+ installPhase = ''
+ runHook preInstall
+ mkdir -p "$out"
+ cp -R . "$out/"
+ chmod -R u+w "$out"
+ runHook postInstall
+ '';
+ meta = {
+ description = "OpenAI Codex CLI";
+ homepage = "https://developers.openai.com/codex/cli";
+ license = final.lib.licenses.asl20;
+ mainProgram = "codex";
+ platforms = [ "x86_64-linux" ];
+ sourceProvenance = [ final.lib.sourceTypes.binaryNativeCode ];
+ };
+ };
+ hermes-release = hermes.packages.${system}.minimal;
+ omp-release = final.stdenvNoCC.mkDerivation {
+ pname = "oh-my-pi";
+ version = releases.omp.version;
+ src = final.fetchurl {
+ inherit (releases.omp) url hash;
+ };
+ dontUnpack = true;
+ nativeBuildInputs = [ final.makeBinaryWrapper ];
+ dontStrip = true;
+ installPhase = ''
+ runHook preInstall
+ install -Dm755 "$src" "$out/libexec/omp"
+ makeWrapper ${final.glibc}/lib/ld-linux-x86-64.so.2 "$out/bin/omp" \
+ --add-flags --library-path \
+ --add-flags ${final.glibc}/lib \
+ --add-flags "$out/libexec/omp"
+ runHook postInstall
+ '';
+ meta = {
+ description = "AI coding agent for the terminal";
+ homepage = "https://github.com/can1357/oh-my-pi";
+ license = final.lib.licenses.mit;
+ mainProgram = "omp";
+ platforms = [ "x86_64-linux" ];
+ sourceProvenance = with final.lib.sourceTypes; [
+ binaryNativeCode
+ binaryBytecode
+ ];
+ };
+ };
+ opencode-release = final.stdenvNoCC.mkDerivation {
+ pname = "opencode";
+ version = releases.opencode.version;
+ src = final.fetchurl {
+ inherit (releases.opencode) url hash;
+ };
+ sourceRoot = ".";
+ nativeBuildInputs = [
+ final.autoPatchelfHook
+ final.makeBinaryWrapper
+ ];
+ buildInputs = [ final.glibc ];
+ runtimeDependencies = [ final.glibc ];
+ dontStrip = true;
+ installPhase = ''
+ runHook preInstall
+ install -Dm755 opencode "$out/bin/opencode"
+ wrapProgram "$out/bin/opencode" \
+ --prefix PATH : ${final.lib.makeBinPath [ final.ripgrep ]} \
+ --set OPENCODE_DISABLE_AUTOUPDATE true
+ runHook postInstall
+ '';
+ meta = {
+ description = "AI coding agent built for the terminal";
+ homepage = "https://opencode.ai";
+ license = final.lib.licenses.mit;
+ mainProgram = "opencode";
+ platforms = [ "x86_64-linux" ];
+ sourceProvenance = with final.lib.sourceTypes; [
+ binaryNativeCode
+ binaryBytecode
+ ];
+ };
+ };
+ ori-release = final.stdenvNoCC.mkDerivation {
+ pname = "ori";
+ version = releases.ori.version;
+ src = final.fetchurl {
+ inherit (releases.ori) url hash;
+ };
+ dontUnpack = true;
+ nativeBuildInputs = [ final.makeBinaryWrapper ];
+ dontStrip = true;
+ installPhase = ''
+ runHook preInstall
+ install -Dm755 "$src" "$out/libexec/ori"
+ makeWrapper ${final.glibc}/lib/ld-linux-x86-64.so.2 "$out/bin/ori" \
+ --add-flags --library-path \
+ --add-flags ${final.glibc}/lib \
+ --add-flags "$out/libexec/ori" \
+ --set ORI_NO_UPDATE_CHECK 1 \
+ --set ORI_TELEMETRY 0
+ runHook postInstall
+ '';
+ meta = {
+ description = "OpenRouter harness for local coding agents";
+ homepage = "https://openrouter.ai/blog/announcements/ori-harness/";
+ license = final.lib.licenses.asl20;
+ mainProgram = "ori";
+ platforms = [ "x86_64-linux" ];
+ sourceProvenance = with final.lib.sourceTypes; [
+ binaryNativeCode
+ binaryBytecode
+ ];
+ };
+ };
})
];
- # Whitelist specific unfree packages (claude-code,
- # github-copilot-cli) instead of globally setting allowUnfree,
+ # Whitelist specific unfree packages instead of globally setting allowUnfree,
# so a typo elsewhere can't silently pull in additional unfree
# deps.
config.allowUnfreePredicate =