ktlint: 0.38.1 -> 0.39.0
https://github.com/pinterest/ktlint/releases/tag/0.39.0
This commit is contained in:
parent
0d64cc340b
commit
11d1486a85
@ -1,38 +1,31 @@
|
||||
{ stdenv, fetchurl, makeWrapper, jre }:
|
||||
{ stdenv, fetchurl, makeWrapper, jre_headless }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ktlint";
|
||||
version = "0.38.1";
|
||||
version = "0.39.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/shyiko/ktlint/releases/download/${version}/ktlint";
|
||||
sha256 = "0wz839ikvqjxpx2rzaxaji12pcqxcgmmb91xypz2dzlplxvzxvdj";
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user