about summary refs log tree commit diff
path: root/pkgs/by-name/fe/feather/package.nix
blob: 659f7ad1872f0b74db0affc6079f32806981f2b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{ bc-ur
, boost
, cmake
, fetchFromGitHub
, hidapi
, lib
, libsodium
, libusb1
, openssl
, pkg-config
, protobuf
, python3
, qrencode
, qt6
, readline
, stdenv
, testers
, tor
, unbound
, zxing-cpp
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "feather";
  version = "2.6.5";

  src = fetchFromGitHub {
    owner = "feather-wallet";
    repo = "feather";
    rev = finalAttrs.version;
    hash = "sha256-HvjcjiVXTK9mZOvh91iCMf/cZ9BMlPxXjgFKYWolJ74=";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [
    cmake
    pkg-config
    python3
    qt6.wrapQtAppsHook
  ];

  buildInputs = [
    bc-ur
    boost
    hidapi
    libsodium
    libusb1
    openssl
    protobuf
    qrencode
    unbound
    zxing-cpp
  ] ++ (with qt6; [
    qtbase
    qtmultimedia
    qtsvg
    qttools
    qtwayland
    qtwebsockets
  ]);

  cmakeFlags = [
    "-DProtobuf_INCLUDE_DIR=${lib.getDev protobuf}/include"
    "-DProtobuf_PROTOC_EXECUTABLE=${lib.getExe protobuf}"
    "-DReadline_INCLUDE_DIR=${lib.getDev readline}/include/readline"
    "-DReadline_LIBRARY=${lib.getLib readline}/lib/libreadline.so"
    "-DReadline_ROOT_DIR=${lib.getDev readline}"
    "-DTOR_DIR=${lib.makeBinPath [ tor ]}"
    "-DTOR_VERSION=${tor.version}"
  ];

  passthru.tests.version = testers.testVersion {
    package = finalAttrs.finalPackage;
    command = ''
      QT_QPA_PLATFORM=minimal ${finalAttrs.finalPackage.meta.mainProgram} --version
    '';
  };

  meta = with lib; {
    description = "A free Monero desktop wallet";
    homepage = "https://featherwallet.org/";
    changelog = "https://featherwallet.org/changelog/#${finalAttrs.version}%20changelog";
    platforms = platforms.linux;
    license = licenses.bsd3;
    mainProgram = "feather";
    maintainers = with maintainers; [ surfaceflinger ];
  };
})