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" ```
62 lines
1.3 KiB
Nix
62 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
defusedxml,
|
|
fetchFromGitHub,
|
|
lxml,
|
|
paramiko,
|
|
poetry-core,
|
|
pontos,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
typing-extensions,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "python-gvm";
|
|
version = "24.8.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "greenbone";
|
|
repo = "python-gvm";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-JyImC75Le6S2kQXSU/Ze4TNaitJSJ8LD9j/ny+xjoGA=";
|
|
};
|
|
|
|
build-system = [ poetry-core ];
|
|
|
|
pythonRelaxDeps = [ "defusedxml" ];
|
|
|
|
dependencies = [
|
|
defusedxml
|
|
lxml
|
|
paramiko
|
|
typing-extensions
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pontos
|
|
pytestCheckHook
|
|
];
|
|
|
|
disabledTests = [
|
|
# No running SSH available
|
|
"test_connect_error"
|
|
"test_feed_xml_error"
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_feed_xml_error" ];
|
|
|
|
pythonImportsCheck = [ "gvm" ];
|
|
|
|
meta = with lib; {
|
|
description = "Collection of APIs that help with remote controlling a Greenbone Security Manager";
|
|
homepage = "https://github.com/greenbone/python-gvm";
|
|
changelog = "https://github.com/greenbone/python-gvm/releases/tag/v${version}";
|
|
license = with licenses; [ gpl3Plus ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|