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,39 @@
commit 433a8b99da9d71e96434bd421c2468cbda29d37c
Author: Mauricio Collares <mauricio@collares.org>
Date: Tue Mar 2 22:07:11 2021 -0300
trim logfile information from pari 2.13 output
Pari (since commit 609fb01faf827d91dfa9136849a647a3bbfe8036) prints
extra logfile information such as
[logfile is "/tmp/nix-shell.2BquN9/home/.sympow/datafiles/P02HM.txt"]
which messes up sympow's parsing. This commit reuses the same trimming
mechanism already in sympow to trim this new message.
diff --git a/Configure b/Configure
index 1ef9756..776bec2 100755
--- a/Configure
+++ b/Configure
@@ -322,7 +322,7 @@ echo "datafiles/param_data: \$(OTHERb)" >> $FILE
echo " \$(MKDIR) -p datafiles" >> $FILE
echo " \$(TOUCH) datafiles/param_data" >> $FILE
echo " \$(SH) armd.sh" >> $FILE
-echo " \$(SED) -i -e '/logfile =/d' datafiles/*.txt" >> $FILE
+echo " \$(SED) -i -e '/logfile /d' datafiles/*.txt" >> $FILE
echo "sympow.1: sympow" >> $FILE
echo " \$(HELP2MAN) \$(H2MFLAGS) -s 1 -n \"SYMPOW program\" -I sympow.h2m -o \$@ ./\$<" >> $FILE
echo "clean:" >> $FILE
diff --git a/generate.c b/generate.c
index dbb811f..783320c 100644
--- a/generate.c
+++ b/generate.c
@@ -148,6 +148,7 @@ static void trimit(char *A)
" -e '"
"/^\?/d" ";"
"/^(/d" ";"
+ "/logfile /d" ";"
"/Warning:/d" ";"
"/^About to find TOO_BIG/d" ";"
"/^Now working backwards/d" ";"

View file

@ -0,0 +1,76 @@
{ lib, stdenv
, fetchFromGitLab
, makeWrapper
, which
, autoconf
, help2man
, file
, pari
}:
stdenv.mkDerivation rec {
version = "2.023.6";
pname = "sympow";
src = fetchFromGitLab {
group = "rezozer";
owner = "forks";
repo = "sympow";
rev = "v${version}";
sha256 = "132l0xv00ld1svvv9wh99wfra4zzjv2885h2sq0dsl98wiyvi5zl";
};
patches = [ ./clean-extra-logfile-output-from-pari.patch ];
postUnpack = ''
patchShebangs .
'';
nativeBuildInputs = [
makeWrapper
which
autoconf
help2man
file
pari
];
configurePhase = ''
runHook preConfigure
export PREFIX="$out"
export VARPREFIX="$out" # see comment on postInstall
./Configure # doesn't take any options
runHook postConfigure
'';
# Usually, sympow has 3 levels of caching: statically distributed in /usr/,
# shared in /var and per-user in ~/.sympow. The shared cache assumes trust in
# other users and a shared /var is not compatible with nix's approach, so we
# set VARPREFIX to the read-only $out. This effectively disables shared
# caching. See https://trac.sagemath.org/ticket/3360#comment:36 and sympow's
# README for more details on caching.
# sympow will complain at runtime about the lack of write-permissions on the
# shared cache. We pass the `-quiet` flag by default to disable this.
postInstall = ''
wrapProgram "$out/bin/sympow" --add-flags '-quiet'
'';
# Example from the README as a sanity check.
doInstallCheck = true;
installCheckPhase = ''
export HOME="$TMP/home"
mkdir -p "$HOME"
"$out/bin/sympow" -sp 2p16 -curve "[1,2,3,4,5]" | grep '8.3705'
'';
meta = with lib; {
description = "Compute special values of symmetric power elliptic curve L-functions";
license = {
shortName = "sympow";
fullName = "Custom, BSD-like. See COPYING file.";
free = true;
};
maintainers = teams.sage.members;
platforms = platforms.linux;
};
}