Skip to content

Commit

Permalink
Merge pull request NixOS#303393 from emmanuelrosa/sparrow-1.8.5
Browse files Browse the repository at this point in the history
sparrow : 1.8.4 -> 1.9.0
  • Loading branch information
RaghavSood authored May 5, 2024
2 parents 2ebb391 + de1719e commit 6e3c9cc
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 35 deletions.
53 changes: 44 additions & 9 deletions pkgs/applications/blockchains/sparrow/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ stdenv
, stdenvNoCC
, lib
, makeWrapper
, fetchurl
Expand All @@ -17,17 +18,54 @@
, hwi
, imagemagick
, gzip
, gnupg
}:

let
pname = "sparrow";
version = "1.8.4";
version = "1.9.0";

src = fetchurl {
url = "https://github.com/sparrowwallet/${pname}/releases/download/${version}/${pname}-${version}-x86_64.tar.gz";
sha256 = "0w6z84w9spwfpqrf5m9bcq30xqp94c27jw3qzxfdyisp8n22xvd8";
sha256 = "sha256-UbFijiPOfVuJP9q6S5odkrhLJ2BUResbJK09Dn9PyCw=";

# 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.
# The manifest file is signed by the owner of the public key, Craig Raw.
# Thus to verify the signed package, the manifest is verified with the public key,
# and then the package is verified against the manifest.
# The public key is obtained from https://keybase.io/craigraw/pgp_keys.asc
# and is included in this repo to provide reproducibility.
nativeBuildInputs = [ gnupg ];
downloadToTemp = true;

postFetch = ''
pushd $(mktemp -d)
export GNUPGHOME=$PWD/gnupg
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
gpg --import ${publicKey}
gpg --verify manifest.txt.asc manifest.txt
sha256sum -c --ignore-missing manifest.txt
popd
mv $downloadedFile $out
'';
};

manifest = fetchurl {
url = "https://github.com/sparrowwallet/${pname}/releases/download/${version}/${pname}-${version}-manifest.txt";
sha256 = "sha256-x50wkQKlh7r4PM5YwhQaz6tnJpByQDMAmYsp1HafX2c=";
};

manifestSignature = fetchurl {
url = "https://github.com/sparrowwallet/${pname}/releases/download/${version}/${pname}-${version}-manifest.txt.asc";
sha256 = "sha256-Nb5tQogQFMObd+nR/eUpEFUoCh1AnTX3s/jICJbvqqo=";
};

publicKey = ./publickey.asc;

