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,26 @@
{ lib, stdenv, fetchFromGitHub, ldc, dub }:
stdenv.mkDerivation {
pname = "Literate";
version = "unstable-2021-01-22";
src = fetchFromGitHub {
owner = "zyedidia";
repo = "Literate";
rev = "7004dffec0cff3068828514eca72172274fd3f7d";
sha256 = "sha256-erNFe0+FlrslEENyO/YxYQbmec0voK31UWr5qVt+nXQ=";
fetchSubmodules = true;
};
buildInputs = [ ldc dub ];
installPhase = "install -D bin/lit $out/bin/lit";
meta = with lib; {
description = "A literate programming tool for any language";
homepage = "https://zyedidia.github.io/literate/";
license = licenses.mit;
mainProgram = "lit";
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,27 @@
{ lib, stdenv, fetchurl, python3, asciidoc }:
stdenv.mkDerivation rec {
pname = "eweb";
version = "9.10";
src = fetchurl {
url = "mirror://sourceforge/project/eweb/${pname}-${version}.tar.bz2";
sha256 = "1xy7vm2sj5q6s620fm25klmnwnz9xkrxmx4q2f8h6c85ydisayd5";
};
buildInputs = [ python3 asciidoc ];
installPhase = ''
install -d $out/bin $out/share/doc/${pname}-${version}
cp etangle.py $out/bin
cp etangle.w etangle.html $out/share/doc/${pname}-${version}
'';
meta = with lib; {
homepage = "http://eweb.sourceforge.net/";
description = "An Asciidoc-based literate programming tool, written in Python";
platforms = platforms.linux;
license = licenses.gpl3Plus;
maintainers = [ maintainers.AndersonTorres ];
};
}

View file

@ -0,0 +1,32 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "funnelweb";
version = "3.20";
src = fetchurl {
url = "http://www.ross.net/funnelweb/download/funnelweb_v320/funnelweb_v320_source.tar.gz";
sha256 = "0zqhys0j9gabrd12mnk8ibblpc8dal4kbl8vnhxmdlplsdpwn4wg";
};
buildPhase = ''
cd source
${stdenv.cc}/bin/cc -D__linux__ -o fw *.c
'';
installPhase = ''
install -d $out/bin
install fw $out/bin/fw
'';
meta = with lib; {
version = "3.20";
description = "A simple, reliable literate-programming macro preprocessor";
homepage = "http://www.ross.net/funnelweb/";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = [ maintainers.AndersonTorres ];
};
}
#TODO: implement it for other platforms
#TODO: Documentation files

View file

@ -0,0 +1,28 @@
{ lib
, python3
, fetchFromGitHub
}:
python3.pkgs.buildPythonPackage rec {
pname = "md-tangle";
version = "1.3.1";
# By some strange reason, fetchPypi fails miserably
src = fetchFromGitHub {
owner = "joakimmj";
repo = pname;
rev = "v${version}";
hash = "sha256-cUME2AHK/Fva+1TSTE6hNu0SE/V1FOwcSxWF0+iZhS4=";
};
# Pure Python application, uses only standard modules and comes without
# testing suite
doCheck = false;
meta = with lib;{
homepage = "https://github.com/joakimmj/md-tangle/";
description = "Generates (\"tangles\") source code from Markdown documents";
license = licenses.mit;
maintainers = with maintainers; [ AndersonTorres ];
};
}

View file

@ -0,0 +1,83 @@
{ lib, stdenv, fetchFromGitHub, nawk, groff, icon-lang, useIcon ? true }:
lib.fix (noweb: stdenv.mkDerivation rec {
pname = "noweb";
version = "2.12";
src = fetchFromGitHub {
owner = "nrnrnr";
repo = "noweb";
rev = "v${builtins.replaceStrings ["."] ["_"] version}";
sha256 = "1160i2ghgzqvnb44kgwd6s3p4jnk9668rmc15jlcwl7pdf3xqm95";
};
sourceRoot = "source/src";
patches = [
# Remove FAQ
./no-FAQ.patch
];
postPatch = ''
substituteInPlace Makefile --replace 'strip' '${stdenv.cc.targetPrefix}strip'
'';
nativeBuildInputs = [ groff ] ++ lib.optionals useIcon [ icon-lang ];
buildInputs = [ nawk ];
preBuild = ''
mkdir -p "$out/lib/noweb"
'';
makeFlags = lib.optionals useIcon [
"LIBSRC=icon"
"ICONC=icont"
] ++ [ "CC=${stdenv.cc.targetPrefix}cc" ];
preInstall = ''
mkdir -p "$tex/tex/latex/noweb"
installFlagsArray+=( \
"BIN=${placeholder "out"}/bin" \
"ELISP=${placeholder "out"}/share/emacs/site-lisp" \
"LIB=${placeholder "out"}/lib/noweb" \
"MAN=${placeholder "out"}/share/man" \
"TEXINPUTS=${placeholder "tex"}/tex/latex/noweb" \
)
'';
installTargets = [ "install-code" "install-tex" "install-elisp" ];
postInstall = ''
substituteInPlace "$out/bin/cpif" --replace "PATH=/bin:/usr/bin" ""
for f in $out/bin/no{index,roff,roots,untangle,web} \
$out/lib/noweb/to{ascii,html,roff,tex} \
$out/lib/noweb/{bt,empty}defn \
$out/lib/noweb/{noidx,pipedocs,unmarkup}; do
# NOTE: substituteInPlace breaks Icon binaries, so make sure the script
# uses (n)awk before calling.
if grep -q nawk "$f"; then
substituteInPlace "$f" --replace "nawk" "${nawk}/bin/nawk"
fi
done
# HACK: This is ugly, but functional.
PATH=$out/bin:$PATH make -BC xdoc
make "''${installFlagsArray[@]}" install-man
ln -s "$tex" "$out/share/texmf"
'';
outputs = [ "out" "tex" ];
tlType = "run";
passthru.pkgs = [ noweb.tex ];
meta = with lib; {
description = "A simple, extensible literate-programming tool";
homepage = "https://www.cs.tufts.edu/~nr/noweb";
license = licenses.bsd2;
maintainers = with maintainers; [ yurrriq ];
platforms = with platforms; linux ++ darwin;
};
})

View file

@ -0,0 +1,11 @@
--- a/Makefile 2006-06-12 22:14:20.000000000 +0200
+++ b/Makefile 2010-06-17 11:30:11.804018145 +0200
@@ -198,7 +198,7 @@
(cd elisp; ci -l $(CINAME) $(CIMSG) *.el)
ci -l $(CINAME) $(CIMSG) Makefile.nw INSTALL INSTALL.DOS README FAQ COPYRIGHT nwmake *.nw
-source: FAQ
+source:
for i in c shell lib xdoc icon awk tex; do (cd $$i; make CPIF=">" source); done
sleep 1
for i in c shell lib xdoc icon awk tex; do (cd $$i; make touch); done

View file

@ -0,0 +1,45 @@
{lib, stdenv, fetchurl, tex}:
stdenv.mkDerivation rec {
pname = "nuweb";
version = "1.60";
src = fetchurl {
url = "mirror://sourceforge/project/nuweb/${pname}-${version}.tar.gz";
sha256 = "08xmwq48biy2c1fr8wnyknyvqs9jfsj42cb7fw638xqv35f0xxvl";
};
buildInputs = [ tex ];
patchPhase = ''
sed -ie 's|nuweb -r|./nuweb -r|' Makefile
'';
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: global.o:/build/nuweb-1.60/global.h:91: multiple definition of
# `current_sector'; main.o:/build/nuweb-1.60/global.h:91: first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
buildPhase = ''
make nuweb
make nuweb.pdf nuwebdoc.pdf all
'';
installPhase = ''
install -d $out/bin $out/share/man/man1 $out/share/doc/${pname}-${version} $out/share/emacs/site-lisp
cp nuweb $out/bin
cp nuweb.el $out/share/emacs/site-lisp
gzip -c nuweb.1 > $out/share/man/man1/nuweb.1.gz
cp htdocs/index.html nuweb.w nuweb.pdf nuwebdoc.pdf README $out/share/doc/${pname}-${version}
'';
meta = with lib; {
description = "A simple literate programming tool";
homepage = "http://nuweb.sourceforge.net";
license = licenses.free;
maintainers = [ maintainers.AndersonTorres ];
platforms = platforms.unix;
};
}
# TODO: nuweb.el Emacs integration