buildbot-classic: fix build on 21.05

This commit is contained in:
lassulus 2021-06-09 22:20:33 +02:00
parent ca4f0024cc
commit d8d6fe24a0
2 changed files with 40 additions and 3 deletions

View File

@ -1,6 +1,9 @@
{ pkgs, fetchFromGitHub, python2Packages, git, ... }: { pkgs, fetchFromGitHub, python2Packages, git, ... }: let
python2Packages.buildPythonApplication rec { # we need the old sqlparse since the new one is python2 incompatible
sqlparse = python2Packages.callPackage ./sqlparse.nix {};
in python2Packages.buildPythonApplication rec {
name = "buildbot-classic-${version}"; name = "buildbot-classic-${version}";
version = "0.8.18"; version = "0.8.18";
namePrefix = ""; namePrefix = "";
@ -18,7 +21,7 @@ python2Packages.buildPythonApplication rec {
python2Packages.jinja2 python2Packages.jinja2
python2Packages.twisted python2Packages.twisted
python2Packages.dateutil python2Packages.dateutil
python2Packages.sqlalchemy_migrate (python2Packages.sqlalchemy_migrate.override { sqlparse = sqlparse; })
python2Packages.pysqlite python2Packages.pysqlite
pkgs.coreutils pkgs.coreutils
]; ];

View File

@ -0,0 +1,34 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, pytest
, isPy3k
}:
buildPythonPackage rec {
pname = "sqlparse";
version = "0.3.1";
src = fetchPypi {
inherit pname version;
sha256 = "e162203737712307dfe78860cc56c8da8a852ab2ee33750e33aeadf38d12c548";
};
checkInputs = [ pytest ];
checkPhase = ''
py.test
'';
# Package supports 3.x, but tests are clearly 2.x only.
doCheck = !isPy3k;
meta = with stdenv.lib; {
description = "Non-validating SQL parser for Python";
longDescription = ''
Provides support for parsing, splitting and formatting SQL statements.
'';
homepage = "https://github.com/andialbrecht/sqlparse";
license = licenses.bsd3;
};
}