2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, python3Packages }:
|
2018-07-12 23:22:48 +01:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "s4cmd";
|
2018-08-24 09:28:20 +01:00
|
|
|
version = "2.1.0";
|
2018-07-12 23:22:48 +01:00
|
|
|
|
|
|
|
src = python3Packages.fetchPypi {
|
|
|
|
inherit pname version;
|
2018-08-24 09:28:20 +01:00
|
|
|
sha256 = "0d4mx98i3qhvlmr9x898mjvf827smzx6x5ji6daiwgjdlxc60mj2";
|
2018-07-12 23:22:48 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [ boto3 pytz ];
|
|
|
|
|
|
|
|
# The upstream package tries to install some bash shell completion scripts in /etc.
|
|
|
|
# Setuptools is bugged and doesn't handle --prefix properly: https://github.com/pypa/setuptools/issues/130
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i '/ data_files=/d' setup.py
|
|
|
|
sed -i 's|os.chmod("/etc.*|pass|' setup.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Replace upstream's s4cmd wrapper script with the built-in Nix wrapper
|
|
|
|
postInstall = ''
|
|
|
|
ln -fs $out/bin/s4cmd.py $out/bin/s4cmd
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Test suite requires an S3 bucket
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/bloomreach/s4cmd";
|
2018-07-12 23:22:48 +01:00
|
|
|
description = "Super S3 command line tool";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.bhipple ];
|
|
|
|
};
|
|
|
|
}
|