README 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. Nix configuration directory for the MMGen Wallet suite
  2. Only BTC and a bare minimum of packages are enabled by default.
  3. For altcoin and additional package support, copy the file ‘user-packages.nix’ to
  4. your MMGen datadir (~/.mmgen) and edit, uncommenting the relevant lines. For an
  5. XMR-enabled setup, for example, you’d uncomment the system package ‘monero-cli’
  6. and Python packages ‘monero’, ‘pycryptodome’ and ‘pysocks’.
  7. From the mmgen-wallet repo root, you may build individual system packages in the
  8. MMGen Wallet environment as follows (we’ll use the curl package in this example):
  9. $ nix-build nix --attr curl
  10. To build all configured packages in one go, run ‘nix-build nix’ without
  11. additional arguments.
  12. The last lines of nix-build’s output are store paths in ‘/nix/store/’, which
  13. you may optionally install into your default environment as follows:
  14. $ nix-env --install <store path>
  15. Note that use of MMGen Wallet from the default environment is discouraged in
  16. favor of the custom shell environment, which we’ll now describe.
  17. From the mmgen-wallet repo root, execute:
  18. $ nix-shell nix
  19. This will build any unbuilt configured packages and drop you to the custom shell
  20. environment. At this point you may run the test suite:
  21. [nix-shell:... $] test/test-release -FA
  22. or proceed to use MMGen Wallet as with any conventional installation.
  23. For greater isolation, you can invoke nix-shell with the ‘--pure’ option. This
  24. will make executables from your native environment inaccessible within the
  25. shell, so you may need to add some additional tools to your environment such as
  26. a text editor. For examples, refer to ‘user-packages.nix’
  27. NixOS:
  28. To install the MMGen Wallet environment under NixOS, copy the contents of the ‘nix’
  29. directory to ‘/etc/nixos/mmgen-project’ and add ‘./mmgen-project/nixos-packages.nix’
  30. to your imports list in ‘configuration.nix’. If altcoin support or additional
  31. packages are required, edit ‘user-packages.nix’ in ‘/etc/nixos/mmgen-project’ as
  32. described above for the copy of that file in the MMGen datadir. Rebuild NixOS.
  33. From the mmgen-wallet repo root, execute:
  34. export PYTHONPATH=$(pwd)
  35. export PATH=$(pwd)/cmds:$PATH
  36. You can now test and use MMGen Wallet in your native shell environment.