diff options
Diffstat (limited to 'pkgs/misc')
-rw-r--r-- | pkgs/misc/arm-trusted-firmware/default.nix | 39 | ||||
-rw-r--r-- | pkgs/misc/emulators/mupen64plus/default.nix | 16 | ||||
-rw-r--r-- | pkgs/misc/logging/beats/7.x.nix | 2 | ||||
-rw-r--r-- | pkgs/misc/meson-tools/default.nix | 27 | ||||
-rw-r--r-- | pkgs/misc/uboot/default.nix | 59 | ||||
-rw-r--r-- | pkgs/misc/vim-plugins/generated.nix | 88 | ||||
-rw-r--r-- | pkgs/misc/vim-plugins/overrides.nix | 3 | ||||
-rw-r--r-- | pkgs/misc/vim-plugins/vim-plugin-names | 8 | ||||
-rw-r--r-- | pkgs/misc/vim-plugins/vim-terraform-fix-event.patch | 23 | ||||
-rw-r--r-- | pkgs/misc/vim-plugins/vim-utils.nix | 23 |
10 files changed, 228 insertions, 60 deletions
diff --git a/pkgs/misc/arm-trusted-firmware/default.nix b/pkgs/misc/arm-trusted-firmware/default.nix index 5ff131dad9d..27bef4cae44 100644 --- a/pkgs/misc/arm-trusted-firmware/default.nix +++ b/pkgs/misc/arm-trusted-firmware/default.nix @@ -1,16 +1,16 @@ -{ stdenv, fetchFromGitHub, pkgsCross, buildPackages }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, openssl, pkgsCross, buildPackages }: let buildArmTrustedFirmware = { filesToInstall , installDir ? "$out" - , platform + , platform ? null , extraMakeFlags ? [] , extraMeta ? {} , version ? "2.1" , ... } @ args: stdenv.mkDerivation ({ - name = "arm-trusted-firmware-${platform}-${version}"; + name = "arm-trusted-firmware${lib.optionalString (platform != null) "-${platform}"}-${version}"; inherit version; src = fetchFromGitHub { @@ -25,16 +25,18 @@ let # For Cortex-M0 firmware in RK3399 nativeBuildInputs = [ pkgsCross.arm-embedded.stdenv.cc ]; + buildInputs = [ openssl ]; + makeFlags = [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" - "PLAT=${platform}" - ] ++ extraMakeFlags; + ] ++ (lib.optional (platform != null) "PLAT=${platform}") + ++ extraMakeFlags; installPhase = '' runHook preInstall mkdir -p ${installDir} - cp ${stdenv.lib.concatStringsSep " " filesToInstall} ${installDir} + cp ${lib.concatStringsSep " " filesToInstall} ${installDir} runHook postInstall ''; @@ -45,7 +47,7 @@ let # Fatal error: can't create build/sun50iw1p1/release/bl31/sunxi_clocks.o: No such file or directory enableParallelBuilding = false; - meta = with stdenv.lib; { + meta = with lib; { homepage = https://github.com/ARM-software/arm-trusted-firmware; description = "A reference implementation of secure world software for ARMv8-A"; license = licenses.bsd3; @@ -56,6 +58,22 @@ let in { inherit buildArmTrustedFirmware; + armTrustedFirmwareTools = buildArmTrustedFirmware rec { + extraMakeFlags = [ + "HOSTCC=${stdenv.cc.targetPrefix}gcc" + "fiptool" "certtool" "sptool" + ]; + filesToInstall = [ + "tools/fiptool/fiptool" + "tools/cert_create/cert_create" + "tools/sptool/sptool" + ]; + postInstall = '' + mkdir -p "$out/bin" + find "$out" -type f -executable -exec mv -t "$out/bin" {} + + ''; + }; + armTrustedFirmwareAllwinner = buildArmTrustedFirmware rec { platform = "sun50i_a64"; extraMeta.platforms = ["aarch64-linux"]; @@ -85,4 +103,11 @@ in { extraMeta.platforms = ["aarch64-linux"]; filesToInstall = [ "build/${platform}/release/bl31/bl31.elf"]; }; + + armTrustedFirmwareS905 = buildArmTrustedFirmware rec { + extraMakeFlags = [ "bl31" ]; + platform = "gxbb"; + extraMeta.platforms = ["aarch64-linux"]; + filesToInstall = [ "build/${platform}/release/bl31.bin"]; + }; } diff --git a/pkgs/misc/emulators/mupen64plus/default.nix b/pkgs/misc/emulators/mupen64plus/default.nix index 460dd7ad5fb..ee3aab1834a 100644 --- a/pkgs/misc/emulators/mupen64plus/default.nix +++ b/pkgs/misc/emulators/mupen64plus/default.nix @@ -1,15 +1,15 @@ -{stdenv, fetchurl, boost, dash, freetype, libpng, pkgconfig, SDL, which, zlib }: +{stdenv, fetchurl, boost, dash, freetype, libpng, pkgconfig, SDL, which, zlib, nasm }: stdenv.mkDerivation rec { pname = "mupen64plus"; - version = "2.5"; + version = "2.5.9"; src = fetchurl { url = "https://github.com/mupen64plus/mupen64plus-core/releases/download/${version}/mupen64plus-bundle-src-${version}.tar.gz"; - sha256 = "0rmsvfn4zfvbhz6gf1xkb7hnwflv6sbklwjz2xk4dlpj4vcbjxcw"; + sha256 = "1a21n4gqdvag6krwcjm5bnyw5phrlxw6m0mk73jy53iq03f3s96m"; }; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig nasm ]; buildInputs = [ boost dash freetype libpng SDL which zlib ]; buildPhase = '' @@ -19,11 +19,11 @@ stdenv.mkDerivation rec { dash m64p_install.sh DESTDIR="$out" PREFIX="" ''; - meta = { + meta = with stdenv.lib; { description = "A Nintendo 64 Emulator"; - license = stdenv.lib.licenses.gpl2Plus; + license = licenses.gpl2Plus; homepage = http://www.mupen64plus.org/; - maintainers = [ stdenv.lib.maintainers.sander ]; - platforms = stdenv.lib.platforms.linux; + maintainers = [ maintainers.sander ]; + platforms = [ "x86_64-linux" ]; }; } diff --git a/pkgs/misc/logging/beats/7.x.nix b/pkgs/misc/logging/beats/7.x.nix index 7d0feef3868..adcbdddfc3a 100644 --- a/pkgs/misc/logging/beats/7.x.nix +++ b/pkgs/misc/logging/beats/7.x.nix @@ -8,7 +8,7 @@ let beat = package : extraArgs : buildGoPackage (rec { owner = "elastic"; repo = "beats"; rev = "v${version}"; - sha256 = "0715fgqw6mqms4zld8wyf6appvvpfb1hglcmcn852c66a8zwr2r2"; + sha256 = "192ygz3ppfah8d2b811x67jfqhcr5ivz7qh4vwrd729rjfr0bbgb"; }; goPackagePath = "github.com/elastic/beats"; diff --git a/pkgs/misc/meson-tools/default.nix b/pkgs/misc/meson-tools/default.nix new file mode 100644 index 00000000000..02b162c8809 --- /dev/null +++ b/pkgs/misc/meson-tools/default.nix @@ -0,0 +1,27 @@ +{ lib, stdenv, fetchFromGitHub, openssl }: + +stdenv.mkDerivation rec { + pname = "meson-tools"; + version = "0.1"; + + src = fetchFromGitHub { + owner = "afaerber"; + repo = pname; + rev = "v${version}"; + sha256 = "1bvshfa9pa012yzdwapi3nalpgcwmfq7d3n3w3mlr357a6kq64qk"; + }; + + buildInputs = [ openssl ]; + + installPhase = '' + mkdir -p "$out/bin" + mv amlbootsig unamlbootsig amlinfo "$out/bin" + ''; + + meta = with lib; { + homepage = "https://github.com/afaerber/meson-tools"; + description = "Tools for Amlogic Meson ARM platforms"; + license = licenses.gpl2; + maintainers = with maintainers; [ lopsided98 ]; + }; +} diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix index 06a5c7c441c..5bd20c0765b 100644 --- a/pkgs/misc/uboot/default.nix +++ b/pkgs/misc/uboot/default.nix @@ -1,6 +1,7 @@ { stdenv, lib, fetchurl, fetchpatch, fetchFromGitHub, bc, bison, dtc, flex -, openssl, swig, armTrustedFirmwareAllwinner, armTrustedFirmwareRK3328 -, armTrustedFirmwareRK3399 +, openssl, swig, meson-tools, armTrustedFirmwareAllwinner +, armTrustedFirmwareRK3328, armTrustedFirmwareRK3399 +, armTrustedFirmwareS905 , buildPackages }: @@ -94,7 +95,7 @@ let homepage = http://www.denx.de/wiki/U-Boot/; description = "Boot loader for embedded systems"; license = licenses.gpl2; - maintainers = with maintainers; [ dezgeg samueldr ]; + maintainers = with maintainers; [ dezgeg samueldr lopsided98 ]; } // extraMeta; } // removeAttrs args [ "extraMeta" ]); @@ -129,6 +130,12 @@ in { filesToInstall = ["u-boot-sunxi-with-spl.bin"]; }; + ubootBananaPim3 = buildUBoot { + defconfig = "Sinovoip_BPI_M3_defconfig"; + extraMeta.platforms = ["armv7l-linux"]; + filesToInstall = ["u-boot-sunxi-with-spl.bin"]; + }; + ubootBananaPim64 = buildUBoot { defconfig = "bananapi_m64_defconfig"; extraMeta.platforms = ["aarch64-linux"]; @@ -172,6 +179,52 @@ in { filesToInstall = ["u-boot.bin" "SPL"]; }; + # Flashing instructions: + # dd if=bl1.bin.hardkernel of=<device> conv=fsync bs=1 count=442 + # dd if=bl1.bin.hardkernel of=<device> conv=fsync bs=512 skip=1 seek=1 + # dd if=u-boot.gxbb of=<device> conv=fsync bs=512 seek=97 + ubootOdroidC2 = let + firmwareBlobs = fetchFromGitHub { + owner = "armbian"; + repo = "odroidc2-blobs"; + rev = "47c5aac4bcac6f067cebe76e41fb9924d45b429c"; + sha256 = "1ns0a130yxnxysia8c3q2fgyjp9k0nkr689dxk88qh2vnibgchnp"; + meta.license = lib.licenses.unfreeRedistributableFirmware; + }; + in buildUBoot { + defconfig = "odroid-c2_defconfig"; + extraMeta.platforms = ["aarch64-linux"]; + filesToInstall = ["u-boot.bin" "u-boot.gxbb" "${firmwareBlobs}/bl1.bin.hardkernel"]; + postBuild = '' + # BL301 image needs at least 64 bytes of padding after it to place + # signing headers (with amlbootsig) + truncate -s 64 bl301.padding.bin + cat '${firmwareBlobs}/gxb/bl301.bin' bl301.padding.bin > bl301.padded.bin + # The downstream fip_create tool adds a custom TOC entry with UUID + # AABBCCDD-ABCD-EFEF-ABCD-12345678ABCD for the BL301 image. It turns out + # that the firmware blob does not actually care about UUIDs, only the + # order the images appear in the file. Because fiptool does not know + # about the BL301 UUID, we would have to use the --blob option, which adds + # the image to the end of the file, causing the boot to fail. Instead, we + # take advantage of the fact that UUIDs are ignored and just put the + # images in the right order with the wrong UUIDs. In the command below, + # --tb-fw is really --scp-fw and --scp-fw is the BL301 image. + # + # See https://github.com/afaerber/meson-tools/issues/3 for more + # information. + '${buildPackages.armTrustedFirmwareTools}/bin/fiptool' create \ + --align 0x4000 \ + --tb-fw '${firmwareBlobs}/gxb/bl30.bin' \ + --scp-fw bl301.padded.bin \ + --soc-fw '${armTrustedFirmwareS905}/bl31.bin' \ + --nt-fw u-boot.bin \ + fip.bin + cat '${firmwareBlobs}/gxb/bl2.package' fip.bin > boot_new.bin + '${buildPackages.meson-tools}/bin/amlbootsig' boot_new.bin u-boot.img + dd if=u-boot.img of=u-boot.gxbb bs=512 skip=96 + ''; + }; + ubootOdroidXU3 = buildUBoot { defconfig = "odroid-xu3_defconfig"; extraMeta.platforms = ["armv7l-linux"]; diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 881cc2d62f3..425ac9a0994 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -808,6 +808,28 @@ let }; }; + defx-icons = buildVimPluginFrom2Nix { + pname = "defx-icons"; + version = "2019-11-03"; + src = fetchFromGitHub { + owner = "kristijanhusak"; + repo = "defx-icons"; + rev = "1412fd083eb54ffedb4f3ae32ddc7ce28613a144"; + sha256 = "1x0xpixbmxm15g5nmsslccdngm14sg86ymy6mywg9xfbnrh1vn0p"; + }; + }; + + defx-git = buildVimPluginFrom2Nix { + pname = "defx-git"; + version = "2019-12-25"; + src = fetchFromGitHub { + owner = "kristijanhusak"; + repo = "defx-git"; + rev = "6f064b7aa45491aa728f976f49012c6abe244f15"; + sha256 = "1909f4q4b5yc2g8x8spxs7q9iq94ls2id2xa9k9cf9h93x2jla5y"; + }; + }; + defx-nvim = buildVimPluginFrom2Nix { pname = "defx-nvim"; version = "2020-01-02"; @@ -1419,6 +1441,17 @@ let }; }; + increment-activator = buildVimPluginFrom2Nix { + pname = "increment-activator"; + version = "2019-05-09"; + src = fetchFromGitHub { + owner = "nishigori"; + repo = "increment-activator"; + rev = "f341baf93b172aee646c90ff2ce28de0f897561b"; + sha256 = "0hda6h3qz6ynpl996rk1rm6xnxgkaz108v28qg0w6wm7qzynbmnv"; + }; + }; + incsearch-easymotion-vim = buildVimPluginFrom2Nix { pname = "incsearch-easymotion-vim"; version = "2016-01-18"; @@ -2179,6 +2212,17 @@ let }; }; + pear-tree = buildVimPluginFrom2Nix { + pname = "pear-tree"; + version = "2019-12-08"; + src = fetchFromGitHub { + owner = "tmsvg"; + repo = "pear-tree"; + rev = "3bb209d9637d6bd7506040b2fcd158c9a7917db3"; + sha256 = "0n70rzw34lsnnprqna90ssqrka33qx3z0n2kj19ps8yp3j6lsxvk"; + }; + }; + peskcolor-vim = buildVimPluginFrom2Nix { pname = "peskcolor-vim"; version = "2016-06-11"; @@ -3434,6 +3478,17 @@ let }; }; + vim-cool = buildVimPluginFrom2Nix { + pname = "vim-cool"; + version = "2018-01-11"; + src = fetchFromGitHub { + owner = "romainl"; + repo = "vim-cool"; + rev = "06918c36b3396af0bec1e87e748a5dba55be87b9"; + sha256 = "099sbjdk944bnivqgqgbjplczfm3k84583ryrmpqf3lgrq6pl8wr"; + }; + }; + vim-cpp-enhanced-highlight = buildVimPluginFrom2Nix { pname = "vim-cpp-enhanced-highlight"; version = "2019-11-14"; @@ -3489,6 +3544,17 @@ let }; }; + vim-dadbod = buildVimPluginFrom2Nix { + pname = "vim-dadbod"; + version = "2020-01-02"; + src = fetchFromGitHub { + owner = "tpope"; + repo = "vim-dadbod"; + rev = "59cc0a16970b92afa1c99182c60e35e01cdaa409"; + sha256 = "0v3jhp33058cl7raqp59704m5ljsibpi9vs1hsiwwxf2pgdjii3f"; + }; + }; + vim-devicons = buildVimPluginFrom2Nix { pname = "vim-devicons"; version = "2019-11-10"; @@ -3643,6 +3709,17 @@ let }; }; + vim-endwise = buildVimPluginFrom2Nix { + pname = "vim-endwise"; + version = "2019-11-13"; + src = fetchFromGitHub { + owner = "tpope"; + repo = "vim-endwise"; + rev = "bf90d8be447de667f4532b934d1a70881be56dd8"; + sha256 = "1czx891via5783yk222mhki94wvq75hxxp1xk1d5m90vwqb3azfn"; + }; + }; + vim-eunuch = buildVimPluginFrom2Nix { pname = "vim-eunuch"; version = "2019-11-13"; @@ -5679,6 +5756,17 @@ let }; }; + vista-vim = buildVimPluginFrom2Nix { + pname = "vista-vim"; + version = "2020-01-06"; + src = fetchFromGitHub { + owner = "liuchengxu"; + repo = "vista.vim"; + rev = "dcf134c83a6a3f9618a97cafab5b7fb1f1df3f84"; + sha256 = "0w9q69a2k8a39b8zrd3sildisrdskbk6cgvbkmb3fqsr0zdzjxzv"; + }; + }; + vundle = buildVimPluginFrom2Nix { pname = "vundle"; version = "2019-08-17"; diff --git a/pkgs/misc/vim-plugins/overrides.nix b/pkgs/misc/vim-plugins/overrides.nix index 368ecbdfec6..6cde4d6695a 100644 --- a/pkgs/misc/vim-plugins/overrides.nix +++ b/pkgs/misc/vim-plugins/overrides.nix @@ -413,9 +413,6 @@ self: super: { dependencies = with super; [ vim-addon-mw-utils tlib_vim ]; }); - vim-terraform = super.vim-terraform.overrideAttrs(oa: { - patches = (oa.patches or []) ++ lib.singleton ./vim-terraform-fix-event.patch; - }); vim-wakatime = super.vim-wakatime.overrideAttrs(old: { buildInputs = [ python ]; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 93e8f50e3d5..3c097c63fde 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -193,6 +193,8 @@ KeitaNakamura/neodark.vim keith/swift.vim kien/rainbow_parentheses.vim konfekt/fastfold +kristijanhusak/defx-icons +kristijanhusak/defx-git kristijanhusak/vim-hybrid-material kshenoy/vim-signature lambdalisue/vim-gista @@ -207,6 +209,7 @@ lervag/vimtex lfilho/cosco.vim lifepillar/vim-mucomplete lilydjwg/colorizer +liuchengxu/vista.vim LnL7/vim-nix LucHermitte/lh-brackets LucHermitte/lh-vim-lib @@ -321,6 +324,7 @@ neovim/nvim-lsp neutaaaaan/iosvkem nfnty/vim-nftables nicoe/deoplete-khard +nishigori/increment-activator nixprime/cpsm NLKNguyen/papercolor-theme noc7c9/vim-iced-coffee-script @@ -363,6 +367,7 @@ rhysd/vim-grammarous rhysd/vim-operator-surround Rip-Rip/clang_complete rodjek/vim-puppet +romainl/vim-cool ron89/thesaurus_query.vim roxma/nvim-cm-racer roxma/nvim-completion-manager @@ -427,6 +432,7 @@ thinca/vim-visualstar thirtythreeforty/lessspace.vim thosakwe/vim-flutter tikhomirov/vim-glsl +tmsvg/pear-tree tmux-plugins/vim-tmux tmux-plugins/vim-tmux-focus-events tomasr/molokai @@ -438,7 +444,9 @@ tomtom/tcomment_vim tomtom/tlib_vim tpope/vim-abolish tpope/vim-commentary +tpope/vim-dadbod tpope/vim-dispatch +tpope/vim-endwise tpope/vim-eunuch tpope/vim-fireplace tpope/vim-flagship diff --git a/pkgs/misc/vim-plugins/vim-terraform-fix-event.patch b/pkgs/misc/vim-plugins/vim-terraform-fix-event.patch deleted file mode 100644 index b36c4992c13..00000000000 --- a/pkgs/misc/vim-plugins/vim-terraform-fix-event.patch +++ /dev/null @@ -1,23 +0,0 @@ -From cad4661952ad7983ece6d6486f0f68d437037015 Mon Sep 17 00:00:00 2001 -From: "Wael M. Nasreddine" <wael.nasreddine@gmail.com> -Date: Thu, 2 Jan 2020 13:31:13 -0800 -Subject: [PATCH] Put the autocmd filetypedetect in an augroup - ---- - ftdetect/terraform.vim | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/ftdetect/terraform.vim b/ftdetect/terraform.vim -index 5919422..24bc731 100644 ---- a/ftdetect/terraform.vim -+++ b/ftdetect/terraform.vim -@@ -1,5 +1,8 @@ - " By default, Vim associates .tf files with TinyFugue - tell it not to. --autocmd! filetypedetect BufRead,BufNewFile *.tf -+augroup filetypedetect -+ au BufRead,BufNewFile *.tf set filetype=terraform -+augroup END -+ - autocmd BufRead,BufNewFile *.tf set filetype=terraform - autocmd BufRead,BufNewFile *.tfvars set filetype=terraform - autocmd BufRead,BufNewFile *.tfstate set filetype=json diff --git a/pkgs/misc/vim-plugins/vim-utils.nix b/pkgs/misc/vim-plugins/vim-utils.nix index d1b1bc846eb..16c14b32218 100644 --- a/pkgs/misc/vim-plugins/vim-utils.nix +++ b/pkgs/misc/vim-plugins/vim-utils.nix @@ -188,8 +188,7 @@ let vam ? null, pathogen ? null, plug ? null, - customRC ? "", - beforePlugins ? "", + customRC ? "" }: let @@ -209,6 +208,8 @@ let '' let &rtp.=(empty(&rtp)?"":',')."${vimPlugins.pathogen.rtp}" execute pathogen#infect('${pluginsEnv}/{}') + + filetype indent plugin on | syn on ''); /* vim-plug is an extremely popular vim plugin manager. @@ -260,6 +261,8 @@ let in assert builtins.hasAttr "vim-addon-manager" knownPlugins; '' + filetype indent plugin on | syn on + let g:nix_plugin_locations = {} ${lib.concatMapStrings (plugin: '' let g:nix_plugin_locations['${plugin.pname}'] = "${plugin.rtp}" @@ -330,29 +333,19 @@ let set packpath-=~/.vim/after set packpath+=${packDir packages} set packpath+=~/.vim/after - ''); - - # somebody else could provide these implementations - vundleImpl = ""; - - neobundleImpl = ""; + filetype indent plugin on | syn on + ''); in writeText "vimrc" '' - " minimal setup, generated by NIX + " configuration generated by NIX set nocompatible - ${beforePlugins} - ${vamImpl} ${pathogenImpl} ${plugImpl} - ${vundleImpl} - ${neobundleImpl} ${nativeImpl} - filetype indent plugin on | syn on - ${customRC} ''; |