Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Nix derivation for Monero dependencies #9552

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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* and *x86_64-darwin* platforms, 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}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a side note. This PR [1] will fix this requirement.

  1. cmake: fix readline find_path call. #9445

];
}
Loading