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,89 @@
{ lib
, symlinkJoin
, melpaBuild
, fetchFromGitHub
, rustPlatform
, writeText
, clang
, llvmPackages
, runtimeShell
, writeScript
, python3
, nix-prefetch-github
, nix
}:
let
srcMeta = lib.importJSON ./src.json;
inherit (srcMeta) version;
src = fetchFromGitHub srcMeta.src;
tsc = melpaBuild {
inherit src;
inherit version;
pname = "tsc";
commit = version;
sourceRoot = "source/core";
recipe = writeText "recipe" ''
(tsc
:repo "emacs-tree-sitter/elisp-tree-sitter"
:fetcher github)
'';
};
tsc-dyn = rustPlatform.buildRustPackage {
inherit version;
inherit src;
pname = "tsc-dyn";
nativeBuildInputs = [ clang ];
sourceRoot = "source/core";
configurePhase = ''
export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"
'';
postInstall = ''
LIB=($out/lib/libtsc_dyn.*)
TSC_PATH=$out/share/emacs/site-lisp/elpa/tsc-${version}
install -d $TSC_PATH
install -m444 $out/lib/libtsc_dyn.* $TSC_PATH/''${LIB/*libtsc_/tsc-}
echo -n $version > $TSC_PATH/DYN-VERSION
rm -r $out/lib
'';
inherit (srcMeta) cargoSha256;
};
in symlinkJoin {
name = "tsc-${version}";
paths = [ tsc tsc-dyn ];
passthru = {
updateScript = let
pythonEnv = python3.withPackages(ps: [ ps.requests ]);
in writeScript "tsc-update" ''
#!${runtimeShell}
set -euo pipefail
export PATH=${lib.makeBinPath [
nix-prefetch-github
nix
pythonEnv
]}:$PATH
exec python3 ${builtins.toString ./update.py} ${builtins.toString ./.}
'';
};
meta = {
description = "The core APIs of the Emacs binding for tree-sitter.";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pimeys ];
};
}