diff --git a/pkgs/applications/blockchains/sparrow/default.nix b/pkgs/applications/blockchains/sparrow/default.nix index e0df2dc7bc6b..0af0f39ae44f 100644 --- a/pkgs/applications/blockchains/sparrow/default.nix +++ b/pkgs/applications/blockchains/sparrow/default.nix @@ -7,7 +7,7 @@ makeDesktopItem, copyDesktopItems, autoPatchelfHook, - openjdk, + jdk23, gtk3, gsettings-desktop-schemas, writeScript, @@ -15,20 +15,22 @@ gnugrep, tor, zlib, - openimajgrabber, - hwi, imagemagick, gzip, gnupg, + libusb1, + pcsclite, }: let pname = "sparrow"; - version = "2.0.0"; + version = "2.2.1"; + + openjdk = jdk23.override { enableJavaFX = true; }; src = fetchurl { - url = "https://github.com/sparrowwallet/${pname}/releases/download/${version}/${pname}-${version}-x86_64.tar.gz"; - sha256 = "sha256-Z4rA3KObPAOuJeI+TzyYaXDyptAxBAWzYJDTplUvw50="; + url = "https://github.com/sparrowwallet/${pname}/releases/download/${version}/sparrowwallet-${version}-x86_64.tar.gz"; + hash = "sha256-m6FHcz62MbEQFfLeDyW0ziqoB4YVYOOL/IB5AgunXrQ="; # nativeBuildInputs, downloadToTemp, and postFetch are used to verify the signed upstream package. # The signature is not a self-contained file. Instead the SHA256 of the package is added to a manifest file. @@ -46,7 +48,7 @@ let mkdir -m 700 -p $GNUPGHOME ln -s ${manifest} ./manifest.txt ln -s ${manifestSignature} ./manifest.txt.asc - ln -s $downloadedFile ./${pname}-${version}-x86_64.tar.gz + ln -s $downloadedFile ./sparrowwallet-${version}-x86_64.tar.gz gpg --import ${publicKey} gpg --verify manifest.txt.asc manifest.txt sha256sum -c --ignore-missing manifest.txt @@ -57,12 +59,12 @@ let manifest = fetchurl { url = "https://github.com/sparrowwallet/${pname}/releases/download/${version}/${pname}-${version}-manifest.txt"; - sha256 = "sha256-qjkKw3WmbRBf+yqcSIYVWmYz8M3u2JxnBriR0Ec/C7A="; + hash = "sha256-rbLTZAkqesmS1pg5wbnbTbnTuFnpWuDID0aCAwwM65w="; }; manifestSignature = fetchurl { url = "https://github.com/sparrowwallet/${pname}/releases/download/${version}/${pname}-${version}-manifest.txt.asc"; - sha256 = "sha256-CRrEzWqFVFQGWsh2+rjSuGHuFmf+y6SetCi2G89jZ/0="; + hash = "sha256-Ct2PVjH5WEa+XqJtUNHlmMhlEN/r/Z+Y73vsHfMo5Qg="; }; publicKey = ./publickey.asc; @@ -70,6 +72,7 @@ let launcher = writeScript "sparrow" '' #! ${bash}/bin/bash params=( + -Dsun.security.smartcardio.library=${pcsclite.lib}/lib/libpcsclite.so.1 --module-path @out@/lib:@jdkModules@/modules --add-opens=javafx.graphics/com.sun.javafx.css=org.controlsfx.controls --add-opens=javafx.graphics/javafx.scene=org.controlsfx.controls @@ -145,6 +148,7 @@ let autoPatchelfHook (lib.getLib stdenv.cc.cc) zlib + libusb1 ]; buildPhase = '' @@ -177,7 +181,10 @@ let rm -fR com.github.sarxos.webcam.capture/com/github/sarxos/webcam/ds/buildin/lib/linux_armel rm -fR com.github.sarxos.webcam.capture/com/github/sarxos/webcam/ds/buildin/lib/linux_armhf rm -fR com.github.sarxos.webcam.capture/com/github/sarxos/webcam/ds/buildin/lib/linux_x86 - rm com.github.sarxos.webcam.capture/com/github/sarxos/webcam/ds/buildin/lib/linux_x64/OpenIMAJGrabber.so + rm -fR openpnp.capture.java/darwin-aarch64 + rm -fR openpnp.capture.java/darwin-x86-64 + rm -fR openpnp.capture.java/linux-aarch64 + rm -fR openpnp.capture.java/win32-x86-64 rm -fR com.nativelibs4java.bridj/org/bridj/lib/linux_arm32_armel rm -fR com.nativelibs4java.bridj/org/bridj/lib/linux_armel rm -fR com.nativelibs4java.bridj/org/bridj/lib/linux_armhf @@ -187,7 +194,9 @@ let rm -fR com.sparrowwallet.merged.module/linux-aarch64 rm -fR com.sparrowwallet.merged.module/linux-arm rm -fR com.sparrowwallet.merged.module/linux-x86 - rm com.sparrowwallet.sparrow/native/linux/x64/hwi + rm -fR com.fazecast.jSerialComm/OpenBSD + rm -fR com.fazecast.jSerialComm/Android + rm -fR com.fazecast.jSerialComm/Solaris ls | xargs -d " " -- echo > ../manifest.txt find . | grep "\.so$" | xargs -- chmod ugo+x @@ -196,21 +205,19 @@ let # Replace the embedded Tor binary (which is in a Tar archive) # with one from Nixpkgs. gzip -c ${torWrapper} > tor.gz - cp tor.gz modules/kmp.tor.binary.linuxx64/kmptor/linux/x64/tor.gz + cp tor.gz modules/io.matthewnelson.kmp.tor.resource.exec.tor/io/matthewnelson/kmp/tor/resource/exec/tor/native/linux-libc/x86_64/tor.gz ''; installPhase = '' mkdir -p $out cp manifest.txt $out/ cp -r modules/ $out/ - ln -s ${openimajgrabber}/lib/OpenIMAJGrabber.so $out/modules/com.github.sarxos.webcam.capture/com/github/sarxos/webcam/ds/buildin/lib/linux_x64/OpenIMAJGrabber.so - ln -s ${hwi}/bin/hwi $out/modules/com.sparrowwallet.sparrow/native/linux/x64/hwi ''; }; in stdenvNoCC.mkDerivation rec { inherit version src; - pname = "sparrow-unwrapped"; + pname = "sparrow"; nativeBuildInputs = [ makeWrapper copyDesktopItems @@ -264,8 +271,8 @@ stdenvNoCC.mkDerivation rec { mkdir -p $out/share/icons ln -s ${sparrow-icons}/hicolor $out/share/icons - mkdir -p $out/etc/udev/rules.d - cp ${hwi}/lib/python*/site-packages/hwilib/udev/*.rules $out/etc/udev/rules.d + mkdir -p $out/etc/udev/ + ln -s ${sparrow-modules}/modules/com.sparrowwallet.lark/udev $out/etc/udev/rules.d runHook postInstall ''; diff --git a/pkgs/applications/blockchains/sparrow/fhsenv.nix b/pkgs/applications/blockchains/sparrow/fhsenv.nix deleted file mode 100644 index 4d17e8adb1a4..000000000000 --- a/pkgs/applications/blockchains/sparrow/fhsenv.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - buildFHSEnv, - sparrow-unwrapped, -}: - -buildFHSEnv { - pname = "sparrow-desktop"; - inherit (sparrow-unwrapped) version; - - runScript = "${sparrow-unwrapped}/bin/sparrow-desktop"; - - targetPkgs = - pkgs: with pkgs; [ - sparrow-unwrapped - pcsclite - ]; - - multiPkgs = - pkgs: with pkgs; [ - pcsclite - ]; - - extraInstallCommands = '' - mkdir -p $out/share - ln -s ${sparrow-unwrapped}/share/applications $out/share - ln -s ${sparrow-unwrapped}/share/icons $out/share - - mkdir -p $out/etc/udev - ln -s ${sparrow-unwrapped}/etc/udev/rules.d $out/etc/udev/rules.d - ''; - - meta = sparrow-unwrapped.meta; -} diff --git a/pkgs/applications/blockchains/sparrow/openimajgrabber.nix b/pkgs/applications/blockchains/sparrow/openimajgrabber.nix deleted file mode 100644 index 7282aa8c305c..000000000000 --- a/pkgs/applications/blockchains/sparrow/openimajgrabber.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - stdenv, - lib, - fetchFromGitHub, - libv4l, -}: -stdenv.mkDerivation rec { - pname = "openimajgrabber"; - version = "1.3.10"; - - src = fetchFromGitHub { - owner = "openimaj"; - repo = "openimaj"; - rev = "openimaj-${version}"; - sha256 = "sha256-Y8707ovE7f6Fk3cJ+PtwvzNpopgH5vlF55m2Xm4hjYM="; - }; - - buildInputs = [ libv4l ]; - - # These build instructions come from build.sh - buildPhase = '' - pushd hardware/core-video-capture/src-native/linux - g++ -fPIC -g -c OpenIMAJGrabber.cpp - g++ -fPIC -g -c capture.cpp - g++ -shared -Wl,-soname,OpenIMAJGrabber.so -o OpenIMAJGrabber.so OpenIMAJGrabber.o capture.o -lv4l2 -lrt -lv4lconvert - popd - ''; - - installPhase = '' - mkdir -p $out/lib - cp hardware/core-video-capture/src-native/linux/OpenIMAJGrabber.so $out/lib - ''; - - meta = with lib; { - description = "Collection of libraries and tools for multimedia (images, text, video, audio, etc.) content analysis and content generation. This package only builds the OpenIMAJGrabber for Linux"; - homepage = "http://www.openimaj.org"; - license = licenses.bsd0; - maintainers = with maintainers; [ - emmanuelrosa - _1000101 - ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c712af0ee6aa..6fdeb30d056a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4445,12 +4445,7 @@ with pkgs; soundkonverter = libsForQt5.soundkonverter; - sparrow-unwrapped = callPackage ../applications/blockchains/sparrow { - openimajgrabber = callPackage ../applications/blockchains/sparrow/openimajgrabber.nix { }; - openjdk = jdk23.override { enableJavaFX = true; }; - }; - - sparrow = callPackage ../applications/blockchains/sparrow/fhsenv.nix { }; + sparrow = callPackage ../applications/blockchains/sparrow { }; steck = callPackage ../servers/pinnwand/steck.nix { };