From af1b6c8b3576a9225854363ab95d303a65cc4b17 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Sun, 4 Feb 2024 08:33:33 -0700 Subject: [PATCH] add rep and ren (without rep) --- flake.lock | 34 ++++++++++++++++++++++++++++++ flake.nix | 11 ++++++++++ modules/common/shell/utilities.nix | 2 ++ overlays/ren-rep.nix | 17 +++++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 overlays/ren-rep.nix diff --git a/flake.lock b/flake.lock index 298bc3b..1e34f3f 100644 --- a/flake.lock +++ b/flake.lock @@ -484,6 +484,38 @@ "url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz" } }, + "ren": { + "flake": false, + "locked": { + "lastModified": 1704996573, + "narHash": "sha256-zVIt6Xp+Mvym6gySvHIZJt1QgzKVP/wbTGTubWk6kzI=", + "owner": "robenkleene", + "repo": "ren-find", + "rev": "50c40172e354caffee48932266edd7c7a76a20fd", + "type": "github" + }, + "original": { + "owner": "robenkleene", + "repo": "ren-find", + "type": "github" + } + }, + "rep": { + "flake": false, + "locked": { + "lastModified": 1705833236, + "narHash": "sha256-hm+v+b97z1HnY/7QHZxc0GygCq9W0mJauyjnz48ddaM=", + "owner": "robenkleene", + "repo": "rep-grep", + "rev": "365acc5d599934e94dc066eb85b7ddd684ba508b", + "type": "github" + }, + "original": { + "owner": "robenkleene", + "repo": "rep-grep", + "type": "github" + } + }, "root": { "inputs": { "Comment-nvim-src": "Comment-nvim-src", @@ -511,6 +543,8 @@ "nvim-tree-lua-src": "nvim-tree-lua-src", "nvim-treesitter-src": "nvim-treesitter-src", "proton-ge": "proton-ge", + "ren": "ren", + "rep": "rep", "telescope-nvim-src": "telescope-nvim-src", "telescope-project-nvim-src": "telescope-project-nvim-src", "toggleterm-nvim-src": "toggleterm-nvim-src", diff --git a/flake.nix b/flake.nix index 026d3ec..3bcc8b1 100644 --- a/flake.nix +++ b/flake.nix @@ -161,6 +161,16 @@ flake = false; }; + # Ren and rep - CLI find and replace + rep = { + url = "github:robenkleene/rep-grep"; + flake = false; + }; + ren = { + url = "github:robenkleene/ren-find"; + flake = false; + }; + # GE version of Proton for game compatibility # Alternatively, could consider using https://github.com/fufexan/nix-gaming proton-ge = { @@ -249,6 +259,7 @@ (import ./overlays/proton-ge.nix inputs) (import ./overlays/gh-collaborators.nix) (import ./overlays/bypass-paywalls-clean.nix inputs) + (import ./overlays/ren-rep.nix inputs) ]; # System types to support. diff --git a/modules/common/shell/utilities.nix b/modules/common/shell/utilities.nix index bdedbd7..ac0148f 100644 --- a/modules/common/shell/utilities.nix +++ b/modules/common/shell/utilities.nix @@ -31,6 +31,8 @@ in { lf # File viewer qrencode # Generate qr codes rsync # Copy folders + ren # Rename files + # rep # Replace text in files ripgrep # grep sd # sed tealdeer # Cheatsheets diff --git a/overlays/ren-rep.nix b/overlays/ren-rep.nix new file mode 100644 index 0000000..c8c0d29 --- /dev/null +++ b/overlays/ren-rep.nix @@ -0,0 +1,17 @@ +inputs: _final: prev: { + + ren = prev.rustPlatform.buildRustPackage { + pname = "ren-find"; + version = "0.0.7"; + src = inputs.ren; + cargoHash = "sha256-3bI3j2xvNHp4kyLEq/DZvRJBF2rn6pE4n8oXh67edDI="; + }; + + # rep = prev.rustPlatform.buildRustPackage { + # pname = "rep-grep"; + # version = "0.0.7"; + # src = inputs.rep; + # cargoHash = "sha256-GEr3VvQ0VTKHUbW/GFEgwLpQWP2ZhS/4KYjDvfFLgxo="; + # }; + +}