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,30 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -303,27 +303,6 @@
endforeach()
#
-## Add a rule to download the catch unit test framework
-#
-include(ExternalProject)
-ExternalProject_Add(catch
- GIT_REPOSITORY "https://lab.louiz.org/louiz/Catch.git"
- PREFIX "external"
- UPDATE_COMMAND ""
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ""
- INSTALL_COMMAND ""
- )
-set_target_properties(catch PROPERTIES EXCLUDE_FROM_ALL TRUE)
-ExternalProject_Get_Property(catch SOURCE_DIR)
-if(NOT EXISTS ${CMAKE_SOURCE_DIR}/tests/catch.hpp)
- target_include_directories(test_suite
- PUBLIC "${SOURCE_DIR}/single_include/"
- )
- add_dependencies(test_suite catch)
-endif()
-
-#
## Add some custom rules to launch the tests
#
add_custom_target(check COMMAND "test_suite"

View file

@ -0,0 +1,41 @@
{ lib, stdenv, fetchurl, fetchgit, cmake, libuuid, expat, sqlite, libidn
, libiconv, botan2, systemd, pkg-config, udns, python3Packages } :
let
louiz_catch = fetchgit {
url = "https://lab.louiz.org/louiz/Catch.git";
rev = "0a34cc201ef28bf25c88b0062f331369596cb7b7"; # v2.2.1
sha256 = "0ad0sjhmzx61a763d2ali4vkj8aa1sbknnldks7xlf4gy83jfrbl";
};
in
stdenv.mkDerivation rec {
pname = "biboumi";
version = "9.0";
src = fetchurl {
url = "https://git.louiz.org/biboumi/snapshot/biboumi-${version}.tar.xz";
sha256 = "1jvygri165aknmvlinx3jb8cclny6cxdykjf8dp0a3l3228rmzqy";
};
patches = [ ./catch.patch ];
nativeBuildInputs = [ cmake pkg-config python3Packages.sphinx ];
buildInputs = [ libuuid expat sqlite libiconv libidn botan2 systemd udns ];
buildFlags = [ "all" "man" ];
preConfigure = ''
substituteInPlace CMakeLists.txt --replace /etc/biboumi $out/etc/biboumi
cp ${louiz_catch}/single_include/catch.hpp tests/
'';
doCheck = true;
meta = with lib; {
description = "Modern XMPP IRC gateway";
platforms = platforms.unix;
homepage = "https://lab.louiz.org/louiz/biboumi";
license = licenses.zlib;
maintainers = [ maintainers.woffs ];
};
}

View file

@ -0,0 +1,111 @@
{ stdenv, writeScriptBin, makeWrapper, lib, fetchurl, git, cacert, libpng, libjpeg, libwebp
, erlang, openssl, expat, libyaml, bash, gnused, gnugrep, coreutils, util-linux, procps, gd
, flock
, withMysql ? false
, withPgsql ? false
, withSqlite ? false, sqlite
, withPam ? false, pam
, withZlib ? true, zlib
, withIconv ? true
, withTools ? false
, withRedis ? false
}:
let
fakegit = writeScriptBin "git" ''
#! ${stdenv.shell} -e
if [ "$1" = "describe" ]; then
[ -r .rev ] && cat .rev || true
fi
'';
ctlpath = lib.makeBinPath [ bash gnused gnugrep coreutils util-linux procps ];
in stdenv.mkDerivation rec {
version = "21.04";
pname = "ejabberd";
src = fetchurl {
url = "https://www.process-one.net/downloads/downloads-action.php?file=/${version}/${pname}-${version}.tgz";
sha256 = "09s8mj0dkvp9mxazsqxqqmnl5n2xyi8avx0rzgvqrbl3byanzfzr";
};
nativeBuildInputs = [ fakegit makeWrapper ];
buildInputs = [ erlang openssl expat libyaml gd ]
++ lib.optional withSqlite sqlite
++ lib.optional withPam pam
++ lib.optional withZlib zlib
;
deps = stdenv.mkDerivation {
pname = "ejabberd-deps";
inherit version;
inherit src;
configureFlags = [ "--enable-all" "--with-sqlite3=${sqlite.dev}" ];
nativeBuildInputs = [ git erlang openssl expat libyaml sqlite pam zlib ];
GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
makeFlags = [ "deps" ];
installPhase = ''
for i in deps/*; do
( cd $i
git reset --hard
git clean -ffdx
git describe --always --tags > .rev
rm -rf .git
)
done
rm deps/.got
cp -r deps $out
'';
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "1mvixgb46ss35abjwz3lw38c69bii1xyj557a92bvrxc1gc6gx31";
};
configureFlags =
[ (lib.enableFeature withMysql "mysql")
(lib.enableFeature withPgsql "pgsql")
(lib.enableFeature withSqlite "sqlite")
(lib.enableFeature withPam "pam")
(lib.enableFeature withZlib "zlib")
(lib.enableFeature withIconv "iconv")
(lib.enableFeature withTools "tools")
(lib.enableFeature withRedis "redis")
] ++ lib.optional withSqlite "--with-sqlite3=${sqlite.dev}";
enableParallelBuilding = true;
preBuild = ''
cp -r $deps deps
chmod -R +w deps
patchShebangs .
'';
postInstall = ''
sed -i \
-e '2iexport PATH=${ctlpath}:$PATH' \
-e 's,\(^ *FLOCK=\).*,\1${flock}/bin/flock,' \
-e 's,\(^ *JOT=\).*,\1,' \
-e 's,\(^ *CONNLOCKDIR=\).*,\1/var/lock/ejabberdctl,' \
$out/sbin/ejabberdctl
wrapProgram $out/lib/eimp-*/priv/bin/eimp --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libpng libjpeg libwebp ]}"
rm $out/bin/{mix,iex,elixir}
'';
meta = with lib; {
description = "Open-source XMPP application server written in Erlang";
license = licenses.gpl2;
homepage = "https://www.ejabberd.im";
platforms = platforms.linux;
maintainers = with maintainers; [ sander abbradar ];
};
}

