1 { lib, stdenv, fetchurl, makeWrapper, jre_headless, gnused }:
3 stdenv.mkDerivation rec {
8 url = "https://github.com/pinterest/ktlint/releases/download/${version}/ktlint";
9 sha256 = "sha256:14pbjih8gkh5cp9cqpbciml4ba7nvq5vmvivyrmhff3xq93cya1f";
12 nativeBuildInputs = [ makeWrapper ];
17 install -Dm755 $src $out/bin/ktlint
21 wrapProgram $out/bin/ktlint --prefix PATH : "${lib.makeBinPath [ jre_headless gnused ]}"
25 description = "An anti-bikeshedding Kotlin linter with built-in formatter";
26 homepage = "https://ktlint.github.io/";
27 license = licenses.mit;
28 platforms = jre_headless.meta.platforms;
29 changelog = "https://github.com/pinterest/ktlint/blob/master/CHANGELOG.md";
30 maintainers = with maintainers; [ tadfisher SubhrajyotiSen ];
31 sourceProvenance = with sourceTypes; [ binaryBytecode ];
32 mainProgram = "ktlint";