Skip to content

Commit

Permalink
Add Nix derivation for Monero dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
philipmw committed Nov 4, 2024
1 parent 893916a commit e47d59c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@ then:

[2] libnorm-dev is needed if your zmq library was built with libnorm, and not needed otherwise

With [Nix](https://nix.dev/tutorials/first-steps/), enter a shell having all dependencies:
(Tested on Nixpkgs 24.05, *aarch64-darwin* platform, macOS 15.1.)

```
% nix-shell --pure ./contrib/nix/local-build-shell.nix
[nix-shell:~/monero]$ # ... now you can build ...
```

Install all dependencies at once on Debian/Ubuntu:

```
Expand Down
28 changes: 28 additions & 0 deletions contrib/nix/local-build-shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Refer to README.md for how to invoke this.

{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = with pkgs.buildPackages; [
autoconf
cmake
git
libsodium
libunwind
openssl
protobuf
python3
readline
unbound
zeromq
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.IOKit
];

buildInputs = with pkgs.buildPackages; [
boost
];

cmakeFlags = [
"-DReadline_ROOT_DIR=${pkgs.buildPackages.readline.dev}"
];
}

0 comments on commit e47d59c

Please sign in to comment.