nixpkgs/pkgs/applications/audio/mimic/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.5 KiB
Nix
Raw Normal View History

{ config, lib, stdenv, autoreconfHook, fetchFromGitHub, fetchpatch
, pkg-config, makeWrapper
, alsa-lib, alsa-plugins, libtool, icu, pcre2
, pulseaudioSupport ? config.pulseaudio or false, libpulseaudio }:
2018-08-15 21:43:37 +02:00
stdenv.mkDerivation rec {
pname = "mimic";
version = "1.3.0.1";
2018-08-15 21:43:37 +02:00
src = fetchFromGitHub {
owner = "MycroftAI";
2021-10-15 22:13:35 +02:00
repo = "mimic1";
rev = version;
sha256 = "1agwgby9ql8r3x5rd1rgx3xp9y4cdg4pi3kqlz3vanv9na8nf3id";
2018-08-15 21:43:37 +02:00
};
patches = [
# Pull upstream fix for -fno-common toolchains:
# https://github.com/MycroftAI/mimic1/pull/216
(fetchpatch {
name = "fno-common";
url = "https://github.com/MycroftAI/mimic1/commit/77b36eaeb2c38eba571b8db7e9bb0fd507774e6d.patch";
sha256 = "0n3hqrfpbdp44y0c8bq55ay9m4c96r09k18hjxka4x54j5c7lw1m";
})
];
nativeBuildInputs = [
2018-08-15 21:43:37 +02:00
autoreconfHook
pkg-config
makeWrapper
2018-08-15 21:43:37 +02:00
];
buildInputs = [
alsa-lib
alsa-plugins
2018-08-15 21:43:37 +02:00
libtool
icu
pcre2
2021-01-15 14:21:58 +01:00
] ++ lib.optional pulseaudioSupport libpulseaudio;
2018-08-15 21:43:37 +02:00
env.NIX_CFLAGS_COMPILE = toString [
2022-12-23 17:57:29 +01:00
# Needed with GCC 12
"-Wno-error=free-nonheap-object"
];
postInstall = ''
wrapProgram $out/bin/mimic \
--run "export ALSA_PLUGIN_DIR=${alsa-plugins}/lib/alsa-lib"
'';
2018-08-15 21:43:37 +02:00
meta = {
description = "Mycroft's TTS engine, based on CMU's Flite (Festival Lite)";
homepage = "https://mimic.mycroft.ai/";
2021-01-15 14:21:58 +01:00
license = lib.licenses.free;
platforms = lib.platforms.linux;
maintainers = [ lib.maintainers.noneucat ];
2018-08-15 21:43:37 +02:00
};
}