about summary refs log tree commit diff
path: root/pkgs/tools/misc
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2022-05-12 18:02:25 +0000
committerGitHub <noreply@github.com>2022-05-12 18:02:25 +0000
commit6b23d26afc8d5b6f6490730afaf978c522a8a06d (patch)
tree1388415a0815459b4d3910a2d6713b86c9a161a3 /pkgs/tools/misc
parentfda107c3ec810310be6e2152c4bd8251a8d9d578 (diff)
parent5eb5ae426107a2f1ad2f7c95d91d813b5a51656e (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r--pkgs/tools/misc/bat/default.nix6
-rw-r--r--pkgs/tools/misc/dotter/default.nix4
-rw-r--r--pkgs/tools/misc/esptool/default.nix37
-rw-r--r--pkgs/tools/misc/nb/default.nix67
4 files changed, 104 insertions, 10 deletions
diff --git a/pkgs/tools/misc/bat/default.nix b/pkgs/tools/misc/bat/default.nix
index 558bd4bad3f63..e886616b70795 100644
--- a/pkgs/tools/misc/bat/default.nix
+++ b/pkgs/tools/misc/bat/default.nix
@@ -12,15 +12,15 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "bat";
-  version = "0.20.0";
+  version = "0.21.0";
 
   src = fetchFromGitHub {
     owner = "sharkdp";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-U+EHOZntZsHfvLapLpbiIKXSm8Qc1BRqCTR/AFe6yfQ=";
+    sha256 = "sha256-eCk0oOHGZNqgqz+JJfIhjWdLgBTpBig+mggi1c3EUDk=";
   };
-  cargoSha256 = "sha256-eSBcrKjgCz8mApLJnpNyWVC8pQVUX8dPiYJDIK470U8=";
+  cargoSha256 = "sha256-kYZxtiK9hnHBOMvRoHZK5kyXO9cg/gHBYuaITqKUpbE=";
 
   nativeBuildInputs = [ pkg-config installShellFiles makeWrapper ];
 
diff --git a/pkgs/tools/misc/dotter/default.nix b/pkgs/tools/misc/dotter/default.nix
index 5ca26be420ea7..67401b4d85b8e 100644
--- a/pkgs/tools/misc/dotter/default.nix
+++ b/pkgs/tools/misc/dotter/default.nix
@@ -1,4 +1,4 @@
-{ lib, fetchFromGitHub, rustPlatform, which }:
+{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, which }:
 
 rustPlatform.buildRustPackage rec {
   pname = "dotter";
@@ -13,6 +13,8 @@ rustPlatform.buildRustPackage rec {
 
   cargoHash = "sha256-JpMEC2HjAQLQiXHSE6L0HBDc0vLhd465wDK2+35aBXA=";
 
+  buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
+
   checkInputs = [ which ];
 
   meta = with lib; {
diff --git a/pkgs/tools/misc/esptool/default.nix b/pkgs/tools/misc/esptool/default.nix
index e1ec37063deaf..b4439363d4ada 100644
--- a/pkgs/tools/misc/esptool/default.nix
+++ b/pkgs/tools/misc/esptool/default.nix
@@ -2,19 +2,27 @@
 
 python3.pkgs.buildPythonApplication rec {
   pname = "esptool";
-  version = "3.3";
+  version = "3.3.1";
 
   src = fetchFromGitHub {
     owner = "espressif";
     repo = "esptool";
     rev = "v${version}";
-    sha256 = "sha256-CmGie+M3AboOk8X+LkRhIxTRQZgDlklouzmz8kiIZuI=";
+    hash = "sha256-9WmiLji7Zoad5WIzgkpvkI9t96sfdkCtFh6zqVxF7qo=";
   };
 
-  checkInputs = with python3.pkgs;
-    [ flake8 flake8-future-import flake8-import-order openssl ];
-  propagatedBuildInputs = with python3.pkgs;
-    [ pyserial pyaes ecdsa reedsolo bitstring cryptography ];
+  postPatch = ''
+    substituteInPlace test/test_imagegen.py \
+      --replace "sys.executable, ESPTOOL_PY" "ESPTOOL_PY"
+  '';
+
+  propagatedBuildInputs = with python3.pkgs; [
+    bitstring
+    cryptography
+    ecdsa
+    pyserial
+    reedsolo
+  ];
 
   # wrapPythonPrograms will overwrite esptool.py with a bash script,
   # but espefuse.py tries to import it. Since we don't add any binary paths,
@@ -28,6 +36,23 @@ python3.pkgs.buildPythonApplication rec {
     done
   '';
 
+  checkInputs = with python3.pkgs; [
+    pyelftools
+  ];
+
+  # tests mentioned in `.github/workflows/test_esptool.yml`
+  checkPhase = ''
+    runHook preCheck
+
+    export ESPTOOL_PY=$out/bin/esptool.py
+    ${python3.interpreter} test/test_imagegen.py
+    ${python3.interpreter} test/test_espsecure.py
+    ${python3.interpreter} test/test_merge_bin.py
+    ${python3.interpreter} test/test_modules.py
+
+    runHook postCheck
+  '';
+
   meta = with lib; {
     description = "ESP8266 and ESP32 serial bootloader utility";
     homepage = "https://github.com/espressif/esptool";
diff --git a/pkgs/tools/misc/nb/default.nix b/pkgs/tools/misc/nb/default.nix
new file mode 100644
index 0000000000000..422e315fc9a64
--- /dev/null
+++ b/pkgs/tools/misc/nb/default.nix
@@ -0,0 +1,67 @@
+{ stdenv, lib, fetchFromGitHub, installShellFiles }:
+
+stdenv.mkDerivation rec {
+  pname = "nb";
+  version = "6.10.1";
+
+  src = fetchFromGitHub {
+    owner = "xwmx";
+    repo = "nb";
+    rev = version;
+    sha256 = "00c0k12yc2vqx0am1mhcjbn7fh3dab2zixslyh1smzcww275rk59";
+  };
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/bin/
+    mv nb $out/bin/
+    runHook postInstall
+  '';
+
+  postInstall = ''
+    installShellCompletion etc/nb-completion.{bash,zsh}
+  '';
+
+  meta = with lib; {
+    description = "A command line note-taking, bookmarking, archiving, and knowledge base application";
+    longDescription = ''
+      `nb` creates notes in text-based formats like Markdown, Emacs Org mode,
+      and LaTeX, can work with files in any format, can import and export notes
+      to many document formats, and can create private, password-protected
+      encrypted notes and bookmarks. With `nb`, you can write notes using Vim,
+      Emacs, VS Code, Sublime Text, and any other text editor you like. `nb`
+      works in any standard Linux / Unix environment, including macOS and
+      Windows via WSL. Optional dependencies can be installed to enhance
+      functionality, but `nb` works great without them.
+
+      `nb` is also a powerful text-based CLI bookmarking system. Page
+      information is automatically downloaded, compiled, and saved into normal
+      Markdown documents made for humans, so bookmarks are easy to edit just
+      like any other note.
+
+      `nb` uses Git in the background to automatically record changes and sync
+      notebooks with remote repositories. `nb` can also be configured to sync
+      notebooks using a general purpose syncing utility like Dropbox so notes
+      can be edited in other apps on any device.
+
+      `nb` is designed to be portable, future-focused, and vendor independent,
+      providing a full-featured and intuitive experience within a highly
+      composable user-centric text interface. The entire program is a single
+      well-tested shell script that can be installed, copied, or curled almost
+      anywhere and just work, using progressive enhancement for various
+      experience improvements in more capable environments. `nb` works great
+      whether you have one notebook with just a few notes or dozens of
+      notebooks containing thousands of notes, bookmarks, and other items. `nb`
+      makes it easy to incorporate other tools, writing apps, and workflows.
+      `nb` can be used a little, a lot, once in a while, or for just a subset
+      of features. `nb` is flexible.
+    '';
+    homepage = "https://xwmx.github.io/nb/";
+    license = licenses.agpl3Plus;
+    maintainers = [ maintainers.toonn ];
+    platforms = platforms.all;
+  };
+}