| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- Nix configuration directory for the MMGen Wallet suite
- NOTE: If you plan to make changes to the files in this directory, first copy it
- (e.g. `cp -a nix mynix`) and then make your changes in the copied directory.
- Also make sure to replace ‘nix’ with ‘mynix’ (e.g.) in the examples below.
- Only BTC and a bare minimum of packages are enabled by default.
- For altcoin and additional package support, copy the file ‘user-packages.nix’ to
- your MMGen datadir (~/.mmgen) and edit, uncommenting the relevant lines. For an
- XMR-enabled setup, for example, you’d uncomment the system package ‘monero-cli’
- and Python packages ‘monero’, ‘pycryptodome’ and ‘pysocks’.
- From the mmgen-wallet repo root, you may build individual system packages in the
- MMGen Wallet environment as follows (we’ll use the curl package in this example):
- $ nix-build nix --attr curl
- To build all configured packages in one go, run ‘nix-build nix’ without
- additional arguments.
- The last lines of nix-build’s output are store paths in ‘/nix/store/’, which
- you may optionally install into your default environment as follows:
- $ nix-env --install <store path>
- Note that use of MMGen Wallet from the default environment is discouraged in
- favor of the custom shell environment, which we’ll now describe.
- From the mmgen-wallet repo root, execute:
- $ nix-shell nix
- This will build any unbuilt configured packages and drop you to the custom shell
- environment. At this point you may run the test suite:
- [nix-shell:... $] test/test-release -FA
- or proceed to use MMGen Wallet as with any conventional installation.
- For greater isolation, you can invoke nix-shell with the ‘--pure’ option. This
- will make executables from your native environment inaccessible within the
- shell, so you may need to add some additional tools to your environment such as
- a text editor. For examples, refer to ‘user-packages.nix’
- Speedup tip: Look for the commented-out ‘url =’ lines in the *.nix files in
- this directory, and make local shallow clones of the corresponding remote git
- repositories using ‘git clone --depth=1’ plus ‘--revision=<commit>’ or
- ‘--branch=<tag>’. Then uncomment the local paths, adjusting them to suit.
- This will also allow you to use your installation in an offline environment.
- NixOS:
- To install the MMGen Wallet environment under NixOS, copy the contents of the ‘nix’
- directory to ‘/etc/nixos/mmgen-project’ and add ‘./mmgen-project/nixos-packages.nix’
- to your imports list in ‘configuration.nix’. If altcoin support or additional
- packages are required, edit ‘user-packages.nix’ in ‘/etc/nixos/mmgen-project’ as
- described above for the copy of that file in the MMGen datadir. Rebuild NixOS.
- From the mmgen-wallet repo root, execute:
- export PYTHONPATH=$(pwd)
- export PATH=$(pwd)/cmds:$PATH
- You can now test and use MMGen Wallet in your native shell environment.
|