2022-10-29 20:35:49 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-08-22 19:43:47 +02:00
|
|
|
, datasette
|
2022-10-29 20:35:49 +02:00
|
|
|
, fetchFromGitHub
|
2021-08-22 19:43:47 +02:00
|
|
|
, pytest-asyncio
|
2022-10-29 20:35:49 +02:00
|
|
|
, pythonOlder
|
2021-08-22 19:43:47 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "datasette-template-sql";
|
|
|
|
version = "1.0.2";
|
2022-10-29 20:35:49 +02:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2021-08-22 19:43:47 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "simonw";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-10-29 20:35:49 +02:00
|
|
|
hash = "sha256-VmdIEDk3iCBFrTPMm6ud00Z5CWqO0Wk707IQ4oVx5ak=";
|
2021-08-22 19:43:47 +02:00
|
|
|
};
|
|
|
|
|
2022-10-29 20:35:49 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
datasette
|
|
|
|
];
|
2021-08-22 19:43:47 +02:00
|
|
|
|
2022-10-29 20:35:49 +02:00
|
|
|
# Tests require a running datasette instance
|
|
|
|
doCheck = false;
|
2021-08-22 19:43:47 +02:00
|
|
|
|
2022-10-29 20:35:49 +02:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"datasette_template_sql"
|
|
|
|
];
|
2021-08-22 19:43:47 +02:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Datasette plugin for executing SQL queries from templates";
|
|
|
|
homepage = "https://datasette.io/plugins/datasette-template-sql";
|
|
|
|
license = licenses.asl20;
|
2022-10-29 20:35:49 +02:00
|
|
|
maintainers = with maintainers; [ MostAwesomeDude ];
|
2021-08-22 19:43:47 +02:00
|
|
|
};
|
|
|
|
}
|