launcher = writeScript "sparrow" ''
#! ${bash}/bin/bash
params=(
Expand Down Expand Up @@ -74,7 +112,7 @@ let
exec ${tor}/bin/tor "$@"
'';

jdk-modules = stdenv.mkDerivation {
jdk-modules = stdenvNoCC.mkDerivation {
name = "jdk-modules";
nativeBuildInputs = [ openjdk ];
dontUnpack = true;
Expand All @@ -95,7 +133,7 @@ let
'';
};

sparrow-modules = stdenv.mkDerivation {
sparrow-modules = stdenvNoCC.mkDerivation {
pname = "sparrow-modules";
inherit version src;
nativeBuildInputs = [ makeWrapper gzip gnugrep openjdk autoPatchelfHook stdenv.cc.cc.lib zlib ];
Expand Down Expand Up @@ -150,7 +188,6 @@ let
# with one from Nixpkgs.
gzip -c ${torWrapper} > tor.gz
cp tor.gz modules/kmp.tor.binary.linuxx64/kmptor/linux/x64/tor.gz
find modules
'';

installPhase = ''
Expand All @@ -162,7 +199,7 @@ let
'';
};
in
stdenv.mkDerivation rec {
stdenvNoCC.mkDerivation rec {
inherit version src;
pname = "sparrow-unwrapped";
nativeBuildInputs = [ makeWrapper copyDesktopItems ];
Expand All @@ -180,7 +217,7 @@ stdenv.mkDerivation rec {
})
];

sparrow-icons = stdenv.mkDerivation {
sparrow-icons = stdenvNoCC.mkDerivation {
inherit version src;
pname = "sparrow-icons";
nativeBuildInputs = [ imagemagick ];
Expand Down Expand Up @@ -212,8 +249,6 @@ stdenv.mkDerivation rec {
runHook postInstall
'';

passthru.updateScript = ./update.sh;

meta = with lib; {
description = "A modern desktop Bitcoin wallet application supporting most hardware wallets and built on common standards such as PSBT, with an emphasis on transparency and usability.";
homepage = "https://sparrowwallet.com";
Expand Down
90 changes: 90 additions & 0 deletions pkgs/applications/blockchains/sparrow/publickey.asc
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: GPGTools - http://gpgtools.org

mQINBF2V8eEBEADmjYzGOpxEI0J7jQ1qFzlsrjF6NaBSq+UqKwPOL917pvI/8b/d
bI1gLV1kgIMAnwf3/JWkF4Ind0pk3g3Vj/jzTYg/ePSwjAhvhowoDo4va+AtV066
tRf3FjQYFCWR6ccN4zxmQxZ9QPOp4XIcXwu7Ce+ORRRiU9gkWXfiU64pmpzH89gz
LF35r+98+d9Ov6nAPhRSUlj+vk85mu6Lk8J26srHKWB7iXat1rl4lEAPpFtyvU6L
oO5XZoRPvXce3mByyuh8SDYTr6GVYjfPHWPaxcGrS/qTe2RCn3ec3xWSGT/U4xH0
TwagphjxlSnpeHDxZXG6wpgyVEcjpQ1M9hIK7z1G+SHuW4EoyaZf2llTsNbKvbV8
UOao6g5uAYeLQyBJPKExocNj7+DvbNrpRXYy1levrWtnkNS/oPx3wJgxeXL55uXC
MCcc5X5T6GNNAtBubAxtYRt65Q6Lvga7v6dWTDtvwufxfjtXZGFO/Hut4wS6IyTt
77i4GB/WeAQGGhPHGssVECd80u7/DEZ1EMcfTexsDJ9T1ZeM6orvAQ3i2DGdoiYt
/pJPd2g0LE1Q0HhSVC74JP0pUPJ7V/nzBVPXbYQTQWxESce+NUpnONs2uW+XNSxb
i0PoUwyDZsRQ7SZJZuOStBWqUXC8TUoGtkaRQHtBgumW0zHasgShVpkU+wARAQAB
tCNDcmFpZyBSYXcgPGNyYWlnQHNwYXJyb3d3YWxsZXQuY29tPokCVAQTAQoAPgIb
AwULCQgHAwUVCgkICwUWAgMBAAIeBQIXgBYhBNTQ0yAvwGhJolezjelGGDNMZ0tA
BQJlCacEBQkO+IMiAAoJEOlGGDNMZ0tAMZ0QAJtLTl8n/H2nn3nnuHMV18lLya+F
92/7Q5c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ZBicNI9pGq0gTDuBb+tBwTt2dw8tFSCLyJ+C1dFRZX8NM3FlnpjeJQb7SCcLT4PZ
h4+CyElfF/HkcVZHjjanpXZdP91clgmRidnlDBQ07BmaTgvxdlkwHJFGqGcuZn1A
y1p23CECTYiFxFxgMvVjNHSPSyrEnNC0ash+BIGuxvYfm/7CioThFXw9TbwQXn6C
IsgINPAvnKVmW6Ui0jLvtlIWV/TW2yDFjPoC2ilVexwt9QdvtBf5baT8GCilb5Yo
EmR2yA==
=t5JY
-----END PGP PUBLIC KEY BLOCK-----
26 changes: 0 additions & 26 deletions pkgs/applications/blockchains/sparrow/update.sh

This file was deleted.

0 comments on commit 6e3c9cc

Please sign in to comment.