nixpkgs/pkgs/applications/science/machine-learning/finalfusion-utils/default.nix

53 lines
1.1 KiB
Nix
Raw Normal View History

2020-07-27 06:12:47 +00:00
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, installShellFiles
, blas
, gfortran
, lapack
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "finalfusion-utils";
2021-07-23 06:08:46 +00:00
version = "0.13.0";
2020-07-27 06:12:47 +00:00
src = fetchFromGitHub {
owner = "finalfusion";
repo = pname;
rev = version;
2021-07-23 06:08:46 +00:00
sha256 = "sha256-ME0qDSFD8G492+7ex7VQWh9P76a+tOCo+SJ9n9ZIYUI=";
2020-07-27 06:12:47 +00:00
};
2021-07-23 06:08:46 +00:00
cargoSha256 = "sha256-/rLv2/bcVsmWw+ZfyumDcj0ptHPQBCCYR9O/lVlV+G0=";
2020-07-27 06:12:47 +00:00
nativeBuildInputs = [ installShellFiles ];
buildInputs = [
blas
gfortran.cc.lib
lapack
] ++ lib.optionals stdenv.isDarwin [
Security
];
2021-11-16 00:07:44 +00:00
# Enables build against a generic BLAS.
buildFeatures = [ "netlib" ];
2020-07-27 06:12:47 +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}
'';
meta = with lib; {
2020-07-27 06:12:47 +00:00
description = "Utility for converting, quantizing, and querying word embeddings";
homepage = "https://github.com/finalfusion/finalfusion-utils/";
license = licenses.asl20;
maintainers = with maintainers; [ ];
2020-07-27 06:12:47 +00:00
};
}