1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-12 15:47:28 +00:00
nixpkgs/pkgs/applications/science/machine-learning/finalfusion-utils/default.nix
Daniël de Kok 85f96822a0 treewide: fix cargoSha256/cargoHash
Rust 1.50.0 incorporated a Cargo change (rust-lang/cargo#8937) in
which cargo vendor erroneously changed permissions of vendored
crates. This was fixed in Rust
1.51.0 (rust-lang/cargo#9131). Unfortunately, this means that all
cargoSha256/cargoHashes produced during the Rust 1.50.0 cycle are
potentially broken.

This change updates cargoSha256/cargoHash tree-wide.

Fixes #121994.
2021-05-08 00:36:37 -07:00

56 lines
1.2 KiB
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, installShellFiles
, blas
, gfortran
, lapack
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "finalfusion-utils";
version = "0.12.0";
src = fetchFromGitHub {
owner = "finalfusion";
repo = pname;
rev = version;
sha256 = "0gxcjrhfa86kz5qmdf5h278ydc3nc0nfj61brnykb723mg45jj41";
};
cargoSha256 = "0dj3xpinzzdfgy06wkp336sp1nyqk7nnvd3hwhyysripmz9apdgg";
# Enables build against a generic BLAS.
cargoBuildFlags = [
"--features"
"netlib"
];
nativeBuildInputs = [ installShellFiles ];
buildInputs = [
blas
gfortran.cc.lib
lapack
] ++ lib.optionals stdenv.isDarwin [
Security
];
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; {
description = "Utility for converting, quantizing, and querying word embeddings";
homepage = "https://github.com/finalfusion/finalfusion-utils/";
license = licenses.asl20;
maintainers = with maintainers; [ danieldk ];
};
}