diff --git a/pkgs/by-name/co/codexbar/package.nix b/pkgs/by-name/co/codexbar/package.nix new file mode 100644 index 000000000000..85f6342d1802 --- /dev/null +++ b/pkgs/by-name/co/codexbar/package.nix @@ -0,0 +1,45 @@ +{ + lib, + stdenvNoCC, + fetchurl, + nix-update-script, + unzip, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "codexbar"; + version = "0.37.2"; + __structuredAttrs = true; + strictDeps = true; + + src = fetchurl { + url = "https://github.com/steipete/CodexBar/releases/download/v${finalAttrs.version}/CodexBar-macos-universal-${finalAttrs.version}.zip"; + hash = "sha256-3I98PH/eAH1G9up+1AiwXshxGoZRNf3bFxsx5W32unc="; + }; + + sourceRoot = "."; + + nativeBuildInputs = [ unzip ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/Applications + cp -r *.app $out/Applications + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ "--url=https://github.com/steipete/CodexBar" ]; + }; + + meta = { + description = "Show usage stats for AI coding-provider limits"; + homepage = "https://codex.bar/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ Br1ght0ne ]; + platforms = lib.platforms.darwin; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + }; +})