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,15 @@
diff -Naur source-old/src/CMakeLists.txt source-new/src/CMakeLists.txt
--- source-old/src/CMakeLists.txt 1969-12-31 21:00:01.000000000 -0300
+++ source-new/src/CMakeLists.txt 2021-10-29 12:03:06.461399341 -0300
@@ -362,10 +360,8 @@
if (EXISTS ${EXTERNAL_SRC_DIR}/git/openal AND STATIC_OPENAL)
amsg("${CL_YEL}Building OpenAL static from external/git mirror${CL_RST}")
ExternalProject_Add(OpenAL
- SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/openal
+ SOURCE_DIR "${EXTERNAL_SRC_DIR}/git/openal"
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/openal_static
- UPDATE_COMMAND ""
- GIT_REPOSITORY "${EXTERNAL_SRC_DIR}/git/openal"
${EXTERNAL_DEFS}
${CMAKE_EXTERNAL_DEFS}
-DALSOFT_BACKEND_DSOUND=OFF

View file

@ -0,0 +1,17 @@
diff -Naur source-old/src/CMakeLists.txt source-new/src/CMakeLists.txt
--- source-old/src/CMakeLists.txt 1969-12-31 21:00:01.000000000 -0300
+++ source-new/src/CMakeLists.txt 2021-10-29 12:03:06.461399341 -0300
@@ -419,12 +415,7 @@
set(LUA_TAG "luajit51")
if (EXISTS ${EXTERNAL_SRC_DIR}/git/luajit)
ExternalProject_Add(luajit
- SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/luajit
- GIT_REPOSITORY "${EXTERNAL_SRC_DIR}/git/luajit"
- CONFIGURE_COMMAND ""
- GIT_TAG "v2.1.0-beta3"
- UPDATE_COMMAND ""
- INSTALL_COMMAND ""
+ SOURCE_DIR "${EXTERNAL_SRC_DIR}/git/luajit"
BUILD_IN_SOURCE 1
BUILD_COMMAND "${EXTMAKE_CMD}"
DEFAULT_CC=${CMAKE_C_COMPILER}

View file

@ -0,0 +1,15 @@
diff -Naur source-old/src/frameserver/decode/default/CMakeLists.txt source-new/src/frameserver/decode/default/CMakeLists.txt
--- source-old/src/frameserver/decode/default/CMakeLists.txt 1969-12-31 21:00:01.000000000 -0300
+++ source-new/src/frameserver/decode/default/CMakeLists.txt 2021-10-29 12:01:31.989933725 -0300
@@ -62,10 +62,8 @@
if (STATIC_LIBUVC)
pkg_check_modules(LIBUSB_1 REQUIRED libusb-1.0)
ExternalProject_Add(libuvc
- SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/frameserver/decode/libuvc"
+ SOURCE_DIR "${EXTERNAL_SRC_DIR}/git/libuvc"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/libuvc_static"
- UPDATE_COMMAND ""
- GIT_REPOSITORY "${EXTERNAL_SRC_DIR}/git/libuvc"
${EXTERNAL_DEFS}
${CMAKE_EXTERNAL_DEFS}
-DBUILD_UVC_STATIC=ON

View file

@ -0,0 +1,25 @@
{ fetchgit, fetchFromGitHub }:
{
letoram-openal-src = fetchFromGitHub {
owner = "letoram";
repo = "openal";
rev = "1c7302c580964fee9ee9e1d89ff56d24f934bdef";
hash = "sha256-InqU59J0zvwJ20a7KU54xTM7d76VoOlFbtj7KbFlnTU=";
};
freetype-src = fetchgit {
url = "git://git.sv.nongnu.org/freetype/freetype2.git";
rev = "94cb3a2eb96b3f17a1a3bd0e6f7da97c0e1d8f57";
sha256 = "sha256-LzjqunX/T8khF2UjPlPYiQOwMGem8MqPYneR2LdZ5Fg=";
};
libuvc-src = fetchFromGitHub {
owner = "libuvc";
repo = "libuvc";
rev = "b2b01ae6a2875d05c99eb256bb15815018d6e837";
sha256 = "sha256-2zCTjyodRARkHM/Q0r4bdEH9LO1Z9xPCnY2xE4KZddA=";
};
luajit-src = fetchgit {
url = "https://luajit.org/git/luajit-2.0.git";
rev = "d3294fa63b344173db68dd612c6d3801631e28d4";
sha256 = "sha256-1iHBXcbYhWN4M8g5oH09S1j1WrjYzI6qcRbHsdfpRkk=";
};
}

View file

@ -0,0 +1,187 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchgit
, SDL2
, cmake
, espeak
, ffmpeg
, file
, freetype
, harfbuzz
, leptonica
, libGL
, libX11
, libXau
, libXcomposite
, libXdmcp
, libXfixes
, libdrm
, libffi
, libusb1
, libuvc
, libvlc
, libvncserver
, libxcb
, libxkbcommon
, lua
, luajit
, makeWrapper
, mesa
, openal
, pkg-config
, sqlite
, tesseract
, valgrind
, wayland
, wayland-protocols
, xcbutil
, xcbutilwm
, xz
, buildManPages ? true, ruby
, useBuiltinLua ? true
, useStaticFreetype ? false
, useStaticLibuvc ? false
, useStaticOpenAL ? true
, useStaticSqlite ? false
}:
stdenv.mkDerivation rec {
pname = "arcan" + lib.optionalString useStaticOpenAL "-static-openal";
version = "0.6.1.1";
src = fetchFromGitHub {
owner = "letoram";
repo = "arcan";
rev = version;
hash = "sha256-+dJaBSKGbHOwzA26/jDyh2UF9YRwGUcysJIeAM4kvfc=";
};
nativeBuildInputs = [
cmake
makeWrapper
pkg-config
] ++ lib.optionals buildManPages [
ruby
];
buildInputs = [
SDL2
espeak
ffmpeg
file
freetype
harfbuzz
leptonica
libGL
libX11
libXau
libXcomposite
libXdmcp
libXfixes
libdrm
libffi
libusb1
libuvc
libvlc
libvncserver
libxcb
libxkbcommon
lua
luajit
mesa
openal
sqlite
tesseract
valgrind
wayland
wayland-protocols
xcbutil
xcbutilwm
xz
];
patches = [
# Nixpkgs-specific: redirect vendoring
./000-openal.patch
./001-luajit.patch
./002-libuvc.patch
];
# Emulate external/git/clone.sh
postUnpack = let
inherit (import ./clone-sources.nix { inherit fetchFromGitHub fetchgit; })
letoram-openal-src freetype-src libuvc-src luajit-src;
in
''
pushd $sourceRoot/external/git/
''
+ (lib.optionalString useStaticOpenAL ''
cp -a ${letoram-openal-src}/ openal
chmod --recursive 744 openal
'')
+ (lib.optionalString useStaticFreetype ''
cp -a ${freetype-src}/ freetype
chmod --recursive 744 freetype
'')
+ (lib.optionalString useStaticLibuvc ''
cp -a ${libuvc-src}/ libuvc
chmod --recursive 744 libuvc
'')
+ (lib.optionalString useBuiltinLua ''
cp -a ${luajit-src}/ luajit
chmod --recursive 744 luajit
'') +
''
popd
'';
postPatch = ''
substituteInPlace ./src/platform/posix/paths.c \
--replace "/usr/bin" "$out/bin" \
--replace "/usr/share" "$out/share"
substituteInPlace ./src/CMakeLists.txt --replace "SETUID" "# SETUID"
'';
# INFO: According to the source code, the manpages need to be generated before
# the configure phase
preConfigure = lib.optionalString buildManPages ''
pushd doc
ruby docgen.rb mangen
popd
'';
cmakeFlags = [
"-DBUILD_PRESET=everything"
# The upstream project recommends tagging the distribution
"-DDISTR_TAG=Nixpkgs"
"-DENGINE_BUILDTAG=${version}"
"-DHYBRID_SDL=on"
"-DBUILTIN_LUA=${if useBuiltinLua then "on" else "off"}"
"-DDISABLE_JIT=${if useBuiltinLua then "on" else "off"}"
"-DSTATIC_FREETYPE=${if useStaticFreetype then "on" else "off"}"
"-DSTATIC_LIBUVC=${if useStaticLibuvc then "on" else "off"}"
"-DSTATIC_OPENAL=${if useStaticOpenAL then "on" else "off"}"
"-DSTATIC_SQLite3=${if useStaticSqlite then "on" else "off"}"
"../src"
];
hardeningDisable = [
"format"
];
meta = with lib; {
homepage = "https://arcan-fe.com/";
description = "Combined Display Server, Multimedia Framework, Game Engine";
longDescription = ''
Arcan is a portable and fast self-sufficient multimedia engine for
advanced visualization and analysis work in a wide range of applications
e.g. game development, real-time streaming video, monitoring and
surveillance, up to and including desktop compositors and window managers.
'';
license = with licenses; [ bsd3 gpl2Plus lgpl2Plus ];
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,43 @@
{ config, lib, pkgs }:
lib.makeScope pkgs.newScope (self: with self; {
# Dependencies
espeak = pkgs.espeak-ng;
ffmpeg = pkgs.ffmpeg-full;
harfbuzz = pkgs.harfbuzzFull;
# Arcan
arcan = callPackage ./arcan { };
arcan-wrapped = callPackage ./wrapper.nix { };
xarcan = callPackage ./xarcan { };
# Appls
durden = callPackage ./durden { };
durden-wrapped = callPackage ./wrapper.nix {
name = "durden-wrapped";
appls = [ durden ];
};
pipeworld = callPackage ./pipeworld { };
pipeworld-wrapped = callPackage ./wrapper.nix {
name = "pipeworld-wrapped";
appls = [ pipeworld ];
};
# Warning: prio is deprecated; however it works and is useful for testing
prio = callPackage ./prio { };
prio-wrapped = callPackage ./wrapper.nix {
name = "prio-wrapped";
appls = [ prio ];
};
# One Expression to SymlinkJoin Them All
all-wrapped = callPackage ./wrapper.nix {
name = "all-wrapped";
appls = [ durden pipeworld ];
};
})

View file

@ -0,0 +1,43 @@
{ lib
, stdenv
, fetchFromGitHub
}:
stdenv.mkDerivation rec {
pname = "durden";
version = "0.6.1+date=2022-05-23";
src = fetchFromGitHub {
owner = "letoram";
repo = pname;
rev = "9284182bd8b3b976387cd6494c5f605633a559fc";
hash = "sha256-K1MjgNyX6qlaHya6Grej0cagORihS35BWECWn2HcRCk=";
};
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p ${placeholder "out"}/share/arcan/appl/
cp -a ./durden ${placeholder "out"}/share/arcan/appl/
runHook postInstall
'';
meta = with lib; {
homepage = "https://durden.arcan-fe.com/";
description = "Reference Desktop Environment for Arcan";
longDescription = ''
Durden is a desktop environment for the Arcan Display Server. It serves
both as a reference showcase on how to take advantage of some of the
features in Arcan, and as a very competent entry to the advanced-user side
of the desktop environment spectrum.
'';
license = licenses.bsd3;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,50 @@
{ lib
, stdenv
, fetchFromGitHub
}:
stdenv.mkDerivation rec {
pname = "pipeworld";
version = "0.pre+date=2022-04-03";
src = fetchFromGitHub {
owner = "letoram";
repo = pname;
rev = "f60d0b93fcd5462f47b1c928c109f5b4cbd74eef";
hash = "sha256-PNziP5LaUODZwtAHvg8uYt/EyoD3mB5aWIfp7n5a82E=";
};
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p ${placeholder "out"}/share/arcan/appl/
cp -a ./pipeworld ${placeholder "out"}/share/arcan/appl/
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/letoram/pipeworld";
description = "Dataflow 'spreadsheet' desktop environment";
longDescription = ''
Pipeworld is a zooming dataflow tool and desktop heavily inspired by
userland. It is built using the arcan desktop engine.
It combines the programmable processing of shell scripts and pipes, the
interactive visual addressing/programming model of spread sheets, the
scenegraph- and interactive controls-, IPC- and client processing- of
display servers into one model with zoomable tiling window management.
It can be used as a standalone desktop of its own, or as a normal
application within another desktop as a 'substitute' for your normal
terminal emulator.
'';
license = licenses.bsd3;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,37 @@
{ lib
, stdenv
, fetchFromGitHub
}:
stdenv.mkDerivation rec {
pname = "prio";
version = "0.pre+date=2018-09-13";
src = fetchFromGitHub {
owner = "letoram";
repo = pname;
rev = "c3f97491339d15f063d6937d5f89bcfaea774dd1";
hash = "sha256-Idv/duEYmDk/rO+TI8n+FY3VFDtUEh8C292jh12BJuM=";
};
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p ${placeholder "out"}/share/arcan/appl/prio
cp -a ./* ${placeholder "out"}/share/arcan/appl/prio
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/letoram/prio";
description = "Plan9- Rio like Window Manager for Arcan";
license = licenses.bsd3;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,29 @@
{ arcan
, makeWrapper
, symlinkJoin
, appls ? [ ]
, name ? "arcan-wrapped"
}:
symlinkJoin rec {
inherit name;
paths = appls ++ [ arcan ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
for prog in ${placeholder "out"}/bin/*; do
wrapProgram $prog \
--prefix PATH ":" "${placeholder "out"}/bin" \
--set ARCAN_APPLBASEPATH "${placeholder "out"}/share/arcan/appl/" \
--set ARCAN_BINPATH "${placeholder "out"}/bin/arcan_frameserver" \
--set ARCAN_LIBPATH "${placeholder "out"}/lib/" \
--set ARCAN_RESOURCEPATH "${placeholder "out"}/share/arcan/resources/" \
--set ARCAN_SCRIPTPATH "${placeholder "out"}/share/arcan/scripts/"
done
'';
}
# TODO: set ARCAN_STATEBASEPATH to $HOME/.arcan/resources/savestates/ - possibly
# via a suitable script
# TODO: set ARCAN_FONTPATH to a set of default-but-configurable fontset

View file

@ -0,0 +1,119 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, arcan
, audit
, dbus
, libepoxy
, fontutil
, libGL
, libX11
, libXau
, libXdmcp
, libXfont2
, libdrm
, libgcrypt
, libmd
, libselinux
, libtirpc
, libxcb
, libxkbfile
, libxshmfence
, mesa
, meson
, nettle
, ninja
, openssl
, pixman
, pkg-config
, systemd
, xcbutil
, xcbutilwm
, xkbcomp
, xkeyboard_config
, xorgproto
, xtrans
}:
stdenv.mkDerivation rec {
pname = "xarcan";
version = "0.6.0+date=2021-08-26";
src = fetchFromGitHub {
owner = "letoram";
repo = pname;
rev = "e40f0176e495ffdad6e7405c58378df6532eb70d";
hash = "sha256-T+1oL7P5MTDkeSfW6OXc1OgfZ8E6e/4YRonf1eXcfIA=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
arcan
audit
dbus
libepoxy
fontutil
libGL
libX11
libXau
libXdmcp
libXfont2
libdrm
libgcrypt
libmd
libselinux
libtirpc
libxcb
libxkbfile
libxshmfence
mesa
nettle
openssl
pixman
systemd
xcbutil
xcbutilwm
xkbcomp
xkeyboard_config
xorgproto
xtrans
];
configureFlags = [
"--disable-int10-module"
"--disable-static"
"--disable-xnest"
"--disable-xorg"
"--disable-xvfb"
"--disable-xwayland"
"--enable-glamor"
"--enable-glx"
"--enable-ipv6"
"--enable-kdrive"
"--enable-record"
"--enable-xarcan"
"--enable-xcsecurity"
"--with-xkb-bin-directory=${xkbcomp}/bin"
"--with-xkb-output=/tmp"
"--with-xkb-path=${xkeyboard_config}/share/X11/xkb"
];
meta = with lib; {
homepage = "https://github.com/letoram/letoram";
description = "Patched Xserver that bridges connections to Arcan";
longDescription = ''
xarcan is a patched X server with a KDrive backend that uses the
arcan-shmif to map Xlib/Xcb/X clients to a running arcan instance. It
allows running an X session as a window under Arcan.
'';
license = licenses.mit;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
};
}