mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 18:37:02 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
37 lines
963 B
Nix
37 lines
963 B
Nix
{ lib, stdenv
|
|
, python
|
|
, fetchPypi
|
|
, buildPythonPackage
|
|
, postgresql }:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pgsanity";
|
|
version = "0.2.9";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "de0bbd6fe4f98bf5139cb5f466eac2e2abaf5a7b050b9e4867b87bf360873173";
|
|
};
|
|
|
|
checkPhase = ''
|
|
${python.interpreter} -m unittest discover -s test
|
|
'';
|
|
|
|
checkInputs = [ postgresql ];
|
|
propagatedBuildInputs = [ postgresql ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/markdrago/pgsanity";
|
|
description = "Checks the syntax of Postgresql SQL files";
|
|
longDescription = ''
|
|
PgSanity checks the syntax of Postgresql SQL files by
|
|
taking a file that has a list of bare SQL in it,
|
|
making that file look like a C file with embedded SQL,
|
|
run it through ecpg and
|
|
let ecpg report on the syntax errors of the SQL.
|
|
'';
|
|
license = stdenv.lib.licenses.mit;
|
|
maintainers = with maintainers; [ nalbyuites ];
|
|
};
|
|
}
|