mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 17:14:33 +00:00
69 lines
1.8 KiB
Nix
69 lines
1.8 KiB
Nix
{ lib
|
|
, stdenv
|
|
, python3
|
|
, openssl
|
|
# Many Salt modules require various Python modules to be installed,
|
|
# passing them in this array enables Salt to find them.
|
|
, extraInputs ? []
|
|
}:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "salt";
|
|
version = "3006.0";
|
|
|
|
src = python3.pkgs.fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-7iw4s06oYUCQE8gc8KqFKX1pzxB3O3PuegcQtclC3Mo=";
|
|
};
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
distro
|
|
jinja2
|
|
jmespath
|
|
looseversion
|
|
markupsafe
|
|
msgpack
|
|
packaging
|
|
psutil
|
|
pycryptodomex
|
|
pyyaml
|
|
pyzmq
|
|
requests
|
|
] ++ extraInputs;
|
|
|
|
patches = [
|
|
./fix-libcrypto-loading.patch
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace "salt/utils/rsax931.py" \
|
|
--subst-var-by "libcrypto" "${lib.getLib openssl}/lib/libcrypto${stdenv.hostPlatform.extensions.sharedLibrary}"
|
|
substituteInPlace requirements/base.txt \
|
|
--replace contextvars ""
|
|
|
|
# Don't require optional dependencies on Darwin, let's use
|
|
# `extraInputs` like on any other platform
|
|
echo -n > "requirements/darwin.txt"
|
|
|
|
# Remove windows-only requirement
|
|
substituteInPlace "requirements/zeromq.txt" \
|
|
--replace 'pyzmq==25.0.2 ; sys_platform == "win32"' ""
|
|
'';
|
|
|
|
# Don't use fixed dependencies on Darwin
|
|
USE_STATIC_REQUIREMENTS = "0";
|
|
|
|
# The tests fail due to socket path length limits at the very least;
|
|
# possibly there are more issues but I didn't leave the test suite running
|
|
# as is it rather long.
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
homepage = "https://saltproject.io/";
|
|
changelog = "https://docs.saltproject.io/en/latest/topics/releases/${version}.html";
|
|
description = "Portable, distributed, remote execution and configuration management system";
|
|
maintainers = with maintainers; [ Flakebi ];
|
|
license = licenses.asl20;
|
|
};
|
|
}
|