Skip to content
Merged
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: 5 additions & 5 deletions etc/nix/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@

# Pin pypi repo to a specific commit which includes all necessary
# Python deps. The default version (which is updated with every
# mach-nix release) is insufficient.
# The corresponding sha256 hash can be obtained with:
# $ nix-prefetch-url --unpack https://github.com/DavHau/pypi-deps-db/tarball/<pypiDataRev>
pypiDataRev = "fb3c23d059d64e81539fa317635bbe241ba4531e";
# mach-nix release) is usually insufficient. Use
# ./get-latest-pypi-deps-db.sh to obtain the data rev & hash.
pypiDataRev =
"894c2005d655011934c04d150f8c57d25a25e29d"; # 2021-03-04T20:10:42Z
pypiDataSha256 =
"168zc3a0z1flgk3srhyf4z6379f37ka5d6z1c1h3hr2agllr7rmc";
"1y6297drhbv34da1rjwp01s8wwwqkwxjsq3rkjcdqy69w4r987rz";
});

in {
Expand Down
12 changes: 12 additions & 0 deletions etc/nix/get-latest-pypi-deps-db.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

USER_SLASH_REPO="DavHau/pypi-deps-db"

DATA=$(curl "https://api.github.com/repos/$USER_SLASH_REPO/commits/master" | jq '.sha, .commit.author.date' | sed 's/"//g')
COMMIT=$(sed '1q;d' <<< "$DATA")
DATE=$(sed '2q;d' <<< "$DATA")
SHA256=$(nix-prefetch-url --unpack --type sha256 "https://github.com/$USER_SLASH_REPO/tarball/$COMMIT" | tail -n 1)

echo ""
echo "pypiDataRev = \"$COMMIT\"; # $DATE"
echo "pypiDataSha256 = \"$SHA256\";"