mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
77 lines
1.5 KiB
Nix
77 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
cli-helpers,
|
|
click,
|
|
configobj,
|
|
prompt-toolkit,
|
|
psycopg,
|
|
pygments,
|
|
sqlparse,
|
|
pgspecial,
|
|
setproctitle,
|
|
keyring,
|
|
pendulum,
|
|
pytestCheckHook,
|
|
setuptools,
|
|
sshtunnel,
|
|
mock,
|
|
}:
|
|
|
|
# this is a pythonPackage because of the ipython line magics in pgcli.magic
|
|
# integrating with ipython-sql
|
|
buildPythonPackage rec {
|
|
pname = "pgcli";
|
|
version = "4.1.0";
|
|
pyproject = true;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-P9Fsi1G9AUX/YYwscyZLzYVLqGaqIG1PB2hR9kG5shU=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
cli-helpers
|
|
click
|
|
configobj
|
|
prompt-toolkit
|
|
psycopg
|
|
pygments
|
|
sqlparse
|
|
pgspecial
|
|
setproctitle
|
|
keyring
|
|
pendulum
|
|
sshtunnel
|
|
];
|
|
|
|
nativeBuildInputs = [ setuptools ];
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
mock
|
|
];
|
|
|
|
disabledTests = [
|
|
# requires running postgres
|
|
"test_application_name_in_env"
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_application_name_db_uri" ];
|
|
|
|
meta = with lib; {
|
|
description = "Command-line interface for PostgreSQL";
|
|
mainProgram = "pgcli";
|
|
longDescription = ''
|
|
Rich command-line interface for PostgreSQL with auto-completion and
|
|
syntax highlighting.
|
|
'';
|
|
homepage = "https://pgcli.com";
|
|
changelog = "https://github.com/dbcli/pgcli/raw/v${version}/changelog.rst";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [
|
|
dywedir
|
|
SuperSandro2000
|
|
];
|
|
};
|
|
}
|