1
0
Fork 0
mirror of https://github.com/MycroftAI/mycroft-core.git synced 2025-12-06 23:15:18 -05:00
2 Build mycroft with the nix package manager
Jörg Thalheim edited this page 2020-05-23 11:27:14 +01:00

You can use the following shell.nix, to get all development dependencies using the nix-shell command.

with import <nixpkgs> {};
mkShell {
  buildInputs = [
    git
    (python3.withPackages(ps: with ps; [setuptools pygobject3]))
    bashInteractive
    libffi
    libjpeg
    openssl
    bison
    swig
    glib
    portaudio
    mpg123
    flac
    curl
    libfann
    jq
    autoreconfHook
    alsaLib
    pkgconfig
    icu
  ];

  SOURCE_DATE_EPOCH = "1523278946";
}

After the first start mycroft will download precise engine to ~/.mycroft/precise/precise-engine. This is a pre-compiled binary and needs to be patched with patchelf:

Save the following in ~/.mycroft/precise/precise-engine/shell.nix:

with import <nixpkgs> {};
mkShell {
  buildInputs = [
    bashInteractive
    patchelf
  ];
  RPATH="${lib.getLib zlib}/lib";
}

Than run patchelf:

$ ~/.mycroft/precise/precise-engine/shell.nix && nix-shell --run 'patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath $RPATH ./precise-engine'