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,128 @@
{ lib
, copyDesktopItems
, electron_18
, esbuild
, fetchFromGitHub
, libdeltachat
, makeDesktopItem
, makeWrapper
, nodePackages
, noto-fonts-emoji
, pkg-config
, roboto
, rustPlatform
, sqlcipher
, stdenv
, CoreServices
}:
let
libdeltachat' = libdeltachat.overrideAttrs (old: rec {
version = "1.86.0";
src = fetchFromGitHub {
owner = "deltachat";
repo = "deltachat-core-rust";
rev = version;
hash = "sha256-VLS93Ffeit2rVmXxYkXcnf8eDA3DC2/wKYZTh56QCk0=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${old.pname}-${version}";
hash = "sha256-4rpoDQ3o0WdWg/TmazTI+J0hL/MxwHcNMXWMq7GE7Tk=";
};
});
electronExec = if stdenv.isDarwin then
"${electron_18}/Applications/Electron.app/Contents/MacOS/Electron"
else
"${electron_18}/bin/electron";
esbuild' = esbuild.overrideAttrs (old: rec {
version = "0.12.29";
src = fetchFromGitHub {
owner = "evanw";
repo = "esbuild";
rev = "v${version}";
hash = "sha256-oU++9E3StUoyrMVRMZz8/1ntgPI62M1NoNz9sH/N5Bg=";
};
});
in nodePackages.deltachat-desktop.override rec {
pname = "deltachat-desktop";
version = "1.30.1";
src = fetchFromGitHub {
owner = "deltachat";
repo = "deltachat-desktop";
rev = "v${version}";
hash = "sha256-gZjZbXiqhFVfThZOsvL/nKkf6MX+E3KB5ldEAIuzBYA=";
};
nativeBuildInputs = [
makeWrapper
pkg-config
] ++ lib.optionals stdenv.isLinux [
copyDesktopItems
];
buildInputs = [
libdeltachat'
] ++ lib.optionals stdenv.isDarwin [
CoreServices
];
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
ESBUILD_BINARY_PATH = "${esbuild'}/bin/esbuild";
USE_SYSTEM_LIBDELTACHAT = "true";
VERSION_INFO_GIT_REF = src.rev;
preRebuild = ''
substituteInPlace package.json \
--replace "node ./bin/check-nodejs-version.js" true
'';
postInstall = ''
rm -r node_modules/deltachat-node/node/prebuilds
npm run build4production
npm prune --production
install -D $out/lib/node_modules/deltachat-desktop/build/icon.png \
$out/share/icons/hicolor/scalable/apps/deltachat.png
awk '!/^#/ && NF' build/packageignore_list \
| xargs -I {} sh -c "rm -rf {}" || true
ln -sf ${noto-fonts-emoji}/share/fonts/noto/NotoColorEmoji.ttf \
$out/lib/node_modules/deltachat-desktop/html-dist/fonts/noto/emoji
for font in $out/lib/node_modules/deltachat-desktop/html-dist/fonts/Roboto-*.ttf; do
ln -sf ${roboto}/share/fonts/truetype/$(basename $font) \
$out/lib/node_modules/deltachat-desktop/html-dist/fonts
done
makeWrapper ${electronExec} $out/bin/deltachat \
--set LD_PRELOAD ${sqlcipher}/lib/libsqlcipher${stdenv.hostPlatform.extensions.sharedLibrary} \
--add-flags $out/lib/node_modules/deltachat-desktop
'';
desktopItems = lib.singleton (makeDesktopItem {
name = "deltachat";
exec = "deltachat %u";
icon = "deltachat";
desktopName = "Delta Chat";
genericName = "Delta Chat";
comment = meta.description;
categories = [ "Network" "InstantMessaging" "Chat" ];
startupWMClass = "DeltaChat";
mimeTypes = [ "x-scheme-handler/openpgp4fpr" "x-scheme-handler/mailto" ];
});
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Email-based instant messaging for Desktop";
homepage = "https://github.com/deltachat/deltachat-desktop";
changelog = "https://github.com/deltachat/deltachat-desktop/blob/${src.rev}/CHANGELOG.md";
license = licenses.gpl3Plus;
mainProgram = "deltachat";
maintainers = with maintainers; [ dotlambda ];
};
}

View file

