diff --git a/pkgs/python-packages/python-bitcointx/default.nix b/pkgs/python-packages/python-bitcointx/default.nix index a39ee5b..fd6b7fe 100644 --- a/pkgs/python-packages/python-bitcointx/default.nix +++ b/pkgs/python-packages/python-bitcointx/default.nix @@ -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 = '' @@ -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 nixbitcoin ]; license = licenses.gpl3; }; } diff --git a/pkgs/python-packages/python-bitcointx/get-sha256.sh b/pkgs/python-packages/python-bitcointx/get-sha256.sh index 0ecceb9..a625280 100755 --- a/pkgs/python-packages/python-bitcointx/get-sha256.sh +++ b/pkgs/python-packages/python-bitcointx/get-sha256.sh @@ -1,26 +1,26 @@ #!/usr/bin/env bash set -euo pipefail -. "${BASH_SOURCE[0]%/*}/../../../helper/run-in-nix-env" "git gnupg" "$@" +. "${BASH_SOURCE[0]%/*}/../../../helper/run-in-nix-env" "git gnupg jq" "$@" -TMPDIR=$(mktemp -d -p /tmp) -trap 'rm -rf $TMPDIR' EXIT -cd "$TMPDIR" +latest=$(curl -s "https://api.github.com/repos/Simplexum/python-bitcointx/tags" | jq -r '.[0].name') +echo "Latest release is $latest" -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 "$latest" -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" checkout -q "tags/$latest" +git -C "$repo" verify-commit HEAD +rm -rf "$repo"/.git +hash=$(nix hash path "$repo") +echo echo "tag: $latest" -nix hash path . +echo "hash: $hash"