treewide/servers: use top-level fetchPypi

This commit is contained in:
figsoda 2023-05-25 12:06:38 -04:00
parent 16b0cc0067
commit 22ec7aebbc
12 changed files with 28 additions and 27 deletions

View File

@ -2,7 +2,7 @@
, fetchFromGitHub
, nixosTests
, python3
, fetchpatch
, fetchPypi
}:
let
@ -10,7 +10,7 @@ let
packageOverrides = self: super: {
sqlalchemy = super.sqlalchemy.overridePythonAttrs (old: rec {
version = "1.4.46";
src = self.fetchPypi {
src = fetchPypi {
pname = "SQLAlchemy";
inherit version;
hash = "sha256-aRO4JH2KKS74MVFipRkx4rQM6RaB8bbxj2lwRSAMSjA=";

View File

@ -3,7 +3,6 @@
, callPackage
, fetchFromGitHub
, fetchPypi
, fetchpatch
, python3
, substituteAll
, ffmpeg-headless
@ -18,9 +17,6 @@
# Additional packages to add to propagatedBuildInputs
, extraPackages ? ps: []
# Write out info about included extraComponents and extraPackages
, writeText
# Override Python packages using
# self: super: { pkg = super.pkg.overridePythonAttrs (oldAttrs: { ... }); }
# Applied after defaultOverrides
@ -47,7 +43,7 @@ let
astral = super.astral.overridePythonAttrs (oldAttrs: rec {
pname = "astral";
version = "2.2";
src = self.fetchPypi {
src = fetchPypi {
inherit pname version;
hash = "sha256-5B2ZZ9XEi+QhNGVS8PTe2tQ/85qDV09f8q0ytmJ7b74=";
};
@ -141,7 +137,7 @@ let
# Pinned due to API changes in 0.1.0
poolsense = super.poolsense.overridePythonAttrs (oldAttrs: rec {
version = "0.0.8";
src = super.fetchPypi {
src = fetchPypi {
pname = "poolsense";
inherit version;
hash = "sha256-17MHrYRmqkH+1QLtgq2d6zaRtqvb9ju9dvPt9gB2xCc=";
@ -200,7 +196,7 @@ let
python-slugify = super.python-slugify.overridePythonAttrs (oldAttrs: rec {
pname = "python-slugify";
version = "4.0.1";
src = super.fetchPypi {
src = fetchPypi {
inherit pname version;
hash = "sha256-aaUXdm4AwSaOW7/A0BCgqFCN4LGNMK1aH/NX+K5yQnA=";
};
@ -247,7 +243,7 @@ let
sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
version = "2.0.12";
src = super.fetchPypi {
src = fetchPypi {
pname = "SQLAlchemy";
inherit version;
hash = "sha256-vd/FvR3uXbD93J2rJvgAwoPzJD5ygbvxByAP7TASX5w=";

View File

@ -1,10 +1,10 @@
{ lib, fetchurl, python3Packages }:
{ lib, python3Packages, fetchPypi }:
python3Packages.buildPythonPackage rec {
pname = "hyp-server";
version = "1.2.0";
src = python3Packages.fetchPypi {
src = fetchPypi {
inherit pname version;
sha256 = "1lafjdcn9nnq6xc3hhyizfwh6l69lc7rixn6dx65aq71c913jc15";
};

View File

@ -1,4 +1,4 @@
{ python3 }:
{ python3, fetchPypi }:
python3.override {
packageOverrides = self: super: {
@ -7,13 +7,13 @@ python3.override {
doCheck = false;
});
# Fixes `AssertionError: database connection isn't set to UTC`
psycopg2 = super.psycopg2.overridePythonAttrs (a: (rec {
psycopg2 = super.psycopg2.overridePythonAttrs (a: rec {
version = "2.8.6";
src = super.fetchPypi {
src = fetchPypi {
inherit version;
inherit (a) pname;
sha256 = "fb23f6c71107c37fd667cb4ea363ddeb936b348bbd6449278eb92c189699f543";
};
}));
});
};
}

View File

@ -1,6 +1,7 @@
{ lib
, nix-update-script
, python3
, fetchPypi
, nix-update-script
}:
python3.pkgs.buildPythonApplication rec {
@ -8,7 +9,7 @@ python3.pkgs.buildPythonApplication rec {
version = "0.41.2";
format = "setuptools";
src = python3.pkgs.fetchPypi {
src = fetchPypi {
inherit pname version;
hash = "sha256-wSpgc1umBMLCc2ThfYSuNNnzqWXyEQM0XhTuOAQaiXg=";
};

View File

@ -1,5 +1,6 @@
{ lib
, python3
, fetchPypi
, fetchFromGitHub
, withE2BE ? true
}:
@ -10,7 +11,7 @@ let
tulir-telethon = self.telethon.overridePythonAttrs (oldAttrs: rec {
version = "1.28.0a3";
pname = "tulir-telethon";
src = super.fetchPypi {
src = fetchPypi {
inherit pname version;
hash = "sha256-N1XQGpjfyUqcT+bsSBxC5Purvnd/+4NzVzMhiaq5yDo=";
};

View File

@ -1,12 +1,13 @@
{ lib
, python3
, fetchPypi
}:
python3.pkgs.buildPythonApplication rec {
pname = "alerta";
version = "8.5.1";
src = python3.pkgs.fetchPypi {
src = fetchPypi {
inherit pname version;
sha256 = "sha256-O13Ic2iHjNF/llp6vdaAiiWExcTBPsz46GAWY3oGDY8=";
};

View File

@ -1,12 +1,13 @@
{ lib
, python3
, fetchPypi
}:
python3.pkgs.buildPythonApplication rec {
pname = "alerta-server";
version = "8.7.0";
src = python3.pkgs.fetchPypi {
src = fetchPypi {
inherit pname version;
sha256 = "sha256-EM3owmj+6gFjU0ARaQP3FLYXliGaGCRSaLgkiPwhGdU=";
};
@ -31,7 +32,7 @@ python3.pkgs.buildPythonApplication rec {
sentry-sdk
];
# We can't run the tests from Nix, because they rely on the presence of a working MongoDB server
# We can't run the tests from Nix, because they rely on the presence of a working MongoDB server
doCheck = false;
pythonImportsCheck = [

View File

@ -1,11 +1,11 @@
{ lib, python3Packages, nixosTests }:
{ lib, python3Packages, fetchPypi, nixosTests }:
python3Packages.buildPythonApplication rec {
pname = "kea-exporter";
version = "0.5.1";
format = "pyproject";
src = python3Packages.fetchPypi {
src = fetchPypi {
inherit pname version;
hash = "sha256-rNGA5XEx9xVUP1SeDPgXcaqgDhgX6JFhRX9GM454P5A=";
};

View File

@ -1,5 +1,6 @@
{ lib
, python3
, fetchPypi
, nixosTests
}:
@ -7,7 +8,7 @@ python3.pkgs.buildPythonApplication rec {
pname = "prometheus-pve-exporter";
version = "2.2.2";
src = python3.pkgs.fetchPypi {
src = fetchPypi {
inherit pname version;
sha256 = "0vvsiw8nj8zkx6v42f260xbsdd92l0ac4vwpm7w38j3qwvanar7k";
};

View File

@ -1,7 +1,6 @@
{ lib
, python3
, fetchFromGitHub
, fetchpatch
, nixosTests
}:

View File

@ -1,6 +1,7 @@
{ lib
, pkgs
, python3Packages
, fetchPypi
, nixosTests
}:
@ -8,7 +9,7 @@ python3Packages.buildPythonApplication rec {
pname = "steck";
version = "0.7.0";
src = python3Packages.fetchPypi {
src = fetchPypi {
inherit pname version;
sha256 = "1a3l427ibwck9zzzy1sp10hmjgminya08i4r9j4559qzy7lxghs1";
};