Loading maintainers/maintainer-list.nix +6 −0 Original line number Diff line number Diff line Loading @@ -21857,6 +21857,12 @@ githubId = 2084639; name = "Manu"; }; tensor5 = { github = "tensor5"; githubId = 1545895; matrix = "@tensor5:matrix.org"; name = "Nicola Squartini"; }; teozkr = { email = "teo@nullable.se"; github = "nightkr"; Loading pkgs/by-name/bi/bitbox/genassets.patch 0 → 100644 +13 −0 Original line number Diff line number Diff line diff --git a/frontends/qt/genassets.sh b/frontends/qt/genassets.sh index 4b1ba87be..b5a9ad279 100755 --- a/frontends/qt/genassets.sh +++ b/frontends/qt/genassets.sh @@ -20,7 +20,7 @@ if [ ! -d ../web/build ]; then fi echo '<!DOCTYPE RCC><RCC version="1.0"><qresource>' > assets.qrc -/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 +find ../web/build/ -maxdepth 3 -type f | sort | sed -e "s|../web/build/||" | awk '{ print "<file alias=\"" $1 "\">../web/build/" $1 "</file>" '} >> assets.qrc echo '<file alias="trayicon.png">resources/trayicon.png</file>' >> assets.qrc echo '</qresource></RCC>' >> assets.qrc pkgs/by-name/bi/bitbox/package.nix 0 → 100644 +89 −0 Original line number Diff line number Diff line { lib, stdenv, fetchFromGitHub, buildNpmPackage, clang, go, libsForQt5, }: stdenv.mkDerivation rec { pname = "bitbox"; version = "4.46.3"; src = fetchFromGitHub { owner = "BitBoxSwiss"; repo = "bitbox-wallet-app"; rev = "v${version}"; fetchSubmodules = true; hash = "sha256-2oGVQ022NGOHLo7TBdeXG3ng1nYW8fyLwSV0hJdAl9I="; }; patches = [ ./genassets.patch ]; postPatch = '' substituteInPlace frontends/qt/resources/linux/usr/share/applications/bitbox.desktop \ --replace-fail 'Exec=BitBox %u' 'Exec=bitbox %u' ''; dontConfigure = true; passthru.web = buildNpmPackage { pname = "bitbox-web"; inherit version; inherit src; sourceRoot = "source/frontends/web"; npmDepsHash = "sha256-w98wwKHiZtor5ivKd+sh5K8HnAepu6cw9RyVJ+eTq3k="; installPhase = "cp -r build $out"; }; buildPhase = '' runHook preBuild ln -s ${passthru.web} frontends/web/build export GOCACHE=$TMPDIR/go-cache cd frontends/qt make -C server linux ./genassets.sh qmake -o build/Makefile cd build make cd ../../.. runHook postBuild ''; installPhase = '' runHook preInstall mkdir $out cp -r frontends/qt/resources/linux/usr/share $out mkdir $out/{bin,lib} cp frontends/qt/build/BitBox $out/bin/bitbox cp frontends/qt/build/assets.rcc $out/bin cp frontends/qt/server/libserver.so $out/lib install -Dt $out/lib/udev/rules.d ${./rules.d}/* runHook postInstall ''; buildInputs = [ libsForQt5.qtwebengine ]; nativeBuildInputs = [ clang go libsForQt5.wrapQtAppsHook ]; meta = { description = "Companion app for the BitBox02 hardware wallet"; homepage = "https://bitbox.swiss/app/"; license = lib.licenses.asl20; mainProgram = "bitbox"; maintainers = [ lib.maintainers.tensor5 ]; platforms = [ "x86_64-linux" ]; }; } pkgs/by-name/bi/bitbox/rules.d/51-hid-digitalbitbox.rules 0 → 100644 +1 −0 Original line number Diff line number Diff line SUBSYSTEM=="usb", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="dbb%n", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402" pkgs/by-name/bi/bitbox/rules.d/52-hid-digitalbitbox.rules 0 → 100644 +1 −0 Original line number Diff line number Diff line KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="dbbf%n" Loading
maintainers/maintainer-list.nix +6 −0 Original line number Diff line number Diff line Loading @@ -21857,6 +21857,12 @@ githubId = 2084639; name = "Manu"; }; tensor5 = { github = "tensor5"; githubId = 1545895; matrix = "@tensor5:matrix.org"; name = "Nicola Squartini"; }; teozkr = { email = "teo@nullable.se"; github = "nightkr"; Loading
pkgs/by-name/bi/bitbox/genassets.patch 0 → 100644 +13 −0 Original line number Diff line number Diff line diff --git a/frontends/qt/genassets.sh b/frontends/qt/genassets.sh index 4b1ba87be..b5a9ad279 100755 --- a/frontends/qt/genassets.sh +++ b/frontends/qt/genassets.sh @@ -20,7 +20,7 @@ if [ ! -d ../web/build ]; then fi echo '<!DOCTYPE RCC><RCC version="1.0"><qresource>' > assets.qrc -/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 +find ../web/build/ -maxdepth 3 -type f | sort | sed -e "s|../web/build/||" | awk '{ print "<file alias=\"" $1 "\">../web/build/" $1 "</file>" '} >> assets.qrc echo '<file alias="trayicon.png">resources/trayicon.png</file>' >> assets.qrc echo '</qresource></RCC>' >> assets.qrc
pkgs/by-name/bi/bitbox/package.nix 0 → 100644 +89 −0 Original line number Diff line number Diff line { lib, stdenv, fetchFromGitHub, buildNpmPackage, clang, go, libsForQt5, }: stdenv.mkDerivation rec { pname = "bitbox"; version = "4.46.3"; src = fetchFromGitHub { owner = "BitBoxSwiss"; repo = "bitbox-wallet-app"; rev = "v${version}"; fetchSubmodules = true; hash = "sha256-2oGVQ022NGOHLo7TBdeXG3ng1nYW8fyLwSV0hJdAl9I="; }; patches = [ ./genassets.patch ]; postPatch = '' substituteInPlace frontends/qt/resources/linux/usr/share/applications/bitbox.desktop \ --replace-fail 'Exec=BitBox %u' 'Exec=bitbox %u' ''; dontConfigure = true; passthru.web = buildNpmPackage { pname = "bitbox-web"; inherit version; inherit src; sourceRoot = "source/frontends/web"; npmDepsHash = "sha256-w98wwKHiZtor5ivKd+sh5K8HnAepu6cw9RyVJ+eTq3k="; installPhase = "cp -r build $out"; }; buildPhase = '' runHook preBuild ln -s ${passthru.web} frontends/web/build export GOCACHE=$TMPDIR/go-cache cd frontends/qt make -C server linux ./genassets.sh qmake -o build/Makefile cd build make cd ../../.. runHook postBuild ''; installPhase = '' runHook preInstall mkdir $out cp -r frontends/qt/resources/linux/usr/share $out mkdir $out/{bin,lib} cp frontends/qt/build/BitBox $out/bin/bitbox cp frontends/qt/build/assets.rcc $out/bin cp frontends/qt/server/libserver.so $out/lib install -Dt $out/lib/udev/rules.d ${./rules.d}/* runHook postInstall ''; buildInputs = [ libsForQt5.qtwebengine ]; nativeBuildInputs = [ clang go libsForQt5.wrapQtAppsHook ]; meta = { description = "Companion app for the BitBox02 hardware wallet"; homepage = "https://bitbox.swiss/app/"; license = lib.licenses.asl20; mainProgram = "bitbox"; maintainers = [ lib.maintainers.tensor5 ]; platforms = [ "x86_64-linux" ]; }; }
pkgs/by-name/bi/bitbox/rules.d/51-hid-digitalbitbox.rules 0 → 100644 +1 −0 Original line number Diff line number Diff line SUBSYSTEM=="usb", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="dbb%n", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402"
pkgs/by-name/bi/bitbox/rules.d/52-hid-digitalbitbox.rules 0 → 100644 +1 −0 Original line number Diff line number Diff line KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="dbbf%n"