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
55
pkgs/tools/text/xml/jing-trang/default.nix
Normal file
55
pkgs/tools/text/xml/jing-trang/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib, stdenv, fetchFromGitHub, jre_headless, jdk_headless, ant, saxon }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jing-trang";
|
||||
version = "20181222";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "relaxng";
|
||||
repo = "jing-trang";
|
||||
rev = "V${version}";
|
||||
sha256 = "sha256-Krupa3MGk5UaaQsaNpPMZuIUzHJytDiksz9ysCPkFS4=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
buildInputs = [ jdk_headless ant saxon ];
|
||||
|
||||
CLASSPATH = "lib/saxon.jar";
|
||||
|
||||
patches = [
|
||||
./no-git-during-build.patch
|
||||
];
|
||||
|
||||
preBuild = "ant";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out"/{share/java,bin}
|
||||
cp ./build/*.jar "$out/share/java/"
|
||||
|
||||
for tool in jing trang; do
|
||||
cat > "$out/bin/$tool" <<EOF
|
||||
#! $SHELL
|
||||
export JAVA_HOME='${jre_headless}'
|
||||
exec '${jre_headless}/bin/java' -jar '$out/share/java/$tool.jar' "\$@"
|
||||
EOF
|
||||
done
|
||||
|
||||
chmod +x "$out"/bin/*
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = "ant test";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A RELAX NG validator in Java";
|
||||
# The homepage is www.thaiopensource.com, but it links to googlecode.com
|
||||
# for downloads and call it the "project site".
|
||||
homepage = "https://www.thaiopensource.com/relaxng/trang.html";
|
||||
platforms = platforms.unix;
|
||||
sourceProvenance = with sourceTypes; [
|
||||
fromSource
|
||||
binaryBytecode # source bundles dependencies as jars
|
||||
];
|
||||
maintainers = [ maintainers.bjornfor ];
|
||||
};
|
||||
}
|
||||
47
pkgs/tools/text/xml/jing-trang/no-git-during-build.patch
Normal file
47
pkgs/tools/text/xml/jing-trang/no-git-during-build.patch
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
From db0ed6267f1a85f0785c81b8ee396f74795c77c0 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Gerbet <thomas@gerbet.me>
|
||||
Date: Sat, 27 Nov 2021 10:24:07 +0100
|
||||
Subject: [PATCH] Do not rely on Git during the build
|
||||
|
||||
---
|
||||
build.xml | 6 ------
|
||||
build.xsl | 6 ------
|
||||
2 files changed, 12 deletions(-)
|
||||
|
||||
diff --git a/build.xml b/build.xml
|
||||
index e8ebaed8..2d26c72f 100644
|
||||
--- a/build.xml
|
||||
+++ b/build.xml
|
||||
@@ -431,12 +431,6 @@
|
||||
<target name="clean"
|
||||
description="Remove almost all files created during the build process">
|
||||
<delete dir="${build.dir}"/>
|
||||
- <exec executable="git">
|
||||
- <arg value="clean"/>
|
||||
- <arg value="-d"/>
|
||||
- <arg value="--force"/>
|
||||
- <arg value="${doc.dir}"/>
|
||||
- </exec>
|
||||
</target>
|
||||
|
||||
<target name="realclean" depends="clean"
|
||||
diff --git a/build.xsl b/build.xsl
|
||||
index fb9f3fef..fa384a27 100644
|
||||
--- a/build.xsl
|
||||
+++ b/build.xsl
|
||||
@@ -23,12 +23,6 @@
|
||||
<target name="dummy"/>
|
||||
<target name="init">
|
||||
<mkdir dir="{$build}"/>
|
||||
- <exec executable="git">
|
||||
- <arg value="submodule"/>
|
||||
- <arg value="update"/>
|
||||
- <arg value="--init"/>
|
||||
- <arg value="--recursive"/>
|
||||
- </exec>
|
||||
<copy todir="{$doc}">
|
||||
<fileset dir="relaxng.org/jclark" includes="**"/>
|
||||
</copy>
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue