Skip to content

Commit

Permalink
feat: add trieve-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
thecaralice committed Oct 13, 2024
1 parent 28fe75f commit 59af603
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@
perSystem =
{
pkgs,
lib,
self',
...
}:
let
craneLib = crane.mkLib pkgs;
in
{
packages.default = self'.packages.cli;
packages.cli = pkgs.callPackage ./packages/cli.nix { inherit craneLib; };
packages.server = pkgs.callPackage ./packages/server { inherit craneLib; };
packages.frontends = pkgs.callPackage ./packages/frontends { };
};
Expand Down
33 changes: 33 additions & 0 deletions packages/cli.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
craneLib,
fetchFromGitHub,
darwin,
stdenv,
lib,
libiconv,
}:
let
commonArgs = rec {
pname = "trieve-cli";
version = "0.5.3";
src = fetchFromGitHub {
owner = "devflowinc";
repo = pname;
rev = "d4c897c92902999331a23198dc22be3f20683a52";
hash = "sha256-+O4F9vTqYg4Eju0RBIyQ6aIw8Wb33bchSygUpunfFBs=";
};
strictDeps = true;
buildInputs = lib.optionals stdenv.isDarwin (
with darwin.apple_sdk.frameworks;
[
SystemConfiguration
libiconv
]
);
};
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
totalArgs = commonArgs // {
inherit cargoArtifacts;
};
in
craneLib.buildPackage (totalArgs // { meta.mainProgram = "trieve"; })

0 comments on commit 59af603

Please sign in to comment.