From 2e97f552fdb0deefee54dbba6a970c0063c209f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Mon, 27 Jul 2020 08:12:47 +0200 Subject: [PATCH] finalfusion-utils: init at 0.11.2 --- .../finalfusion-utils/default.nix | 56 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 60 insertions(+) create mode 100644 pkgs/applications/science/machine-learning/finalfusion-utils/default.nix diff --git a/pkgs/applications/science/machine-learning/finalfusion-utils/default.nix b/pkgs/applications/science/machine-learning/finalfusion-utils/default.nix new file mode 100644 index 000000000000..80fc8127cd2f --- /dev/null +++ b/pkgs/applications/science/machine-learning/finalfusion-utils/default.nix @@ -0,0 +1,56 @@ +{ lib +, stdenv +, rustPlatform +, fetchFromGitHub +, installShellFiles +, blas +, gfortran +, lapack +, Security +}: + +rustPlatform.buildRustPackage rec { + pname = "finalfusion-utils"; + version = "0.11.2"; + + src = fetchFromGitHub { + owner = "finalfusion"; + repo = pname; + rev = version; + sha256 = "1y2ik3qj2wbjnnk7bbglwbvyvbm5zfk7mbd1gpxg4495nzlf2jhf"; + }; + + cargoSha256 = "19yay31f76ns1d6b6k9mgw5mrl8zg69y229ca6ssyb2z82gyhsnw"; + + # 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 stdenv.lib; { + description = "Utility for converting, quantizing, and querying word embeddings"; + homepage = "https://github.com/finalfusion/finalfusion-utils/"; + license = licenses.asl20; + maintainers = with maintainers; [ danieldk ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ad265ff2fd69..20147c43f8c6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19835,6 +19835,10 @@ in inherit (darwin.apple_sdk.frameworks) Security; }; + finalfusion-utils = callPackage ../applications/science/machine-learning/finalfusion-utils { + inherit (darwin.apple_sdk.frameworks) Security; + }; + flacon = libsForQt5.callPackage ../applications/audio/flacon { }; flexget = callPackage ../applications/networking/flexget { };