nixpkgs/pkgs/applications/blockchains/nano-wallet/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, wrapQtAppsHook, boost, libGL
2021-07-27 18:25:52 +00:00
, qtbase, python3 }:
2018-01-07 15:54:08 +00:00
stdenv.mkDerivation rec {
pname = "nano-wallet";
2021-03-20 19:40:52 +00:00
version = "21.3";
2018-01-07 15:54:08 +00:00
src = fetchFromGitHub {
owner = "nanocurrency";
2021-03-20 19:40:52 +00:00
repo = "nano-node";
2018-01-07 15:54:08 +00:00
rev = "V${version}";
2021-03-20 19:40:52 +00:00
sha256 = "0f6chl5vrzdr4w8g3nivfxk3qm6m11js401998afnhz0xaysm4pm";
2018-01-07 15:54:08 +00:00
fetchSubmodules = true;
};
cmakeFlags = let
options = {
2021-07-27 18:25:52 +00:00
PYTHON_EXECUTABLE = "${python3.interpreter}";
2021-03-20 19:40:52 +00:00
NANO_SHARED_BOOST = "ON";
2019-09-08 23:38:31 +00:00
BOOST_ROOT = boost;
2018-01-07 15:54:08 +00:00
RAIBLOCKS_GUI = "ON";
RAIBLOCKS_TEST = "ON";
Qt5_DIR = "${qtbase.dev}/lib/cmake/Qt5";
Qt5Core_DIR = "${qtbase.dev}/lib/cmake/Qt5Core";
Qt5Gui_INCLUDE_DIRS = "${qtbase.dev}/include/QtGui";
Qt5Widgets_INCLUDE_DIRS = "${qtbase.dev}/include/QtWidgets";
};
optionToFlag = name: value: "-D${name}=${value}";
in lib.mapAttrsToList optionToFlag options;
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
2018-01-07 15:54:08 +00:00
buildInputs = [ boost libGL qtbase ];
2021-07-27 18:25:52 +00:00
strictDeps = true;
2018-01-07 15:54:08 +00:00
buildPhase = ''
2021-03-20 19:40:52 +00:00
runHook preBuild
2018-01-07 15:54:08 +00:00
make nano_wallet
2021-03-20 19:40:52 +00:00
runHook postBuild
2019-09-08 13:01:03 +00:00
'';
2018-01-07 15:54:08 +00:00
checkPhase = ''
2021-03-20 19:40:52 +00:00
runHook preCheck
2018-01-07 15:54:08 +00:00
./core_test
2021-03-20 19:40:52 +00:00
runHook postCheck
2018-01-07 15:54:08 +00:00
'';
meta = {
description = "Wallet for Nano cryptocurrency";
homepage = "https://nano.org/en/wallet/";
2018-01-07 15:54:08 +00:00
license = lib.licenses.bsd2;
# Fails on Darwin. See:
# https://github.com/NixOS/nixpkgs/pull/39295#issuecomment-386800962
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ jluttine ];
};
}