Merge pull request #96341 from r-ryantm/auto-update/ktlint

ktlint: 0.37.2 -> 0.39.0
This commit is contained in:
Mario Rodas 2020-11-07 11:46:58 -05:00 committed by GitHub
commit e76d0c37e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,38 +1,31 @@
{ stdenv, fetchurl, makeWrapper, jre }:
{ stdenv, fetchurl, makeWrapper, jre_headless }:
stdenv.mkDerivation rec {
pname = "ktlint";
version = "0.37.2";
version = "0.39.0";
src = fetchurl {
url = "https://github.com/shyiko/ktlint/releases/download/${version}/ktlint";
sha256 = "1hhycvvp21gy6g71hwf3pk2jnccpnhcf2z7c85shzffhddy1wc0v";
sha256 = "0lvi4d731ypdjcskj0hdfd37wa3ldspibs2dgaahg7d7zhp1l76g";
};
nativeBuildInputs = [ makeWrapper ];
propagatedBuildInputs = [ jre ];
unpackCmd = ''
mkdir -p ${pname}-${version}
cp $curSrc ${pname}-${version}/ktlint
'';
dontUnpack = true;
installPhase = ''
mkdir -p $out/bin
mv ktlint $out/bin/ktlint
chmod +x $out/bin/ktlint
install -Dm755 $src $out/bin/ktlint
'';
postFixup = ''
wrapProgram $out/bin/ktlint --prefix PATH : "${jre}/bin"
wrapProgram $out/bin/ktlint --prefix PATH : "${jre_headless}/bin"
'';
meta = with stdenv.lib; {
description = "An anti-bikeshedding Kotlin linter with built-in formatter";
homepage = "https://ktlint.github.io/";
license = licenses.mit;
platforms = platforms.all;
platforms = jre_headless.meta.platforms;
maintainers = with maintainers; [ tadfisher ];
};
}