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,46 @@
# Deprecated aliases - for backward compatibility
lib: overriden:
with overriden;
let
# Removing recurseForDerivation prevents derivations of aliased attribute
# set to appear while listing all the packages available.
removeRecurseForDerivations = alias: with lib;
if alias.recurseForDerivations or false then
removeAttrs alias ["recurseForDerivations"]
else alias;
# Disabling distribution prevents top-level aliases for non-recursed package
# sets from building on Hydra.
removeDistribute = alias: with lib;
if isDerivation alias then
dontDistribute alias
else alias;
# Make sure that we are not shadowing something from
# all-packages.nix.
checkInPkgs = n: alias: if builtins.hasAttr n overriden
then throw "Alias ${n} is still in kakounePlugins"
else alias;
mapAliases = aliases:
lib.mapAttrs (n: alias: removeDistribute
(removeRecurseForDerivations
(checkInPkgs n alias)))
aliases;
deprecations = lib.mapAttrs (old: info:
throw "${old} was renamed to ${info.new} on ${info.date}. Please update to ${info.new}."
) (lib.importJSON ./deprecated.json);
in
mapAliases ({
kak-auto-pairs = auto-pairs-kak; # backwards compat, added 2021-01-04
kak-buffers = kakoune-buffers; # backwards compat, added 2021-01-04
kak-fzf = fzf-kak; # backwards compat, added 2021-01-04
kak-powerline = powerline-kak; # backwards compat, added 2021-01-04
kak-prelude = prelude-kak; # backwards compat, added 2021-01-04
kak-vertical-selection = kakoune-vertical-selection; # backwards compat, added 2021-01-04
} // deprecations)

View file

@ -0,0 +1,33 @@
{ lib, stdenv, rtpPath ? "share/kak/autoload/plugins" }:
rec {
buildKakounePlugin = attrs@{
name ? "${attrs.pname}-${attrs.version}",
namePrefix ? "kakplugin-",
src,
unpackPhase ? "",
configurePhase ? "",
buildPhase ? "",
preInstall ? "",
postInstall ? "",
path ? lib.getName name,
...
}:
stdenv.mkDerivation ((builtins.removeAttrs attrs [ "namePrefix" "path" ]) // {
name = namePrefix + name;
installPhase = ''
runHook preInstall
target=$out/${rtpPath}/${path}
mkdir -p $out/${rtpPath}
cp -r . $target
runHook postInstall
'';
});
buildKakounePluginFrom2Nix = attrs: buildKakounePlugin ({
dontBuild = true;
dontConfigure = true;
} // attrs);
}

View file

@ -0,0 +1,25 @@
{ callPackage, config, kakouneUtils, lib }:
let
inherit (kakouneUtils.override {}) buildKakounePluginFrom2Nix;
plugins = callPackage ./generated.nix {
inherit buildKakounePluginFrom2Nix overrides;
};
# TL;DR
# * Add your plugin to ./kakoune-plugin-names
# * run ./update.py
#
# If additional modifications to the build process are required,
# add to ./overrides.nix.
overrides = callPackage ./overrides.nix {
inherit buildKakounePluginFrom2Nix;
};
aliases = lib.optionalAttrs config.allowAliases (import ./aliases.nix lib plugins);
in
plugins // aliases

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,235 @@
# This file has been generated by ./pkgs/applications/editors/kakoune/plugins/update.py. Do not edit!
{ lib, buildKakounePluginFrom2Nix, fetchFromGitHub, overrides ? (self: super: {}) }:
let
packages = ( self:
{
active-window-kak = buildKakounePluginFrom2Nix {
pname = "active-window-kak";
version = "2020-05-13";
src = fetchFromGitHub {
owner = "greenfork";
repo = "active-window.kak";
rev = "988db69cfbb88bd741d089bb43b0be551693e7c1";
sha256 = "1fv1cp9q212gamf9z2papl5xcl2w31fpcmbgdzbxcxdl1pvfsqp8";
};
meta.homepage = "https://github.com/greenfork/active-window.kak/";
};
auto-pairs-kak = buildKakounePluginFrom2Nix {
pname = "auto-pairs-kak";
version = "2021-03-28";
src = fetchFromGitHub {
owner = "alexherbo2";
repo = "auto-pairs.kak";
rev = "526779a26a5cf5f48e7c4f5c5fecca274968a737";
sha256 = "0gkhvwxyh8pdfydrj7zkfidk0drrbhvdi1fq3pkzllna3vz8q181";
};
meta.homepage = "https://github.com/alexherbo2/auto-pairs.kak/";
};
connect-kak = buildKakounePluginFrom2Nix {
pname = "connect-kak";
version = "2021-02-24";
src = fetchFromGitHub {
owner = "kakounedotcom";
repo = "connect.kak";
rev = "a536605a208149eed58986bda54f3dda215dfe61";
sha256 = "1svw64zk28sn271vjyzvq21zaln13vnx59rxnxah6adq8n5nkr4a";
};
meta.homepage = "https://github.com/kakounedotcom/connect.kak/";
};
fzf-kak = buildKakounePluginFrom2Nix {
pname = "fzf-kak";
version = "2021-04-03";
src = fetchFromGitHub {
owner = "andreyorst";
repo = "fzf.kak";
rev = "1b3a3beebbe7134e671fde2ef2f4242b34ae2c60";
sha256 = "0rsd65zcizbq3isy8576gqw7mcml5ixw84padaz6ndwfif5fv701";
};
meta.homepage = "https://github.com/andreyorst/fzf.kak/";
};
kakboard = buildKakounePluginFrom2Nix {
pname = "kakboard";
version = "2020-05-09";
src = fetchFromGitHub {
owner = "lePerdu";
repo = "kakboard";
rev = "2f13f5cd99591b76ad5cba230815b80138825120";
sha256 = "1kvnbsv20y09rlnyar87qr0h26i16qsq801krswvxcwhid7ijlvd";
};
meta.homepage = "https://github.com/lePerdu/kakboard/";
};
kakoune-buffer-switcher = buildKakounePluginFrom2Nix {
pname = "kakoune-buffer-switcher";
version = "2020-12-27";
src = fetchFromGitHub {
owner = "occivink";
repo = "kakoune-buffer-switcher";
rev = "6a27c45db87a23070c34fab36d2f8d812cd002a6";
sha256 = "1rmwy317908v8p54806m721bpzm8sgygb9abri34537ka6r05y5j";
};
meta.homepage = "https://github.com/occivink/kakoune-buffer-switcher/";
};
kakoune-buffers = buildKakounePluginFrom2Nix {
pname = "kakoune-buffers";
version = "2021-04-02";
src = fetchFromGitHub {
owner = "Delapouite";
repo = "kakoune-buffers";
rev = "7832ea7a4528363482f5684f16cbcebcbec0adfd";
sha256 = "196d36jww6asf5zr03l1rwg49kkv16s2d4zyryb2m3zvy7prf2bb";
};
meta.homepage = "https://github.com/Delapouite/kakoune-buffers/";
};
kakoune-easymotion = buildKakounePluginFrom2Nix {
pname = "kakoune-easymotion";
version = "2020-03-09";
src = fetchFromGitHub {
owner = "danr";
repo = "kakoune-easymotion";
rev = "0ca75450023a149efc70e8e383e459b571355c70";
sha256 = "15czvl0qj2k767pysr6xk2v31mkhvcbmv76xs2a8yrslchms70b5";
};
meta.homepage = "https://github.com/danr/kakoune-easymotion/";
};
kakoune-extra-filetypes = buildKakounePluginFrom2Nix {
pname = "kakoune-extra-filetypes";
version = "2021-01-15";
src = fetchFromGitHub {
owner = "kakoune-editor";
repo = "kakoune-extra-filetypes";
rev = "c6f8aaccd8c9cd6b487964c8943416e21fbe7c18";
sha256 = "1vkff8xbycfgxv8x09cvc79qcg5fdzn2x77mbmifmkq236khrwrg";
};
meta.homepage = "https://github.com/kakoune-editor/kakoune-extra-filetypes/";
};
kakoune-rainbow = buildKakounePluginFrom2Nix {
pname = "kakoune-rainbow";
version = "2020-09-01";
src = fetchFromGitHub {
owner = "listentolist";
repo = "kakoune-rainbow";
rev = "d09103e8d268cf4621215bf162a0244c9482be3c";
sha256 = "1i3id7xw0j4z1a14mscr68ckpgvcwsjpl86lr864wy7w7qcmblx6";
};
meta.homepage = "https://github.com/listentolist/kakoune-rainbow/";
};
kakoune-registers = buildKakounePluginFrom2Nix {
pname = "kakoune-registers";
version = "2020-06-19";
src = fetchFromGitHub {
owner = "Delapouite";
repo = "kakoune-registers";
rev = "9531947baecd83c1d4c3bea0adf10f4462f1e120";
sha256 = "08v9ndghh7wvr8rsrqm05gksk9ai5vnwvw9gwqasbppb48cv4a8c";
};
meta.homepage = "https://github.com/Delapouite/kakoune-registers/";
};
kakoune-vertical-selection = buildKakounePluginFrom2Nix {
pname = "kakoune-vertical-selection";
version = "2019-04-11";
src = fetchFromGitHub {
owner = "occivink";
repo = "kakoune-vertical-selection";
rev = "c420f8b867ce47375fac303886e31623669a42b7";
sha256 = "13jdyd2j45wvgqvxdzw9zww14ly93bqjb6700zzxj7mkbiff6wsb";
};
meta.homepage = "https://github.com/occivink/kakoune-vertical-selection/";
};
openscad-kak = buildKakounePluginFrom2Nix {
pname = "openscad-kak";
version = "2020-12-10";
src = fetchFromGitHub {
owner = "mayjs";
repo = "openscad.kak";
rev = "ba51bbdcd96ccf94bb9239bef1481b6f37125849";
sha256 = "15dybd6dnnwla6mj8sw83nwd62para1syxzifznl6rz6kp8vqjjj";
};
meta.homepage = "https://github.com/mayjs/openscad.kak/";
};
pandoc-kak = buildKakounePluginFrom2Nix {
pname = "pandoc-kak";
version = "2020-11-30";
src = fetchFromGitHub {
owner = "basbebe";
repo = "pandoc.kak";
rev = "63979f7e08b86d80436bbe2d9dba173a56057b97";
sha256 = "16pmmnpyxf8r7gpj8g1lwa960nscjmcl52n1a7s6xcqkp9856wxs";
};
meta.homepage = "https://github.com/basbebe/pandoc.kak/";
};
powerline-kak = buildKakounePluginFrom2Nix {
pname = "powerline-kak";
version = "2021-04-06";
src = fetchFromGitHub {
owner = "andreyorst";
repo = "powerline.kak";
rev = "6fa5ad383f2884f201d6e3ef07a4687c606df525";
sha256 = "1s7ggjby0bymq48njzhdvkkarmzl44803xv0dlnzrj7q9c3xv27a";
};
meta.homepage = "https://github.com/andreyorst/powerline.kak/";
};
prelude-kak = buildKakounePluginFrom2Nix {
pname = "prelude-kak";
version = "2021-02-24";
src = fetchFromGitHub {
owner = "kakounedotcom";
repo = "prelude.kak";
rev = "5dbdc020c546032885c1fdb463e366cc89fc15ad";
sha256 = "1pncr8azqvl2z9yvzhc68p1s9fld8cvak8yz88zgrp5ypx2cxl8c";
};
meta.homepage = "https://github.com/kakounedotcom/prelude.kak/";
};
replace-mode-kak = buildKakounePluginFrom2Nix {
pname = "replace-mode-kak";
version = "2020-10-07";
src = fetchFromGitHub {
owner = "alexherbo2";
repo = "replace-mode.kak";
rev = "5f4c73cdbaf5aeb964ee35ad4b9081b233af90c0";
sha256 = "1cmylx99bm7jwfb4hclb69sdc4n8f29ssyy2byjiw53ni9rnc8q0";
};
meta.homepage = "https://github.com/alexherbo2/replace-mode.kak/";
};
sleuth-kak = buildKakounePluginFrom2Nix {
pname = "sleuth-kak";
version = "2020-11-06";
src = fetchFromGitHub {
owner = "alexherbo2";
repo = "sleuth.kak";
rev = "911db8bd208ad0d289b8fa15a2ac665ff39bd6bd";
sha256 = "0g41c0038fpmihqva71xl4vfbmvsp13i47gp6fnmaikajpynzc51";
};
meta.homepage = "https://github.com/alexherbo2/sleuth.kak/";
};
tabs-kak = buildKakounePluginFrom2Nix {
pname = "tabs-kak";
version = "2021-04-14";
src = fetchFromGitHub {
owner = "enricozb";
repo = "tabs.kak";
rev = "048f83455ea7c671ab06e9b9578ac25e5de1d6fb";
sha256 = "0xswpsdf1bj54inl6vf2lzbjkxfc6g0fyv5kd6y9ahlh5irij8z0";
};
meta.homepage = "https://github.com/enricozb/tabs.kak/";
};
});
in lib.fix' (lib.extends overrides packages)

View file

@ -0,0 +1,20 @@
repo,branch,alias
alexherbo2/auto-pairs.kak,,
alexherbo2/replace-mode.kak,,
alexherbo2/sleuth.kak,,
andreyorst/fzf.kak,,
andreyorst/powerline.kak,,
basbebe/pandoc.kak,,
danr/kakoune-easymotion,,
Delapouite/kakoune-buffers,,
Delapouite/kakoune-registers,,
enricozb/tabs.kak@main,,
greenfork/active-window.kak,,
kakoune-editor/kakoune-extra-filetypes,,
kakounedotcom/connect.kak,,
kakounedotcom/prelude.kak,,
lePerdu/kakboard,,
listentolist/kakoune-rainbow,,
mayjs/openscad.kak,,
occivink/kakoune-buffer-switcher,,
occivink/kakoune-vertical-selection,,

View file

@ -0,0 +1,4 @@
{ lib, stdenv }:
{
inherit (import ./build-kakoune-plugin.nix { inherit lib stdenv; }) buildKakounePlugin buildKakounePluginFrom2Nix;
}

View file

@ -0,0 +1,161 @@
{ lib, stdenv, fetchFromGitHub, fetchFromGitLab, fetchgit
, buildKakounePluginFrom2Nix
, kak-lsp, parinfer-rust, rep
, fzf, git, guile, kakoune-unwrapped, lua5_3, plan9port
}:
self: super: {
inherit kak-lsp parinfer-rust rep;
case-kak = buildKakounePluginFrom2Nix {
pname = "case-kak";
version = "2020-04-06";
src = fetchFromGitLab {
owner = "FlyingWombat";
repo = "case.kak";
rev = "6f1511820aa3abfa118e0f856118adc8113e2185";
sha256 = "002njrlwgakqgp74wivbppr9qyn57dn4n5bxkr6k6nglk9qndwdp";
};
meta.homepage = "https://gitlab.com/FlyingWombat/case.kak";
};
fzf-kak = super.fzf-kak.overrideAttrs(oldAttrs: rec {
preFixup = ''
if [[ -x "${fzf}/bin/fzf" ]]; then
fzfImpl='${fzf}/bin/fzf'
else
fzfImpl='${fzf}/bin/sk'
fi
substituteInPlace $out/share/kak/autoload/plugins/fzf-kak/rc/fzf.kak \
--replace \'fzf\' \'"$fzfImpl"\'
'';
});
kak-ansi = stdenv.mkDerivation rec {
pname = "kak-ansi";
version = "0.2.4";
src = fetchFromGitHub {
owner = "eraserhd";
repo = "kak-ansi";
rev = "v${version}";
sha256 = "kFjTYFy0KF5WWEHU4hHFAnD/03/d3ptjqMMbTSaGImE=";
};
installPhase = ''
mkdir -p $out/bin $out/share/kak/autoload/plugins/
cp kak-ansi-filter $out/bin/
# Hard-code path of filter and don't try to build when Kakoune boots
sed '
/^declare-option.* ansi_filter /i\
declare-option -hidden str ansi_filter %{'"$out"'/bin/kak-ansi-filter}
/^declare-option.* ansi_filter /,/^}/d
' rc/ansi.kak >$out/share/kak/autoload/plugins/ansi.kak
'';
meta = with lib; {
description = "Kakoune support for rendering ANSI code";
homepage = "https://github.com/eraserhd/kak-ansi";
license = licenses.unlicense;
maintainers = with maintainers; [ eraserhd ];
platforms = platforms.all;
};
};
kak-plumb = stdenv.mkDerivation rec {
pname = "kak-plumb";
version = "0.1.1";
src = fetchFromGitHub {
owner = "eraserhd";
repo = "kak-plumb";
rev = "v${version}";
sha256 = "1rz6pr786slnf1a78m3sj09axr4d2lb5rg7sfa4mfg1zcjh06ps6";
};
installPhase = ''
mkdir -p $out/bin $out/share/kak/autoload/plugins/
substitute rc/plumb.kak $out/share/kak/autoload/plugins/plumb.kak \
--replace '9 plumb' '${plan9port}/bin/9 plumb'
substitute edit-client $out/bin/edit-client \
--replace '9 9p' '${plan9port}/bin/9 9p' \
--replace 'kak -p' '${kakoune-unwrapped}/bin/kak -p'
chmod +x $out/bin/edit-client
'';
meta = with lib; {
description = "Kakoune integration with the Plan 9 plumber";
homepage = "https://github.com/eraserhd/kak-plumb";
license = licenses.unlicense;
maintainers = with maintainers; [ eraserhd ];
platforms = platforms.all;
};
};
kakoune-rainbow = super.kakoune-rainbow.overrideAttrs(oldAttrs: rec {
preFixup = ''
mkdir -p $out/bin
mv $out/share/kak/autoload/plugins/kakoune-rainbow/bin/kak-rainbow.scm $out/bin
substituteInPlace $out/bin/kak-rainbow.scm \
--replace '/usr/bin/env -S guile' '${guile}/bin/guile'
substituteInPlace $out/share/kak/autoload/plugins/kakoune-rainbow/rainbow.kak \
--replace '%sh{dirname "$kak_source"}' "'$out'"
'';
});
kakoune-state-save = buildKakounePluginFrom2Nix {
pname = "kakoune-state-save";
version = "2020-02-09";
src = fetchFromGitLab {
owner = "Screwtapello";
repo = "kakoune-state-save";
rev = "ab7c0c765326a4a80af78857469ee8c80814c52a";
sha256 = "AAOCG0TY3G188NnkkwMCSbkkNe487F4gwiFWwG9Yo+A=";
};
meta = with lib; {
description = "Help Kakoune save and restore state between sessions";
homepage = "https://gitlab.com/Screwtapello/kakoune-state-save";
license = licenses.mit;
maintainers = with maintainers; [ Flakebi ];
platforms = platforms.all;
};
};
powerline-kak = super.powerline-kak.overrideAttrs(oldAttrs: rec {
preFixup = ''
substituteInPlace $out/share/kak/autoload/plugins/powerline-kak/rc/modules/git.kak \
--replace ' git ' ' ${git}/bin/git '
'';
});
quickscope-kak = buildKakounePluginFrom2Nix rec {
pname = "quickscope-kak";
version = "1.0.0";
src = fetchgit {
url = "https://git.sr.ht/~voroskoi/quickscope.kak";
rev = "v${version}";
sha256 = "0y1g3zpa2ql8l9rl5i2w84bka8a09kig9nq9zdchaff5pw660mcx";
};
buildInputs = [ lua5_3 ];
installPhase = ''
mkdir -p $out/share/kak/autoload/plugins/
cp quickscope.* $out/share/kak/autoload/plugins/
# substituteInPlace does not like the pipe
sed -e 's,[|] *lua,|${lua5_3}/bin/lua,' quickscope.kak >$out/share/kak/autoload/plugins/quickscope.kak
'';
meta = with lib; {
description = "Highlight f and t jump positions";
homepage = "https://sr.ht/~voroskoi/quickscope.kak/";
license = licenses.unlicense;
maintainers = with maintainers; [ eraserhd ];
platforms = platforms.all;
};
};
}

