mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
9657693e20
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
39 lines
907 B
Nix
39 lines
907 B
Nix
{ stdenv, fetchurl, makeWrapper, jre }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "ktlint-${version}";
|
|
version = "0.33.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/shyiko/ktlint/releases/download/${version}/ktlint";
|
|
sha256 = "11yh4d7ybmddw86n8ms259rwd3q0gx2qqir2x92dhywp6pb8g11b";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|