git.iko.soy/typeable/nixpkgs
on master help sign in
s4cmd: init at 2.0.1

Tool for interacting with S3 buckets, with some performance optimizations over s3cmd. Skips installing the bash shell completion scripts in /etc, to work around: https://github.com/NixOS/nixpkgs/issues/4968 https://github.com/pypa/setuptools/issues/130

commit47dfba89d18db76ee2f95905ee23e3c7f9d3f8cd authorBenjamin Hipple <bhipple@protonmail.com> dateThu 12 Jul 2018, 22:22 (8 years ago) parent9bbb84f
2 files changed+37
pkgs/tools/networking/s4cmd/default.nix+35 pkgs/top-level/all-packages.nix+2
pkgs/tools/networking/s4cmd/default.nixnew file+35
@@ -0,0 +1,35 @@
1+{ stdenv, python3Packages }:
2+
3+python3Packages.buildPythonApplication rec {
4+ pname = "s4cmd";
5+ version = "2.0.1";
6+
7+ src = python3Packages.fetchPypi {
8+ inherit pname version;
9+ sha256 = "14gfpnj4xa1sq3x3zd29drpzsygn998y32szwm069ma0w9jwjjz6";
10+ };
11+
12+ propagatedBuildInputs = with python3Packages; [ boto3 pytz ];
13+
14+ # The upstream package tries to install some bash shell completion scripts in /etc.
15+ # Setuptools is bugged and doesn't handle --prefix properly: https://github.com/pypa/setuptools/issues/130
16+ patchPhase = ''
17+ sed -i '/ data_files=/d' setup.py
18+ sed -i 's|os.chmod("/etc.*|pass|' setup.py
19+ '';
20+
21+ # Replace upstream's s4cmd wrapper script with the built-in Nix wrapper
22+ postInstall = ''
23+ ln -fs $out/bin/s4cmd.py $out/bin/s4cmd
24+ '';
25+
26+ # Test suite requires an S3 bucket
27+ doCheck = false;
28+
29+ meta = with stdenv.lib; {
30+ homepage = https://github.com/bloomreach/s4cmd;
31+ description = "Super S3 command line tool";
32+ license = licenses.asl20;
33+ maintainers = [ maintainers.bhipple ];
34+ };
35+}
pkgs/top-level/all-packages.nix+2
@@ -4912,6 +4912,8 @@ with pkgs;
49124912
49134913 s3cmd = callPackage ../tools/networking/s3cmd { };
49144914
4915+ s4cmd = callPackage ../tools/networking/s4cmd { };
4916+
49154917 s3gof3r = callPackage ../tools/networking/s3gof3r { };
49164918
49174919 s6Dns = callPackage ../tools/networking/s6-dns { };