dev/base: add `interactively` to run commands with a preview
Alan Pearce alan@alanpearce.eu
Mon, 01 May 2023 14:07:32 +0200
3 files changed, 37 insertions(+), 0 deletions(-)
M user/overlays/extra-packages.nix → user/overlays/extra-packages.nix
@@ -1,5 +1,6 @@ self: super: { lumen = super.callPackage ../packages/lumen { }; + interactively = super.callPackage ../packages/interactively { }; emacsPackagesFor = emacs: ( (super.emacsPackagesFor emacs).overrideScope' ( eself: esuper:
A user/packages/interactively/default.nix
@@ -0,0 +1,35 @@+{ stdenv +, fetchFromGitHub +, coreutils +, fzf +}: + +stdenv.mkDerivation { + pname = "interactively"; + version = "unstable-2023-04-19"; + + src = fetchFromGitHub { + owner = "bigH"; + repo = "interactively"; + rev = "c09f14b4e572053eb8e1e8dfb0b74ee66a66c07f"; + hash = "sha256-HFCTX9lHiLymSyJMiFYSKG+7TCSb9YpmtC+I7Jf+zUg="; + }; + + fixupPhase = '' + patchShebangs bin/interactively + substituteInPlace bin/interactively \ + --replace fzf ${fzf}/bin/fzf \ + --replace tac ${coreutils}/bin/tac + ''; + + installPhase = '' + mkdir -p $out/bin + cp bin/interactively $out/bin/ + chmod +x $out/bin/interactively + ''; + + meta = { + description = ""; + homepage = "https://github.com/bigH/interactively"; + }; +}
M user/settings/development/base.nix → user/settings/development/base.nix
@@ -18,6 +18,7 @@ nodePackages.dockerfile-language-server-nodejs nodePackages.vscode-json-languageserver nodePackages.yaml-language-server multimarkdown + interactively mosh