nixpkgs/pkgs/development/tools/ktlint/default.nix
R. RyanTM ac8f6a4b76 ktlint: 0.34.0 -> 0.34.2
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/ktlint/versions
2019-08-19 07:40:17 -07:00

38 lines
907 B
Nix

{ stdenv, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
name = "ktlint-${version}";
version = "0.34.2";
src = fetchurl {
url = "https://github.com/shyiko/ktlint/releases/download/${version}/ktlint";
sha256 = "1v1s4y8ads2s8hjsjacxni1j0dbmnhilhnfs0xabr3aljqs15wb2";
};
nativeBuildInputs = [ makeWrapper ];
propagatedBuildInputs = [ jre ];
unpackCmd = ''
mkdir -p ${name}
cp $curSrc ${name}/ktlint
'';
installPhase = ''
mkdir -p $out/bin
mv ktlint $out/bin/ktlint
chmod +x $out/bin/ktlint
'';
postFixup = ''
wrapProgram $out/bin/ktlint --prefix PATH : "${jre}/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;
maintainers = with maintainers; [ tadfisher ];
};
}