mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 20:33:21 +00:00
0ab7cc7080
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
921 B
Nix
39 lines
921 B
Nix
{ stdenv, fetchurl, makeWrapper, jre }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "ktlint";
|
|
version = "0.35.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/shyiko/ktlint/releases/download/${version}/ktlint";
|
|
sha256 = "0zj18wcapnqny7k4wvwkyjfds6l2f4y22w6a84k06rzih2ghv0gm";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
propagatedBuildInputs = [ jre ];
|
|
|
|
unpackCmd = ''
|
|
mkdir -p ${pname}-${version}
|
|
cp $curSrc ${pname}-${version}/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 ];
|
|
};
|
|
}
|