20 , SUBSYSTEM=="usb", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="dbb%n", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402"
23 , KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="dbbf%n"
28 # Enabling the digitalbitbox program
30 # programs.digitalbitbox.enable = true;
32 # will install the digitalbitbox package and enable the corresponding hardware
33 # module and is by far the easiest way to get started with the Digital Bitbox on
36 # In case you install the package only, please be aware that you may need to
37 # apply some udev rules to allow the application to identify and access your
38 # wallet. In a nixos-configuration, one may accomplish this by enabling the
39 # digitalbitbox hardware module
41 # hardware.digitalbitbox.enable = true;
43 # or by adding the digitalbitbox package to system.udev.packages
45 # system.udev.packages = [ pkgs.digitalbitbox ];
47 # See https://digitalbitbox.com/start_linux for more information.
49 copyUdevRuleToOutput = name: rule: "cp ${writeText name rule} $out/etc/udev/rules.d/${name}";
52 pname = "digitalbitbox";
55 src = fetchFromGitHub {
56 owner = "digitalbitbox";
59 sha256 = "ig3+TdYv277D9GVnkRSX6nc6D6qruUOw/IQdQCK6FoA=";
83 LUPDATE = "${qttools.dev}/bin/lupdate";
84 LRELEASE = "${qttools.dev}/bin/lrelease";
85 MOC = "${qtbase.dev}/bin/moc";
87 RCC = "${qtbase.dev}/bin/rcc";
88 UIC = "${qtbase.dev}/bin/uic";
98 qtWrapperArgs = [ "--prefix LD_LIBRARY_PATH : $out/lib" ];
102 cp src/libbtc/.libs/*.so* $out/lib
103 cp src/libbtc/src/secp256k1/.libs/*.so* $out/lib
104 cp src/hidapi/libusb/.libs/*.so* $out/lib
105 cp src/univalue/.libs/*.so* $out/lib
107 # Provide udev rules as documented in https://digitalbitbox.com/start_linux
108 mkdir -p "$out/etc/udev/rules.d"
109 ${copyUdevRuleToOutput "51-hid-digitalbox.rules" udevRule51}
110 ${copyUdevRuleToOutput "52-hid-digitalbox.rules" udevRule52}
113 # remove forbidden references to $TMPDIR
115 for f in "$out"/{bin,lib}/*; do
116 if [ -f "$f" ] && isELF "$f"; then
117 patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f"
122 enableParallelBuilding = true;
125 description = "QT based application for the Digital Bitbox hardware wallet";
127 Digital Bitbox provides dbb-app, a GUI tool, and dbb-cli, a CLI tool, to manage Digital Bitbox devices.
129 This package will only install the dbb-app and dbb-cli, however; in order for these applications to identify and access Digital Bitbox devices, one may want to enable the digitalbitbox hardware module by adding
131 hardware.digitalbitbox.enable = true;
133 to the configuration which is equivalent to adding this package to the udev.packages list.
136 The easiest way to use the digitalbitbox package in NixOS is by adding
138 programs.digitalbitbox.enable = true;
140 to the configuration which installs the package and enables the hardware module.
142 homepage = "https://digitalbitbox.com/";
143 license = licenses.mit;
144 maintainers = with maintainers; [
147 platforms = platforms.linux;