@@ -0,0 +1,51 @@
1+{
2+ stdenv, fetchurl, pythonPackages, openssl,
3+
4+ # Many Salt modules require various Python modules to be installed,
5+ # passing them in this array enables Salt to find them.
6+ extraInputs ? []
7+}:
8+
9+pythonPackages.buildPythonApplication rec {
10+ name = "salt-${version}";
11+ version = "2015.8.8";
12+
13+ disabled = pythonPackages.isPy3k;
14+
15+ src = fetchurl {
16+ url = "https://pypi.python.org/packages/source/s/salt/${name}.tar.gz";
17+ sha256 = "1xcfcs50pyammb60myph4f8bi2r6iwkxwsnnhrjwvkv2ymxwxv5j";
18+ };
19+
20+ propagatedBuildInputs = with pythonPackages; [
21+ futures
22+ jinja2
23+ markupsafe
24+ msgpack
25+ pycrypto
26+ pyyaml
27+ pyzmq
28+ requests
29+ salttesting
30+ tornado
31+ ] ++ extraInputs;
32+
33+ patches = [ ./fix-libcrypto-loading.patch ];
34+
35+ postPatch = ''
36+ substituteInPlace "salt/utils/rsax931.py" \
37+ --subst-var-by "libcrypto" "${openssl}/lib/libcrypto.so"
38+ '';
39+
40+ # The tests fail due to socket path length limits at the very least;
41+ # possibly there are more issues but I didn't leave the test suite running
42+ # as is it rather long.
43+ doCheck = false;
44+
45+ meta = with stdenv.lib; {
46+ homepage = https://saltstack.com/;
47+ description = "Portable, distributed, remote execution and configuration management system";
48+ maintainers = with maintainers; [ aneeshusa ];
49+ license = licenses.asl20;
50+ };
51+}