Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 44 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 jre, 6 makeWrapper, 7 maven, 8}: 9 10let 11 pname = "s3proxy"; 12 version = "2.6.0"; 13in 14maven.buildMavenPackage { 15 inherit pname version; 16 mvnHash = "sha256-OCFs1Q4NL5heP8AVvkQ+ZdhmPD2SNZMCF2gxjXpbfW4="; 17 18 src = fetchFromGitHub { 19 owner = "gaul"; 20 repo = "s3proxy"; 21 rev = "s3proxy-${version}"; 22 hash = "sha256-wd3GdSAcoJvlyFqnccdhM83IY2Q7KJQHoyV+sQGEwo4="; 23 }; 24 25 doCheck = !stdenv.hostPlatform.isDarwin; 26 27 nativeBuildInputs = [ makeWrapper ]; 28 29 installPhase = '' 30 install -D --mode=644 --target-directory=$out/share/s3proxy target/s3proxy-${version}-jar-with-dependencies.jar 31 32 makeWrapper ${jre}/bin/java $out/bin/s3proxy \ 33 --add-flags "-jar $out/share/s3proxy/s3proxy-${version}-jar-with-dependencies.jar" 34 ''; 35 36 meta = { 37 description = "Access other storage backends via the S3 API"; 38 mainProgram = "s3proxy"; 39 homepage = "https://github.com/gaul/s3proxy"; 40 changelog = "https://github.com/gaul/s3proxy/releases/tag/s3proxy-${version}"; 41 license = lib.licenses.asl20; 42 maintainers = with lib.maintainers; [ camelpunch ]; 43 }; 44}