3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/science/machine-learning/finalfusion-utils/default.nix

55 lines
1.1 KiB
Nix
Raw Normal View History

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";
version = "0.14.1";
2020-07-27 07:12:47 +01:00
src = fetchFromGitHub {
owner = "finalfusion";
repo = pname;
rev = version;
sha256 = "sha256-suzivynlgk4VvDOC2dQR40n5IJHoJ736+ObdrM9dIqE=";
2020-07-27 07:12:47 +01:00
};
cargoSha256 = "sha256-HekjmctuzOWs5k/ihhsV8vVkm6906jEnFf3yvhkrA5Y=";
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}
'';
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;
maintainers = with maintainers; [ ];
2020-07-27 07:12:47 +01:00
};
}