2021-08-10 14:31:46 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fish
|
|
|
|
, runtimeShell
|
2024-01-02 11:29:13 +00:00
|
|
|
, substituteAll
|
2021-08-10 14:31:46 +00:00
|
|
|
}:
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-08-10 14:31:46 +00:00
|
|
|
pname = "oh-my-fish";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "unstable-2022-03-27";
|
2021-08-10 14:31:46 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-01-02 11:29:13 +00:00
|
|
|
owner = "oh-my-fish";
|
|
|
|
repo = "oh-my-fish";
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "d428b723c8c18fef3b2a00b8b8b731177f483ad8";
|
|
|
|
hash = "sha256-msItKEPe7uSUpDAfCfdYZjt5NyfM3KtOrLUTO9NGqlg=";
|
2021-08-10 14:31:46 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
patches = [
|
|
|
|
./001-writable-omf-path.diff
|
|
|
|
];
|
|
|
|
|
2021-08-10 14:31:46 +00:00
|
|
|
buildInputs = [
|
|
|
|
fish
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2021-08-10 14:31:46 +00:00
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
mkdir -pv $out/bin $out/share/oh-my-fish
|
|
|
|
cp -vr * $out/share/oh-my-fish
|
2021-08-10 14:31:46 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
cp -v ${substituteAll {
|
|
|
|
name = "omf-install";
|
|
|
|
src = ./omf-install;
|
2024-10-23 06:41:50 +00:00
|
|
|
omf = placeholder "out";
|
2024-01-02 11:29:13 +00:00
|
|
|
inherit fish runtimeShell;
|
|
|
|
}} $out/bin/omf-install
|
2021-08-10 14:31:46 +00:00
|
|
|
|
|
|
|
chmod +x $out/bin/omf-install
|
2024-01-02 11:29:13 +00:00
|
|
|
cat $out/bin/omf-install
|
2021-08-10 14:31:46 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
runHook postInstall
|
2021-08-10 14:31:46 +00:00
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
meta = {
|
2021-08-10 14:31:46 +00:00
|
|
|
homepage = "https://github.com/oh-my-fish/oh-my-fish";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Fish Shell Framework";
|
2021-08-10 14:31:46 +00:00
|
|
|
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.
|
|
|
|
'';
|
2024-01-02 11:29:13 +00:00
|
|
|
license = lib.licenses.mit;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2022-04-27 09:35:20 +00:00
|
|
|
mainProgram = "omf-install";
|
2024-01-02 11:29:13 +00:00
|
|
|
inherit (fish.meta) platforms;
|
2021-08-10 14:31:46 +00:00
|
|
|
};
|
2022-07-14 12:49:19 +00:00
|
|
|
})
|
2021-08-10 14:31:46 +00:00
|
|
|
# TODO: customize the omf-install script
|