From 730fa00e2072bccfd61a2c4fd67086128ba76075 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Mon, 12 Aug 2024 14:08:46 +0200 Subject: [PATCH] Adding launcher to build. (#2397) --- _launcher.nix | 18 ++++++++++++++++++ flake.nix | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 _launcher.nix diff --git a/_launcher.nix b/_launcher.nix new file mode 100644 index 00000000..1acae7e1 --- /dev/null +++ b/_launcher.nix @@ -0,0 +1,18 @@ +{ buildRustPackage, importCargoLock, pkg-config, protobuf, openssl }: + +buildRustPackage { + name = "text-generation-lancher"; + + src = ./.; + + sourceDir = ./launcher; + + cargoLock = { + lockFile = ./Cargo.lock; + }; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ openssl.dev protobuf ]; + +} diff --git a/flake.nix b/flake.nix index 1d14561f..761c4af8 100644 --- a/flake.nix +++ b/flake.nix @@ -74,6 +74,9 @@ (callPackage ./router.nix { inherit (rustPlatform) buildRustPackage importCargoLock; }) + (callPackage ./_launcher.nix { + inherit (rustPlatform) buildRustPackage importCargoLock; + }) ]); venvDir = "./.venv";