Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.6 kB · 83 lines
Nix
at llvm-cleanup
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384{ lib, buildPythonPackage, fetchFromGitHub, scikit-build, cmake, ush, requests, six, numpy, cffi, openfst, substituteAll, callPackage,}:
## Maintainer note: only in-tree dependant is `dragonfly`, try to# update the two alongside eachother.#
let kaldi = callPackage ./fork.nix { };inbuildPythonPackage rec { pname = "kaldi-active-grammar"; version = "3.1.0"; format = "setuptools";
src = fetchFromGitHub { owner = "daanzu"; repo = pname; rev = "v${version}"; sha256 = "0lilk6yjzcy31avy2z36bl9lr60gzwhmyqwqn8akq11qc3mbffsk"; };
KALDI_BRANCH = "foo"; KALDIAG_SETUP_RAW = "1";
patches = [ # Makes sure scikit-build doesn't try to build the dependencies for us ./0001-stub.patch # Uses the dependencies' binaries from $PATH instead of a specific directory ./0002-exec-path.patch # Makes it dynamically link to the correct Kaldi library (substituteAll { src = ./0003-ffi-path.patch; kaldiFork = "${kaldi}/lib"; }) ];
# scikit-build puts us in the wrong folder. That is bad. preBuild = '' cd .. '';
buildInputs = [ openfst kaldi ]; nativeBuildInputs = [ scikit-build cmake ]; propagatedBuildInputs = [ ush requests numpy cffi six ];
doCheck = false; # no tests exist
meta = with lib; { description = "Python Kaldi speech recognition"; homepage = "https://github.com/daanzu/kaldi-active-grammar"; license = licenses.agpl3Plus; maintainers = with maintainers; [ ckie ]; # Other platforms are supported upstream. platforms = platforms.linux; };}