lol

bitbox: init at 4.46.3

+106
+13
pkgs/by-name/bi/bitbox/genassets.patch
··· 1 + diff --git a/frontends/qt/genassets.sh b/frontends/qt/genassets.sh 2 + index 4b1ba87be..b5a9ad279 100755 3 + --- a/frontends/qt/genassets.sh 4 + +++ b/frontends/qt/genassets.sh 5 + @@ -20,7 +20,7 @@ if [ ! -d ../web/build ]; then 6 + fi 7 + 8 + echo '<!DOCTYPE RCC><RCC version="1.0"><qresource>' > assets.qrc 9 + -/usr/bin/find ../web/build/ -maxdepth 3 -type f | sed -e "s|../web/build/||" | awk '{ print "<file alias=\"" $1 "\">../web/build/" $1 "</file>" '} >> assets.qrc 10 + +find ../web/build/ -maxdepth 3 -type f | sort | sed -e "s|../web/build/||" | awk '{ print "<file alias=\"" $1 "\">../web/build/" $1 "</file>" '} >> assets.qrc 11 + 12 + echo '<file alias="trayicon.png">resources/trayicon.png</file>' >> assets.qrc 13 + echo '</qresource></RCC>' >> assets.qrc
+89
pkgs/by-name/bi/bitbox/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + buildNpmPackage, 6 + clang, 7 + go, 8 + libsForQt5, 9 + }: 10 + 11 + stdenv.mkDerivation rec { 12 + pname = "bitbox"; 13 + version = "4.46.3"; 14 + 15 + src = fetchFromGitHub { 16 + owner = "BitBoxSwiss"; 17 + repo = "bitbox-wallet-app"; 18 + rev = "v${version}"; 19 + fetchSubmodules = true; 20 + hash = "sha256-2oGVQ022NGOHLo7TBdeXG3ng1nYW8fyLwSV0hJdAl9I="; 21 + }; 22 + 23 + patches = [ 24 + ./genassets.patch 25 + ]; 26 + 27 + postPatch = '' 28 + substituteInPlace frontends/qt/resources/linux/usr/share/applications/bitbox.desktop \ 29 + --replace-fail 'Exec=BitBox %u' 'Exec=bitbox %u' 30 + ''; 31 + 32 + dontConfigure = true; 33 + 34 + passthru.web = buildNpmPackage { 35 + pname = "bitbox-web"; 36 + inherit version; 37 + inherit src; 38 + sourceRoot = "source/frontends/web"; 39 + npmDepsHash = "sha256-w98wwKHiZtor5ivKd+sh5K8HnAepu6cw9RyVJ+eTq3k="; 40 + installPhase = "cp -r build $out"; 41 + }; 42 + 43 + buildPhase = '' 44 + runHook preBuild 45 + 46 + ln -s ${passthru.web} frontends/web/build 47 + export GOCACHE=$TMPDIR/go-cache 48 + cd frontends/qt 49 + make -C server linux 50 + ./genassets.sh 51 + qmake -o build/Makefile 52 + cd build 53 + make 54 + cd ../../.. 55 + 56 + runHook postBuild 57 + ''; 58 + 59 + installPhase = '' 60 + runHook preInstall 61 + 62 + mkdir $out 63 + cp -r frontends/qt/resources/linux/usr/share $out 64 + mkdir $out/{bin,lib} 65 + cp frontends/qt/build/BitBox $out/bin/bitbox 66 + cp frontends/qt/build/assets.rcc $out/bin 67 + cp frontends/qt/server/libserver.so $out/lib 68 + install -Dt $out/lib/udev/rules.d ${./rules.d}/* 69 + 70 + runHook postInstall 71 + ''; 72 + 73 + buildInputs = [ libsForQt5.qtwebengine ]; 74 + 75 + nativeBuildInputs = [ 76 + clang 77 + go 78 + libsForQt5.wrapQtAppsHook 79 + ]; 80 + 81 + meta = { 82 + description = "Companion app for the BitBox02 hardware wallet"; 83 + homepage = "https://bitbox.swiss/app/"; 84 + license = lib.licenses.asl20; 85 + mainProgram = "bitbox"; 86 + maintainers = [ lib.maintainers.tensor5 ]; 87 + platforms = [ "x86_64-linux" ]; 88 + }; 89 + }
+1
pkgs/by-name/bi/bitbox/rules.d/51-hid-digitalbitbox.rules
··· 1 + SUBSYSTEM=="usb", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="dbb%n", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402"
+1
pkgs/by-name/bi/bitbox/rules.d/52-hid-digitalbitbox.rules
··· 1 + KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="dbbf%n"
+1
pkgs/by-name/bi/bitbox/rules.d/53-hid-bitbox02.rules
··· 1 + SUBSYSTEM=="usb", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="bitbox02_%n", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2403"
+1
pkgs/by-name/bi/bitbox/rules.d/54-hid-bitbox02.rules
··· 1 + KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2403", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="bitbox02-%n"