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
119
pkgs/development/compilers/zulu/8.nix
Normal file
119
pkgs/development/compilers/zulu/8.nix
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, autoPatchelfHook
|
||||
, unzip
|
||||
, makeWrapper
|
||||
, setJavaClassPath
|
||||
, zulu
|
||||
# minimum dependencies
|
||||
, alsa-lib
|
||||
, fontconfig
|
||||
, freetype
|
||||
, xorg
|
||||
# runtime dependencies
|
||||
, cups
|
||||
# runtime dependencies for GTK+ Look and Feel
|
||||
, gtkSupport ? stdenv.isLinux
|
||||
, cairo
|
||||
, glib
|
||||
, gtk3
|
||||
}:
|
||||
|
||||
let
|
||||
version = "8.48.0.53";
|
||||
openjdk = "8.0.265";
|
||||
|
||||
sha256_linux = "ed32513524b32a83b3b388831c69d1884df5675bd5069c6d1485fd1a060be209";
|
||||
sha256_darwin = "36f189bfbd0255195848835819377474ba9c1c868e3c204633c451c96e21f30a";
|
||||
|
||||
platform = if stdenv.isDarwin then "macosx" else "linux";
|
||||
hash = if stdenv.isDarwin then sha256_darwin else sha256_linux;
|
||||
extension = if stdenv.isDarwin then "zip" else "tar.gz";
|
||||
|
||||
runtimeDependencies = [
|
||||
cups
|
||||
] ++ lib.optionals gtkSupport [
|
||||
cairo glib gtk3
|
||||
];
|
||||
runtimeLibraryPath = lib.makeLibraryPath runtimeDependencies;
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
inherit version openjdk platform hash extension;
|
||||
|
||||
pname = "zulu";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cdn.azul.com/zulu/bin/zulu${version}-ca-jdk${openjdk}-${platform}_x64.${extension}";
|
||||
sha256 = hash;
|
||||
};
|
||||
|
||||
buildInputs = lib.optionals stdenv.isLinux [
|
||||
alsa-lib # libasound.so wanted by lib/libjsound.so
|
||||
fontconfig
|
||||
freetype
|
||||
stdenv.cc.cc # libstdc++.so.6
|
||||
xorg.libX11
|
||||
xorg.libXext
|
||||
xorg.libXi
|
||||
xorg.libXrender
|
||||
xorg.libXtst
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
autoPatchelfHook
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
unzip
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
cp -r ./* "$out/"
|
||||
'' + lib.optionalString stdenv.isLinux ''
|
||||
# jni.h expects jni_md.h to be in the header search path.
|
||||
ln -s $out/include/linux/*_md.h $out/include/
|
||||
'' + ''
|
||||
mkdir -p $out/nix-support
|
||||
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
|
||||
|
||||
# Set JAVA_HOME automatically.
|
||||
cat <<EOF >> $out/nix-support/setup-hook
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'' + lib.optionalString stdenv.isLinux ''
|
||||
# We cannot use -exec since wrapProgram is a function but not a command.
|
||||
for bin in $( find "$out" -executable -type f ); do
|
||||
if patchelf --print-interpreter "$bin" &> /dev/null; then
|
||||
wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}"
|
||||
fi
|
||||
done
|
||||
'' + ''
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
find "$out" -name libfontmanager.so -exec \
|
||||
patchelf --add-needed libfontconfig.so {} \;
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
home = zulu;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.azul.com/products/zulu/";
|
||||
license = licenses.gpl2;
|
||||
description = "Certified builds of OpenJDK";
|
||||
longDescription = ''
|
||||
Certified builds of OpenJDK that can be deployed across multiple
|
||||
operating systems, containers, hypervisors and Cloud platforms.
|
||||
'';
|
||||
maintainers = with maintainers; [ fpletz ];
|
||||
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||
mainProgram = "java";
|
||||
};
|
||||
}
|
||||
122
pkgs/development/compilers/zulu/default.nix
Normal file
122
pkgs/development/compilers/zulu/default.nix
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, autoPatchelfHook
|
||||
, unzip
|
||||
, makeWrapper
|
||||
, setJavaClassPath
|
||||
, zulu
|
||||
# minimum dependencies
|
||||
, alsa-lib
|
||||
, fontconfig
|
||||
, freetype
|
||||
, zlib
|
||||
, xorg
|
||||
# runtime dependencies
|
||||
, cups
|
||||
# runtime dependencies for GTK+ Look and Feel
|
||||
, gtkSupport ? stdenv.isLinux
|
||||
, cairo
|
||||
, glib
|
||||
, gtk3
|
||||
}:
|
||||
|
||||
let
|
||||
version = "11.52.13";
|
||||
openjdk = "11.0.13";
|
||||
|
||||
sha256_linux = "77a126669b26b3a89e0117b0f28cddfcd24fcd7699b2c1d35f921487148b9a9f";
|
||||
sha256_darwin = "a96f9f859350f977319ebb5c2a999c182ab6b99b24c60e19d97c54367868a63e";
|
||||
|
||||
platform = if stdenv.isDarwin then "macosx" else "linux";
|
||||
hash = if stdenv.isDarwin then sha256_darwin else sha256_linux;
|
||||
extension = if stdenv.isDarwin then "zip" else "tar.gz";
|
||||
|
||||
runtimeDependencies = [
|
||||
cups
|
||||
] ++ lib.optionals gtkSupport [
|
||||
cairo glib gtk3
|
||||
];
|
||||
runtimeLibraryPath = lib.makeLibraryPath runtimeDependencies;
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
inherit version openjdk platform hash extension;
|
||||
|
||||
pname = "zulu";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cdn.azul.com/zulu/bin/zulu${version}-ca-jdk${openjdk}-${platform}_x64.${extension}";
|
||||
sha256 = hash;
|
||||
};
|
||||
|
||||
buildInputs = lib.optionals stdenv.isLinux [
|
||||
alsa-lib # libasound.so wanted by lib/libjsound.so
|
||||
fontconfig
|
||||
freetype
|
||||
stdenv.cc.cc # libstdc++.so.6
|
||||
xorg.libX11
|
||||
xorg.libXext
|
||||
xorg.libXi
|
||||
xorg.libXrender
|
||||
xorg.libXtst
|
||||
zlib
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
autoPatchelfHook
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
unzip
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
cp -r ./* "$out/"
|
||||
'' + lib.optionalString stdenv.isLinux ''
|
||||
# jni.h expects jni_md.h to be in the header search path.
|
||||
ln -s $out/include/linux/*_md.h $out/include/
|
||||
'' + ''
|
||||
mkdir -p $out/nix-support
|
||||
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
|
||||
|
||||
# Set JAVA_HOME automatically.
|
||||
cat <<EOF >> $out/nix-support/setup-hook
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'' + lib.optionalString stdenv.isLinux ''
|
||||
# We cannot use -exec since wrapProgram is a function but not a command.
|
||||
#
|
||||
# jspawnhelper is executed from JVM, so it doesn't need to wrap it, and it
|
||||
# breaks building OpenJDK (#114495).
|
||||
for bin in $( find "$out" -executable -type f -not -name jspawnhelper ); do
|
||||
wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}"
|
||||
done
|
||||
'' + ''
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
find "$out" -name libfontmanager.so -exec \
|
||||
patchelf --add-needed libfontconfig.so {} \;
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
home = zulu;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.azul.com/products/zulu/";
|
||||
license = licenses.gpl2;
|
||||
description = "Certified builds of OpenJDK";
|
||||
longDescription = ''
|
||||
Certified builds of OpenJDK that can be deployed across multiple
|
||||
operating systems, containers, hypervisors and Cloud platforms.
|
||||
'';
|
||||
maintainers = with maintainers; [ fpletz ];
|
||||
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||
mainProgram = "java";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue