From 1707de36c295673364541bf5514ae01308270f9e Mon Sep 17 00:00:00 2001 From: clerie Date: Wed, 31 Jul 2024 11:55:03 +0200 Subject: [PATCH 1/2] pkgs/git-diff-word: Add git shortcut to diff by character --- flake.nix | 1 + pkgs/git-diff-word/default.nix | 9 +++++++++ pkgs/git-diff-word/git-diff-word.sh | 5 +++++ pkgs/overlay.nix | 1 + 4 files changed, 16 insertions(+) create mode 100644 pkgs/git-diff-word/default.nix create mode 100755 pkgs/git-diff-word/git-diff-word.sh diff --git a/flake.nix b/flake.nix index d15cd4d..6264dd4 100644 --- a/flake.nix +++ b/flake.nix @@ -123,6 +123,7 @@ clerie-sops-edit chromium-incognito git-checkout-github-pr + git-diff-word iot-data nix-remove-result-links nixfiles-auto-install diff --git a/pkgs/git-diff-word/default.nix b/pkgs/git-diff-word/default.nix new file mode 100644 index 0000000..b80d25d --- /dev/null +++ b/pkgs/git-diff-word/default.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: + +pkgs.writeShellApplication { + name = "git-diff-word"; + text = builtins.readFile ./git-diff-word.sh; + runtimeInputs = with pkgs; [ + git + ]; +} diff --git a/pkgs/git-diff-word/git-diff-word.sh b/pkgs/git-diff-word/git-diff-word.sh new file mode 100755 index 0000000..3cbb914 --- /dev/null +++ b/pkgs/git-diff-word/git-diff-word.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -euo pipefail + +git diff --word-diff=color --word-diff-regex="." "$@" diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix index 1ccd9c7..9f24963 100644 --- a/pkgs/overlay.nix +++ b/pkgs/overlay.nix @@ -8,6 +8,7 @@ final: prev: { clerie-update-nixfiles = final.callPackage ./clerie-update-nixfiles/clerie-update-nixfiles.nix {}; chromium-incognito = final.callPackage ./chromium-incognito {}; git-checkout-github-pr = final.callPackage ./git-checkout-github-pr {}; + git-diff-word = final.callPackage ./git-diff-word {}; iot-data = final.python3.pkgs.callPackage ./iot-data {}; nix-remove-result-links = final.callPackage ./nix-remove-result-links {}; nixfiles-auto-install = final.callPackage ./nixfiles/nixfiles-auto-install.nix {}; From 9c17854d0a146ecc684e227b7d0dcc525956c044 Mon Sep 17 00:00:00 2001 From: Flake Update Bot Date: Thu, 1 Aug 2024 03:03:03 +0200 Subject: [PATCH 2/2] Update nixpkgs 2024-08-01-01-03 --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 48818fe..a107901 100644 --- a/flake.lock +++ b/flake.lock @@ -288,11 +288,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1720957393, - "narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=", + "lastModified": 1722185531, + "narHash": "sha256-veKR07psFoJjINLC8RK4DiLniGGMgF3QMlS4tb74S6k=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "693bc46d169f5af9c992095736e82c3488bf7dbb", + "rev": "52ec9ac3b12395ad677e8b62106f0b98c1f8569d", "type": "github" }, "original": {