View file

@ -0,0 +1,15 @@
{ pkgs ? import ../../../../.. { } }:
with pkgs;
let
pyEnv = python3.withPackages (ps: [ ps.GitPython ]);
in
mkShell {
packages = [
bash
pyEnv
nix
nix-prefetch-scripts
];
}

View file

@ -0,0 +1,96 @@
#!/usr/bin/env nix-shell
#!nix-shell update-shell.nix -i python3
# format:
# $ nix run nixpkgs.python3Packages.black -c black update.py
# type-check:
# $ nix run nixpkgs.python3Packages.mypy -c mypy update.py
# linted:
# $ nix run nixpkgs.python3Packages.flake8 -c flake8 --ignore E501,E265,E402 update.py
import inspect
import os
import sys
from typing import List, Tuple
from pathlib import Path
# Import plugin update library from maintainers/scripts/pluginupdate.py
ROOT = Path(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))) # type: ignore
sys.path.insert(
0, os.path.join(ROOT.parent.parent.parent.parent.parent, "maintainers", "scripts")
)
import pluginupdate
GET_PLUGINS = f"""(with import <localpkgs> {{}};
let
inherit (kakouneUtils.override {{}}) buildKakounePluginFrom2Nix;
generated = callPackage {ROOT}/generated.nix {{
inherit buildKakounePluginFrom2Nix;
}};
hasChecksum = value: lib.isAttrs value && lib.hasAttrByPath ["src" "outputHash"] value;
getChecksum = name: value:
if hasChecksum value then {{
submodules = value.src.fetchSubmodules or false;
sha256 = value.src.outputHash;
rev = value.src.rev;
}} else null;
checksums = lib.mapAttrs getChecksum generated;
in lib.filterAttrs (n: v: v != null) checksums)"""
HEADER = "# This file has been generated by ./pkgs/applications/editors/kakoune/plugins/update.py. Do not edit!"
class KakouneEditor(pluginupdate.Editor):
def generate_nix(self, plugins: List[Tuple[str, str, pluginupdate.Plugin]], outfile: str):
sorted_plugins = sorted(plugins, key=lambda v: v[2].name.lower())
with open(outfile, "w+") as f:
f.write(HEADER)
f.write(
"""
{ lib, buildKakounePluginFrom2Nix, fetchFromGitHub, overrides ? (self: super: {}) }:
let
packages = ( self:
{"""
)
for owner, repo, plugin in sorted_plugins:
if plugin.has_submodules:
submodule_attr = "\n fetchSubmodules = true;"
else:
submodule_attr = ""
f.write(
f"""
{plugin.normalized_name} = buildKakounePluginFrom2Nix {{
pname = "{plugin.normalized_name}";
version = "{plugin.version}";
src = fetchFromGitHub {{
owner = "{owner}";
repo = "{repo}";
rev = "{plugin.commit}";
sha256 = "{plugin.sha256}";{submodule_attr}
}};
meta.homepage = "https://github.com/{owner}/{repo}/";
}};
"""
)
f.write(
"""
});
in lib.fix' (lib.extends overrides packages)
"""
)
print(f"updated {outfile}")
def main():
editor = KakouneEditor("kakoune", ROOT, GET_PLUGINS)
parser = editor.create_parser()
args = parser.parse_args()
pluginupdate.update_plugins(editor, args)
if __name__ == "__main__":
main()