Skip to content

Commit

Permalink
smartcat: init at 1.3.0
Browse files Browse the repository at this point in the history
Adds smartcat, a cat-like tool to interact with large language models on
the command line.
I've been looking for a minimal tool to easily work with a locally
running ollama instance, and this was a great fit so I figured I'd try my
hand at adding it to nixpkgs and maintaining it.

Co-authored-by: éclairevoyant <848000+eclairevoyant@users.noreply.github.com>
  • Loading branch information
lpchaim and eclairevoyant committed Jun 20, 2024
1 parent a61618d commit 97151c4
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions pkgs/by-name/sm/smartcat/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{ lib
, fetchFromGitHub
, rustPlatform

, darwin
, libX11
, openssl
, pkg-config
, stdenv
}:

rustPlatform.buildRustPackage rec {
pname = "smartcat";
version = "1.3.0";

src = fetchFromGitHub {
owner = "efugier";
repo = "smartcat";
rev = "refs/tags/${version}";
hash = "sha256-iCtNNKXo0peGGUaQXKaaYaEo7MAL70PX0BAWPERNmlo=";
};

cargoHash = "sha256-qNl2bI5VqpMfoFc+gZC4XHrNT9pnWseduYSOi5Dzr9M=";

nativeBuildInputs = [
pkg-config
];

buildInputs = [
openssl
libX11
]
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.AppKit
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
];

meta = {
description = "Integrate large language models into the command line";
homepage = "https://github.com/efugier/smartcat";
changelog = "https://github.com/efugier/smartcat/releases/tag/v${version}";
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
mainProgram = "sc";
maintainers = with lib.maintainers; [ lpchaim ];
};
}

0 comments on commit 97151c4

Please sign in to comment.