feat: update pyload
This commit is contained in:
@@ -10,6 +10,7 @@ self: super: {
|
|||||||
# Python packages
|
# Python packages
|
||||||
python3 = super.python3.override {
|
python3 = super.python3.override {
|
||||||
packageOverrides = pself: psuper: {
|
packageOverrides = pself: psuper: {
|
||||||
|
aia-chaser = pself.callPackage ../pkgs/aia-chaser { };
|
||||||
mini-racer = pself.callPackage ../pkgs/mini-racer.nix { };
|
mini-racer = pself.callPackage ../pkgs/mini-racer.nix { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
32
utils/pkgs/aia-chaser/default.nix
Normal file
32
utils/pkgs/aia-chaser/default.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, cryptography
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "aia-chaser";
|
||||||
|
version = "3.3.0";
|
||||||
|
format = "wheel";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
pname = "aia_chaser";
|
||||||
|
inherit version format;
|
||||||
|
dist = "py3";
|
||||||
|
python = "py3";
|
||||||
|
hash = "sha256-L0aBV3kfAVI1aJH7VgiiEXzGBSP/HU2zAlahkHeT8hk=";
|
||||||
|
};
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
cryptography
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "aia_chaser" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Retrieve missing certificates to complete SSL certificate chains";
|
||||||
|
homepage = "https://github.com/dirkjanm/aia-chaser";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = [ ];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -6,8 +6,8 @@ pyload-ng.overridePythonAttrs (oldAttrs: rec {
|
|||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "pyload";
|
owner = "pyload";
|
||||||
repo = "pyload";
|
repo = "pyload";
|
||||||
rev = "3115740a2210fd57b5d050cd0850a0e61ec493ed"; # [DdownloadCom] fix #4537
|
rev = "71f2700184ee9344dc313d9833ca7a6bb36007db"; # [DdownloadCom] fix #4537
|
||||||
hash = "sha256-g1eEeNnr3Axtr+0BJzMcNQomTEX4EsUG1Jxt+huPyoc=";
|
hash = "sha256-XAa+XbC3kko+zvEMZkPXRoaHAmEFGsNBDxysX+X06Jc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
@@ -16,6 +16,7 @@ pyload-ng.overridePythonAttrs (oldAttrs: rec {
|
|||||||
|
|
||||||
# Add new dependencies required in newer versions
|
# Add new dependencies required in newer versions
|
||||||
propagatedBuildInputs = (oldAttrs.propagatedBuildInputs or []) ++ (with python3Packages; [
|
propagatedBuildInputs = (oldAttrs.propagatedBuildInputs or []) ++ (with python3Packages; [
|
||||||
|
aia-chaser
|
||||||
mini-racer
|
mini-racer
|
||||||
packaging
|
packaging
|
||||||
pydantic
|
pydantic
|
||||||
|
|||||||
@@ -7,9 +7,10 @@ GREEN='\033[0;32m'
|
|||||||
YELLOW='\033[1;33m'
|
YELLOW='\033[1;33m'
|
||||||
NC='\033[0m' # No Color
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
# Script directory
|
# Script and repo directories
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||||
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
PKG_DIR="$(pwd)"
|
||||||
|
REPO_ROOT="$(cd ../../.. && pwd)"
|
||||||
|
|
||||||
# Check if commit SHA is provided
|
# Check if commit SHA is provided
|
||||||
if [ $# -ne 1 ]; then
|
if [ $# -ne 1 ]; then
|
||||||
@@ -34,7 +35,7 @@ fi
|
|||||||
echo -e "${GREEN}==> Updating pyload-ng to commit: ${COMMIT_SHA}${NC}"
|
echo -e "${GREEN}==> Updating pyload-ng to commit: ${COMMIT_SHA}${NC}"
|
||||||
|
|
||||||
# File to update
|
# File to update
|
||||||
PKG_FILE="$REPO_ROOT/utils/pkgs/pyload-ng-updated.nix"
|
PKG_FILE="$PKG_DIR/default.nix"
|
||||||
|
|
||||||
if [ ! -f "$PKG_FILE" ]; then
|
if [ ! -f "$PKG_FILE" ]; then
|
||||||
echo -e "${RED}Error: Package file not found: $PKG_FILE${NC}"
|
echo -e "${RED}Error: Package file not found: $PKG_FILE${NC}"
|
||||||
@@ -53,7 +54,8 @@ echo " ✓ Updated hash in $PKG_FILE"
|
|||||||
|
|
||||||
# Step 3: Build package to discover the correct hash
|
# Step 3: Build package to discover the correct hash
|
||||||
echo -e "${YELLOW}Step 3: Building package to discover hash...${NC}"
|
echo -e "${YELLOW}Step 3: Building package to discover hash...${NC}"
|
||||||
BUILD_OUTPUT=$(nix-build --impure -E "with import <nixpkgs> { overlays = [ (import $REPO_ROOT/utils/overlays/packages.nix) ]; }; callPackage $PKG_FILE { }" 2>&1 || true)
|
cd "$REPO_ROOT"
|
||||||
|
BUILD_OUTPUT=$(nix-build --impure -E "with import <nixpkgs> { overlays = [ (import ./utils/overlays/packages.nix) ]; }; callPackage ./utils/pkgs/pyload-ng { }" 2>&1 || true)
|
||||||
|
|
||||||
# Extract hash from error message
|
# Extract hash from error message
|
||||||
HASH=$(echo "$BUILD_OUTPUT" | grep -oP '\s+got:\s+\Ksha256-[A-Za-z0-9+/=]+' | head -1)
|
HASH=$(echo "$BUILD_OUTPUT" | grep -oP '\s+got:\s+\Ksha256-[A-Za-z0-9+/=]+' | head -1)
|
||||||
@@ -74,7 +76,7 @@ echo " ✓ Updated hash in $PKG_FILE"
|
|||||||
|
|
||||||
# Step 5: Verify the build succeeds
|
# Step 5: Verify the build succeeds
|
||||||
echo -e "${YELLOW}Step 5: Verifying build with correct hash...${NC}"
|
echo -e "${YELLOW}Step 5: Verifying build with correct hash...${NC}"
|
||||||
if nix-build --impure -E "with import <nixpkgs> { overlays = [ (import $REPO_ROOT/utils/overlays/packages.nix) ]; }; callPackage $PKG_FILE { }" > /dev/null 2>&1; then
|
if nix-build --impure -E "with import <nixpkgs> { overlays = [ (import ./utils/overlays/packages.nix) ]; }; callPackage ./utils/pkgs/pyload-ng { }" > /dev/null 2>&1; then
|
||||||
echo " ✓ Build verification successful"
|
echo " ✓ Build verification successful"
|
||||||
else
|
else
|
||||||
echo -e "${RED}Error: Build verification failed${NC}"
|
echo -e "${RED}Error: Build verification failed${NC}"
|
||||||
@@ -83,7 +85,6 @@ fi
|
|||||||
|
|
||||||
# Step 6: Test configuration for fw host (which uses pyload)
|
# Step 6: Test configuration for fw host (which uses pyload)
|
||||||
echo -e "${YELLOW}Step 6: Testing fw configuration...${NC}"
|
echo -e "${YELLOW}Step 6: Testing fw configuration...${NC}"
|
||||||
cd "$REPO_ROOT"
|
|
||||||
if ./scripts/test-configuration fw > /dev/null 2>&1; then
|
if ./scripts/test-configuration fw > /dev/null 2>&1; then
|
||||||
echo " ✓ Configuration test passed"
|
echo " ✓ Configuration test passed"
|
||||||
else
|
else
|
||||||
Reference in New Issue
Block a user