uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
47
pkgs/development/tools/scalafmt/default.nix
Normal file
47
pkgs/development/tools/scalafmt/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ lib, stdenv, jdk, jre, coursier, makeWrapper }:
|
||||
|
||||
let
|
||||
baseName = "scalafmt";
|
||||
version = "3.4.3";
|
||||
deps = stdenv.mkDerivation {
|
||||
name = "${baseName}-deps-${version}";
|
||||
buildCommand = ''
|
||||
export COURSIER_CACHE=$(pwd)
|
||||
${coursier}/bin/cs fetch org.scalameta:scalafmt-cli_2.13:${version} > deps
|
||||
mkdir -p $out/share/java
|
||||
cp $(< deps) $out/share/java/
|
||||
'';
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = "FWGvhKK/VnvetnHS35/z1errYTRZCrcfWyEAHlhKApk=";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = baseName;
|
||||
inherit version;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ jdk deps ];
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
makeWrapper ${jre}/bin/java $out/bin/${baseName} \
|
||||
--add-flags "-cp $CLASSPATH org.scalafmt.cli.Cli"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
installCheckPhase = ''
|
||||
$out/bin/${baseName} --version | grep -q "${version}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Opinionated code formatter for Scala";
|
||||
homepage = "http://scalameta.org/scalafmt";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.markus1189 ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue