Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-bitcointx: 1.1.4 -> 1.1.5 #701

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions pkgs/python-packages/python-bitcointx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

buildPythonPackageWithDepsCheck rec {
pname = "python-bitcointx";
version = "1.1.4";
version = "1.1.5";

src = fetchFromGitHub {
owner = "Simplexum";
repo = "python-bitcointx";
rev = "python-bitcointx-v${version}";
hash = "sha256-y8/cyLQr3GbpYqCg8LKTfyL0OX7eIo5AxjdFTWTqHmk=";
hash = "sha256-KXndYEsJ8JRTiGojrKXmAEeGDlHrNGs5MtYs9XYiqMo=";
};

patchPhase = ''
Expand All @@ -18,10 +18,14 @@ buildPythonPackageWithDepsCheck rec {
done
'';

pythonImportCheck = [
"bitcointx"
];

meta = with lib; {
description = "Interface to Bitcoin transaction data structures";
homepage = "https://github.com/Simplexum/python-bitcointx";
maintainers = with maintainers; [ nixbitcoin ];
maintainers = with maintainers; [ seberm ];
license = licenses.gpl3;
};
}
36 changes: 18 additions & 18 deletions pkgs/python-packages/python-bitcointx/get-sha256.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
#!/usr/bin/env bash
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p git gnupg jq

set -euo pipefail
. "${BASH_SOURCE[0]%/*}/../../../helper/run-in-nix-env" "git gnupg" "$@"

TMPDIR=$(mktemp -d -p /tmp)
trap 'rm -rf $TMPDIR' EXIT
cd "$TMPDIR"
newVersion=$(curl -s "https://api.github.com/repos/Simplexum/python-bitcointx/tags" | jq -r '.[0].name')
echo "Latest release is ${newVersion}"

echo "Fetching latest release"
git clone https://github.com/simplexum/python-bitcointx 2> /dev/null
cd python-bitcointx
latest=python-bitcointx-v1.1.4
echo "Latest release is ${latest}"
tmpdir=$(mktemp -d /tmp/python-bitcointx-verify-gpg.XXX)
trap 'rm -rf $tmpdir' EXIT
repo="${tmpdir}/repo"
git clone --depth 1 --branch "${newVersion}" -c advice.detachedHead=false https://github.com/Simplexum/python-bitcointx "$repo"

# GPG verification
export GNUPGHOME=$TMPDIR
export GNUPGHOME="$tmpdir"
echo "Fetching Dimitry Pethukov's Key"
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys B17A35BBA187395784E2A6B32301D26BDC15160D 2> /dev/null
echo "Verifying latest release"
git verify-commit "$latest"

git checkout -q "tags/$latest"
rm -rf .git
echo
echo "Verifying commit"
git -C "$repo" verify-commit HEAD
rm -rf "$repo"/.git
newHash=$(nix hash path "$repo")

echo "tag: $latest"
nix hash path .
echo
echo "tag: $newVersion"
echo "hash: $newHash"