nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 75 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 cmake, 5 doxygen, 6 fetchFromGitHub, 7 gitUpdater, 8 graphviz, 9 gst_all_1, 10 perl, 11 pkg-config, 12 testers, 13 sox, 14}: 15 16stdenv.mkDerivation (finalAttrs: { 17 pname = "pocketsphinx"; 18 version = "5.0.4"; 19 20 src = fetchFromGitHub { 21 owner = "cmusphinx"; 22 repo = "pocketsphinx"; 23 tag = "v${finalAttrs.version}"; 24 hash = "sha256-DUK3zPPtv+sQhC1dfJXDmwtt3UV6DGacb3mMQUpvVpk="; 25 }; 26 27 nativeBuildInputs = [ 28 cmake 29 doxygen 30 graphviz 31 pkg-config 32 ]; 33 34 buildInputs = [ gst_all_1.gstreamer ]; 35 36 cmakeFlags = [ 37 (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) 38 (lib.cmakeBool "BUILD_GSTREAMER" true) 39 (lib.cmakeFeature "CMAKE_INSTALL_DATADIR" "${placeholder "data"}/share") 40 ]; 41 42 outputs = [ 43 "out" 44 "data" 45 "dev" 46 "lib" 47 "man" 48 ]; 49 50 nativeCheckInputs = [ 51 perl 52 sox 53 ]; 54 55 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 56 57 passthru = { 58 updateScript = gitUpdater { rev-prefix = "v"; }; 59 tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 60 }; 61 62 meta = { 63 description = "Small speech recognizer"; 64 homepage = "https://github.com/cmusphinx/pocketsphinx"; 65 changelog = "https://github.com/cmusphinx/pocketsphinx/blob/v${finalAttrs.version}/NEWS"; 66 license = with lib.licenses; [ 67 bsd2 68 bsd3 69 mit 70 ]; 71 pkgConfigModules = [ "pocketsphinx" ]; 72 mainProgram = "pocketsphinx"; 73 maintainers = with lib.maintainers; [ jopejoe1 ]; 74 }; 75})