2020-08-20 17:08:02 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, blas
|
|
|
|
, gfortran
|
|
|
|
, lapack
|
2022-01-03 16:56:52 +00:00
|
|
|
, openssl
|
2020-08-20 17:08:02 +00:00
|
|
|
, Security
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "finalfusion-utils";
|
2022-01-13 20:06:32 +00:00
|
|
|
version = "0.14.1";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "finalfusion";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-01-13 20:06:32 +00:00
|
|
|
sha256 = "sha256-suzivynlgk4VvDOC2dQR40n5IJHoJ736+ObdrM9dIqE=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
cargoSha256 = "sha256-HekjmctuzOWs5k/ihhsV8vVkm6906jEnFf3yvhkrA5Y=";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
blas
|
|
|
|
gfortran.cc.lib
|
|
|
|
lapack
|
2022-01-03 16:56:52 +00:00
|
|
|
openssl
|
2020-08-20 17:08:02 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
Security
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# Enables build against a generic BLAS.
|
|
|
|
buildFeatures = [ "netlib" ];
|
|
|
|
|
2020-08-20 17:08:02 +00: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-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-08-20 17:08:02 +00:00
|
|
|
description = "Utility for converting, quantizing, and querying word embeddings";
|
|
|
|
homepage = "https://github.com/finalfusion/finalfusion-utils/";
|
|
|
|
license = licenses.asl20;
|
2021-09-18 10:52:07 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
}
|