From 224e516ccb02ca1ed914fdbf695fe448737326a6 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Wed, 24 Mar 2021 19:24:54 -0300 Subject: [PATCH] oh-my-fish: init at 7+unstable=2021-03-03 --- pkgs/shells/fish/oh-my-fish/default.nix | 60 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 62 insertions(+) create mode 100644 pkgs/shells/fish/oh-my-fish/default.nix diff --git a/pkgs/shells/fish/oh-my-fish/default.nix b/pkgs/shells/fish/oh-my-fish/default.nix new file mode 100644 index 00000000000..e0dca9419eb --- /dev/null +++ b/pkgs/shells/fish/oh-my-fish/default.nix @@ -0,0 +1,60 @@ +{ lib +, stdenv +, fetchFromGitHub +, fish +, runtimeShell +, writeShellScript +}: + +stdenv.mkDerivation rec { + pname = "oh-my-fish"; + version = "7+unstable=2021-03-03"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = "0b1396ad7962073fa25615bf03c43b53eddc2d56"; + hash = "sha256-lwMo4+PcYR9kYJPWK+ALiMfBdxFSgB2vjtSn8QrmmEA="; + }; + + buildInputs = [ + fish + ]; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -pv $out/bin $out/share/${pname} + cp -vr * $out/share/${pname} + + cat << EOF > $out/bin/omf-install + #!${runtimeShell} + + ${fish}/bin/fish \\ + $out/share/${pname}/bin/install \\ + --noninteractive \\ + --offline=$out/share/${pname} + + EOF + chmod +x $out/bin/omf-install + + runHook PostInstall + ''; + + meta = with lib; { + homepage = "https://github.com/oh-my-fish/oh-my-fish"; + description = "The Fish Shell Framework"; + longDescription = '' + Oh My Fish provides core infrastructure to allow you to install packages + which extend or modify the look of your shell. It's fast, extensible and + easy to use. + ''; + license = licenses.mit; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = fish.meta.platforms; + }; +} +# TODO: customize the omf-install script diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5af6ed97f14..c9400596f35 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10544,6 +10544,8 @@ with pkgs; fish = callPackage ../shells/fish { }; + oh-my-fish = callPackage ../shells/fish/oh-my-fish { }; + wrapFish = callPackage ../shells/fish/wrapper.nix { }; fishPlugins = recurseIntoAttrs (callPackage ../shells/fish/plugins { });