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:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,32 @@
{ lib, stdenv, makeWrapper, fetchurl, jre }:
stdenv.mkDerivation rec {
pname = "cfr";
version = "0.152";
src = fetchurl {
url = "http://www.benf.org/other/cfr/cfr_${version}.jar";
sha256 = "sha256-9obo897Td9e8h9IWqQ6elRLfQVbnWwbGVaFmSK6HZbI=";
};
nativeBuildInputs = [ makeWrapper ];
buildCommand = ''
jar=$out/share/java/cfr_${version}.jar
install -Dm444 $src $jar
makeWrapper ${jre}/bin/java $out/bin/cfr --add-flags "-jar $jar"
'';
meta = with lib; {
description = "Another java decompiler";
longDescription = ''
CFR will decompile modern Java features - Java 8 lambdas (pre and post
Java beta 103 changes), Java 7 String switches etc, but is written
entirely in Java 6.
'';
homepage = "http://www.benf.org/other/cfr/";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.mit;
platforms = platforms.all;
};
}

View file

@ -0,0 +1,44 @@
{ stdenv
, lib
, fetchurl
, jre
, makeWrapper
, unzip
}:
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "dex2jar";
version = "2.0";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${name}.zip";
sha256 = "1g3mrbyl8sdw1nhp17z23qbfzqpa0w2yxrywgphvd04jdr6yn1vr";
};
nativeBuildInputs = [ makeWrapper unzip ];
postPatch = ''
rm *.bat
chmod +x *.sh
'';
installPhase = ''
f=$out/lib/dex2jar/
mkdir -p $f $out/bin
mv * $f
for i in $f/*.sh; do
n=$(basename ''${i%.sh})
makeWrapper $i $out/bin/$n --prefix PATH : ${lib.makeBinPath [ jre ] }
done
'';
meta = with lib; {
homepage = "https://sourceforge.net/projects/dex2jar/";
description = "Tools to work with android .dex and java .class files";
maintainers = with maintainers; [ makefu ];
license = licenses.asl20;
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,31 @@
{ fetchurl, lib, stdenv, zlib }:
stdenv.mkDerivation rec {
pname = "fastjar";
version = "0.98";
src = fetchurl {
url = "https://download.savannah.gnu.org/releases/fastjar/fastjar-${version}.tar.gz";
sha256 = "0iginbz2m15hcsa3x4y7v3mhk54gr1r7m3ghx0pg4n46vv2snmpi";
};
buildInputs = [ zlib ];
doCheck = true;
meta = {
description = "Fast Java archiver written in C";
longDescription = ''
Fastjar is a version of Sun's `jar' utility, written entirely in C, and
therefore quite a bit faster. Fastjar can be up to 100x faster than
the stock `jar' program running without a JIT.
'';
homepage = "https://savannah.nongnu.org/projects/fastjar/";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
maintainers = [ ];
};
}

View file

@ -0,0 +1,96 @@
{ lib, stdenv, fetchFromGitHub
, jdk, maven
, runtimeShell, makeWrapper
}:
let
platform =
if stdenv.isLinux then "linux"
else if stdenv.isDarwin then "mac"
else if stdenv.isWindows then "windows"
else throw "unsupported platform";
in
stdenv.mkDerivation rec {
pname = "java-language-server";
version = "0.2.38";
src = fetchFromGitHub {
owner = "georgewfraser";
repo = pname;
# commit hash is used as owner sometimes forgets to set tags. See https://github.com/georgewfraser/java-language-server/issues/104
rev = "1dfdc54d1f1e57646a0ec9c0b3f4a4f094bd9f17";
sha256 = "sha256-zkbl/SLg09XK2ZhJNzWEtvFCQBRQ62273M/2+4HV1Lk=";
};
fetchedMavenDeps = stdenv.mkDerivation {
name = "java-language-server-${version}-maven-deps";
inherit src;
buildInputs = [ maven ];
buildPhase = ''
runHook preBuild
mvn package -Dmaven.repo.local=$out -DskipTests
runHook postBuild
'';
installPhase = ''
runHook preInstall
find $out -type f \
-name \*.lastUpdated -or \
-name resolver-status.properties -or \
-name _remote.repositories \
-delete
runHook postInstall
'';
dontFixup = true;
dontConfigure = true;
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "sha256-YkcQKmm8oeEH7uyUzV/qGoe4LiI6o5wZ7o69qrO3oCA=";
};
nativeBuildInputs = [ maven jdk makeWrapper ];
dontConfigure = true;
buildPhase = ''
runHook preBuild
jlink \
${lib.optionalString (!stdenv.isDarwin) "--module-path './jdks/${platform}/jdk-13/jmods'"} \
--add-modules java.base,java.compiler,java.logging,java.sql,java.xml,jdk.compiler,jdk.jdi,jdk.unsupported,jdk.zipfs \
--output dist/${platform} \
--no-header-files \
--no-man-pages \
--compress 2
mvn package --offline -Dmaven.repo.local=${fetchedMavenDeps} -DskipTests
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/java/java-language-server
cp -r dist/classpath dist/*${platform}* $out/share/java/java-language-server
# a link is not used as lang_server_${platform}.sh makes use of "dirname $0" to access other files
makeWrapper $out/share/java/java-language-server/lang_server_${platform}.sh $out/bin/java-language-server
runHook postInstall
'';
meta = with lib; {
description = "A Java language server based on v3.0 of the protocol and implemented using the Java compiler API";
homepage = "https://github.com/georgewfraser/java-language-server";
license = licenses.mit;
maintainers = with maintainers; [ hqurve ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,37 @@
{ lib, stdenv, fetchzip }:
stdenv.mkDerivation rec {
pname = "jhiccup";
version = "2.0.10";
src = fetchzip {
url = "https://www.azul.com/files/jHiccup-${version}-dist.zip";
sha256 = "1hsvi8wjh615fnjf75h7b5afp04chqcgvini30vfcn3m9a5icbgy";
};
dontConfigure = true;
buildPhase = ":";
installPhase = ''
mkdir -p $out/bin $out/share/java
cp *.jar $out/share/java
# Fix version number (out of date at time of import), and path to
# jHiccup.jar
for x in ./jHiccup ./jHiccupLogProcessor; do
substituteInPlace $x \
--replace 'JHICCUP_Version=2.0.5' 'JHICCUP_Version=${version}' \
--replace '$INSTALLED_PATH' $out/share/java
done
mv jHiccup jHiccupLogProcessor $out/bin/
'';
meta = {
description = "Measure JVM application stalls and GC pauses";
homepage = "https://www.azul.com/jhiccup/";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.cc0;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ thoughtpolice ];
};
}

View file

@ -0,0 +1,28 @@
{ stdenv, ocamlPackages }:
let inherit (ocamlPackages) ocaml findlib sawja; in
stdenv.mkDerivation {
pname = "sawjap";
inherit (sawja) src version;
prePatch = "cd test";
buildInputs = [ ocaml findlib sawja ];
buildPhase = ''
runHook preBuild
mkdir -p $out/bin
ocamlfind opt -o $out/bin/sawjap -package sawja -linkpkg sawjap.ml
runHook postBuild
'';
dontInstall = true;
meta = sawja.meta // {
description = "Pretty-print .class files";
};
}

View file

@ -0,0 +1,47 @@
{ stdenv, fetchzip, lib, makeWrapper, makeDesktopItem, jdk, gawk }:
stdenv.mkDerivation rec {
version = "2.1.2";
pname = "visualvm";
src = fetchzip {
url = "https://github.com/visualvm/visualvm.src/releases/download/${version}/visualvm_${builtins.replaceStrings ["."] [""] version}.zip";
sha256 = "sha256-khbXzdsC0PA10HEu/dIFQ87+QbKpctmTUTt/zEuxV6c=";
};
desktopItem = makeDesktopItem {
name = "visualvm";
exec = "visualvm";
comment = "Java Troubleshooting Tool";
desktopName = "VisualVM";
genericName = "Java Troubleshooting Tool";
categories = [ "Development" ];
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
find . -type f -name "*.dll" -o -name "*.exe" -delete;
substituteInPlace etc/visualvm.conf \
--replace "#visualvm_jdkhome=" "visualvm_jdkhome=" \
--replace "/path/to/jdk" "${jdk.home}" \
cp -r . $out
'';
meta = with lib; {
description = "A visual interface for viewing information about Java applications";
longDescription = ''
VisualVM is a visual tool integrating several commandline JDK
tools and lightweight profiling capabilities. Designed for both
production and development time use, it further enhances the
capability of monitoring and performance analysis for the Java
SE platform.
'';
homepage = "https://visualvm.github.io";
license = licenses.gpl2ClasspathPlus;
platforms = platforms.all;
maintainers = with maintainers; [ michalrus moaxcp ];
};
}