View file

@ -0,0 +1,25 @@
{ stdenv, lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "prosody-filer";
version = "unstable-2021-05-24";
vendorSha256 = "05spkks77x88kc31c1zdg1cbf9ijymjs7qzmhg4c6lql5p2h5fbd";
src = fetchFromGitHub {
owner = "ThomasLeister";
repo = "prosody-filer";
rev = "c65edd199b47dc505366c85b3702230fda797cd6";
sha256 = "0h6vp5flgy4wwmzhs6pf6qkk2j4ah8w919dwhfsq4wdpqs78kc0y";
};
doCheck = false;
meta = with lib; {
homepage = "https://github.com/ThomasLeister/prosody-filer";
maintainers = with maintainers; [ abbradar ];
license = licenses.mit;
platforms = platforms.linux;
description = "A simple file server for handling XMPP http_upload requests";
};
}

View file

@ -0,0 +1,87 @@
{ stdenv, fetchurl, lib, libidn, openssl, makeWrapper, fetchhg
, icu
, lua
, nixosTests
, withLibevent ? true
, withDBI ? true
# use withExtraLibs to add additional dependencies of community modules
, withExtraLibs ? [ ]
, withExtraLuaPackages ? _: [ ]
, withOnlyInstalledCommunityModules ? [ ]
, withCommunityModules ? [ ] }:
with lib;
let
luaEnv = lua.withPackages(p: with p; [
luasocket luasec luaexpat luafilesystem luabitop luadbi-sqlite3 luaunbound
]
++ lib.optional withLibevent p.luaevent
++ lib.optional withDBI p.luadbi
++ withExtraLuaPackages p
);
in
stdenv.mkDerivation rec {
version = "0.12.0"; # also update communityModules
pname = "prosody";
# The following community modules are necessary for the nixos module
# prosody module to comply with XEP-0423 and provide a working
# default setup.
nixosModuleDeps = [
"cloud_notify"
"vcard_muc"
"http_upload"
];
src = fetchurl {
url = "https://prosody.im/downloads/source/${pname}-${version}.tar.gz";
sha256 = "sha256-dS/zIBXaxWX8NBfCGWryaJccNY7gZuUfXZEkE1gNiJo=";
};
# A note to all those merging automated updates: Please also update this
# attribute as some modules might not be compatible with a newer prosody
# version.
communityModules = fetchhg {
url = "https://hg.prosody.im/prosody-modules";
rev = "65438e4ba563";
sha256 = "sha256-zHOrMzcgHOdBl7nObM+OauifbcmKEOfAuj81MDSoLMk=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
luaEnv libidn openssl icu
]
++ withExtraLibs;
configureFlags = [
"--ostype=linux"
"--with-lua-include=${luaEnv}/include"
"--with-lua=${luaEnv}"
];
postBuild = ''
make -C tools/migration
'';
# the wrapping should go away once lua hook is fixed
postInstall = ''
${concatMapStringsSep "\n" (module: ''
cp -r $communityModules/mod_${module} $out/lib/prosody/modules/
'') (lib.lists.unique(nixosModuleDeps ++ withCommunityModules ++ withOnlyInstalledCommunityModules))}
wrapProgram $out/bin/prosodyctl \
--add-flags '--config "/etc/prosody/prosody.cfg.lua"'
make -C tools/migration install
'';
passthru = {
communityModules = withCommunityModules;
tests = { inherit (nixosTests) prosody prosody-mysql; };
};
meta = {
description = "Open-source XMPP application server written in Lua";
license = licenses.mit;
homepage = "https://prosody.im";
platforms = platforms.linux;
maintainers = with maintainers; [ fpletz globin ];
};
}