@ -0,0 +1,39 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fe7abe08..acdbe0d6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,6 @@ find_program(CARGO cargo)
add_custom_command(
OUTPUT
- "target/release/libdeltachat.a"
"target/release/libdeltachat.${DYNAMIC_EXT}"
"target/release/pkgconfig/deltachat.pc"
COMMAND
@@ -38,13 +37,11 @@ add_custom_target(
lib_deltachat
ALL
DEPENDS
- "target/release/libdeltachat.a"
"target/release/libdeltachat.${DYNAMIC_EXT}"
"target/release/pkgconfig/deltachat.pc"
)
include(GNUInstallDirs)
install(FILES "deltachat-ffi/deltachat.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
-install(FILES "target/release/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES "target/release/libdeltachat.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES "target/release/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
diff --git a/deltachat-ffi/Cargo.toml b/deltachat-ffi/Cargo.toml
index a34a27ba..cf354abb 100644
--- a/deltachat-ffi/Cargo.toml
+++ b/deltachat-ffi/Cargo.toml
@@ -12,7 +12,7 @@ categories = ["cryptography", "std", "email"]
[lib]
name = "deltachat"
-crate-type = ["cdylib", "staticlib"]
+crate-type = ["cdylib"]
[dependencies]
deltachat = { path = "../", default-features = false }

View file

@ -0,0 +1,56 @@
{
"name": "deltachat-desktop",
"version": "1.30.1",
"dependencies": {
"@blueprintjs/core": "^4.1.2",
"@deltachat/message_parser_wasm": "^0.4.0",
"@deltachat/react-qr-reader": "^4.0.0",
"@mapbox/geojson-extent": "^1.0.0",
"application-config": "^1.0.1",
"classnames": "^2.3.1",
"debounce": "^1.2.0",
"deltachat-node": "1.86.0",
"emoji-js-clean": "^4.0.0",
"emoji-mart": "^3.0.1",
"emoji-regex": "^9.2.2",
"error-stack-parser": "^2.0.7",
"filesize": "^8.0.6",
"immutable": "^4.0.0",
"mapbox-gl": "^1.12.0",
"mime-types": "^2.1.31",
"moment": "^2.29.2",
"path-browserify": "^1.0.1",
"rc": "^1.2.8",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-string-replace": "^1.0.0",
"react-virtualized-auto-sizer": "^1.0.5",
"react-window": "^1.8.6",
"react-window-infinite-loader": "^1.0.7",
"react-zoom-pan-pinch": "^2.1.3",
"source-map-support": "^0.5.19",
"stackframe": "^1.2.1",
"url-parse": "^1.5.9",
"use-debounce": "^3.3.0",
"@babel/core": "^7.7.7",
"@babel/preset-env": "^7.7.7",
"@babel/preset-react": "^7.7.4",
"@types/debounce": "^1.2.0",
"@types/emoji-mart": "^3.0.9",
"@types/mapbox-gl": "^0.54.5",
"@types/mime-types": "^2.1.0",
"@types/node": "^14.14.20",
"@types/rc": "^1.1.0",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
"@types/react-window": "^1.8.4",
"@types/react-window-infinite-loader": "^1.0.4",
"@types/url-parse": "^1.4.3",
"electron": "^18.0.3",
"esbuild": "^0.12.29",
"glob-watcher": "^5.0.5",
"sass": "^1.26.5",
"typescript": "^4.4.4",
"xml-js": "^1.6.8"
}
}

View file

@ -0,0 +1,45 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p coreutils curl gnused jq moreutils nix-prefetch
set -euo pipefail
cd "$(dirname "$0")"
owner=deltachat
repo=deltachat-desktop
nixpkgs=../../../../..
rev=$(
curl -s "https://api.github.com/repos/$owner/$repo/releases" |
jq 'map(select(.prerelease | not)) | .[0].tag_name' --raw-output
)
ver=$(echo "$rev" | sed 's/^v//')
old_ver=$(tac default.nix | sed -n 's/.*\bversion = "\(.*\)".*/\1/p' | head -1)
if [ "$ver" = "$old_ver" ]; then
echo "Up to date: $ver"
exit
fi
echo "$old_ver -> $ver"
hash=$(nix-prefetch -f "$nixpkgs" deltachat-desktop --rev "$rev")
tac default.nix \
| sed -e "0,/version = \".*\"/s//version = \"$ver\"/" \
-e "0,/hash = \".*\"/s//hash = \"${hash//\//\\/}\"/" \
| tac \
| sponge default.nix
src=$(nix-build "$nixpkgs" -A deltachat-desktop.src --no-out-link)
jq '{ name, version, dependencies: (.dependencies + (.devDependencies | del(.["@types/chai","@types/mocha","@types/node-fetch","@typescript-eslint/eslint-plugin","@typescript-eslint/parser","chai","electron-builder","electron-devtools-installer","electron-notarize","eslint","eslint-config-prettier","eslint-plugin-react-hooks","hallmark","mocha","node-fetch","prettier","testcafe","testcafe-browser-provider-electron","testcafe-react-selectors","ts-node","walk"]))) }' \
"$src/package.json" > package.json.new
if cmp --quiet package.json{.new,}; then
echo "package.json not changed, skip updating nodePackages"
rm package.json.new
else
echo "package.json changed, updating nodePackages"
mv package.json{.new,}
pushd ../../../../development/node-packages
./generate.sh
popd
fi