2020-05-15 21:57:56 +00:00
|
|
|
{ lib
|
2022-12-28 21:21:41 +00:00
|
|
|
, stdenv
|
2020-05-15 21:57:56 +00:00
|
|
|
, python3
|
2023-07-15 17:15:38 +00:00
|
|
|
, fetchPypi
|
2020-05-15 21:57:56 +00:00
|
|
|
, openssl
|
2020-04-24 23:36:52 +00:00
|
|
|
# Many Salt modules require various Python modules to be installed,
|
|
|
|
# passing them in this array enables Salt to find them.
|
2020-05-15 21:57:56 +00:00
|
|
|
, extraInputs ? []
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "salt";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "3007.1";
|
2023-08-22 20:05:09 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
src = fetchPypi {
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit pname version;
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-uTOsTLPksRGLRtraVcnMa9xvD5S0ySh3rsRLJcaijJo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
patches = [
|
|
|
|
./fix-libcrypto-loading.patch
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace "salt/utils/rsax931.py" \
|
2022-12-28 21:21:41 +00:00
|
|
|
--subst-var-by "libcrypto" "${lib.getLib openssl}/lib/libcrypto${stdenv.hostPlatform.extensions.sharedLibrary}"
|
2021-06-28 23:13:55 +00:00
|
|
|
substituteInPlace requirements/base.txt \
|
|
|
|
--replace contextvars ""
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
# Don't require optional dependencies on Darwin, let's use
|
|
|
|
# `extraInputs` like on any other platform
|
|
|
|
echo -n > "requirements/darwin.txt"
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
# Remove windows-only requirement
|
2022-05-18 14:49:53 +00:00
|
|
|
substituteInPlace "requirements/zeromq.txt" \
|
2023-04-29 16:46:19 +00:00
|
|
|
--replace 'pyzmq==25.0.2 ; sys_platform == "win32"' ""
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
distro
|
|
|
|
jinja2
|
|
|
|
jmespath
|
|
|
|
looseversion
|
|
|
|
markupsafe
|
|
|
|
msgpack
|
|
|
|
packaging
|
|
|
|
psutil
|
|
|
|
pycryptodomex
|
|
|
|
pyyaml
|
|
|
|
pyzmq
|
|
|
|
requests
|
2024-04-21 15:54:59 +00:00
|
|
|
tornado
|
2023-08-22 20:05:09 +00:00
|
|
|
] ++ extraInputs;
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
# Don't use fixed dependencies on Darwin
|
|
|
|
USE_STATIC_REQUIREMENTS = "0";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# 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;
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
meta = with lib; {
|
2021-03-19 17:17:44 +00:00
|
|
|
homepage = "https://saltproject.io/";
|
|
|
|
changelog = "https://docs.saltproject.io/en/latest/topics/releases/${version}.html";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Portable, distributed, remote execution and configuration management system";
|
2020-10-27 00:29:36 +00:00
|
|
|
maintainers = with maintainers; [ Flakebi ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|