2020-07-27 07:12:47 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, blas
|
|
|
|
, gfortran
|
|
|
|
, lapack
|
2021-12-06 21:32:14 +00:00
|
|
|
, openssl
|
2020-07-27 07:12:47 +01:00
|
|
|
, Security
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "finalfusion-utils";
|
2021-12-06 21:32:14 +00:00
|
|
|
version = "0.13.2";
|
2020-07-27 07:12:47 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "finalfusion";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-12-06 21:32:14 +00:00
|
|
|
sha256 = "sha256-Wv3K2G542e1bKuJB+dZi0SW4dbopvs7SBohv+zgi5MI=";
|
2020-07-27 07:12:47 +01:00
|
|
|
};
|
|
|
|
|
2021-12-06 21:32:14 +00:00
|
|
|
cargoSha256 = "sha256-oI7bq/yEXP7aMLWGKAecyq1lqq7ZbHtwxX2ldZMFY8I=";
|
2020-07-27 07:12:47 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
blas
|
|
|
|
gfortran.cc.lib
|
|
|
|
lapack
|
2021-12-06 21:32:14 +00:00
|
|
|
openssl
|
2020-07-27 07:12:47 +01:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
Security
|
|
|
|
];
|
|
|
|
|
2021-11-16 00:07:44 +00:00
|
|
|
# Enables build against a generic BLAS.
|
|
|
|
buildFeatures = [ "netlib" ];
|
|
|
|
|
2020-07-27 07:12:47 +01:00
|
|
|
postInstall = ''
|
|
|
|
# Install shell completions
|
|
|
|
for shell in bash fish zsh; do
|
|
|
|
$out/bin/finalfusion completions $shell > finalfusion.$shell
|
|
|
|
done
|
|
|
|
installShellCompletion finalfusion.{bash,fish,zsh}
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-07-27 07:12:47 +01:00
|
|
|
description = "Utility for converting, quantizing, and querying word embeddings";
|
|
|
|
homepage = "https://github.com/finalfusion/finalfusion-utils/";
|
|
|
|
license = licenses.asl20;
|
2021-09-12 15:42:12 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-07-27 07:12:47 +01:00
|
|
|
};
|
|
|
|
}
|