2021-03-24 23:24:54 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fish
|
|
|
|
, runtimeShell
|
2023-11-23 20:38:50 +01:00
|
|
|
, substituteAll
|
2021-03-24 23:24:54 +01:00
|
|
|
}:
|
|
|
|
|
2022-07-07 03:46:29 +02:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-03-24 23:24:54 +01:00
|
|
|
pname = "oh-my-fish";
|
2022-07-07 03:46:29 +02:00
|
|
|
version = "unstable-2022-03-27";
|
2021-03-24 23:24:54 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-11-23 20:38:50 +01:00
|
|
|
owner = "oh-my-fish";
|
|
|
|
repo = "oh-my-fish";
|
2022-07-07 03:46:29 +02:00
|
|
|
rev = "d428b723c8c18fef3b2a00b8b8b731177f483ad8";
|
|
|
|
hash = "sha256-msItKEPe7uSUpDAfCfdYZjt5NyfM3KtOrLUTO9NGqlg=";
|
2021-03-24 23:24:54 +01:00
|
|
|
};
|
|
|
|
|
2023-11-23 20:56:46 +01:00
|
|
|
patches = [
|
|
|
|
./001-writable-omf-path.diff
|
|
|
|
];
|
|
|
|
|
2021-03-24 23:24:54 +01:00
|
|
|
buildInputs = [
|
|
|
|
fish
|
|
|
|
];
|
|
|
|
|
2023-11-23 20:38:50 +01:00
|
|
|
strictDeps = true;
|
|
|
|
|
2021-03-24 23:24:54 +01:00
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2023-11-23 20:38:50 +01:00
|
|
|
mkdir -pv $out/bin $out/share/oh-my-fish
|
|
|
|
cp -vr * $out/share/oh-my-fish
|
2021-03-24 23:24:54 +01:00
|
|
|
|
2023-11-23 20:38:50 +01:00
|
|
|
cp -v ${substituteAll {
|
|
|
|
name = "omf-install";
|
|
|
|
src = ./omf-install;
|
|
|
|
OMF = placeholder "out";
|
|
|
|
inherit fish runtimeShell;
|
|
|
|
}} $out/bin/omf-install
|
2021-03-24 23:24:54 +01:00
|
|
|
|
|
|
|
chmod +x $out/bin/omf-install
|
2023-11-23 20:38:50 +01:00
|
|
|
cat $out/bin/omf-install
|
2021-03-24 23:24:54 +01:00
|
|
|
|
2022-07-07 03:46:29 +02:00
|
|
|
runHook postInstall
|
2021-03-24 23:24:54 +01:00
|
|
|
'';
|
|
|
|
|
2023-11-23 20:38:50 +01:00
|
|
|
meta = {
|
2021-03-24 23:24:54 +01:00
|
|
|
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.
|
|
|
|
'';
|
2023-11-23 20:38:50 +01:00
|
|
|
license = lib.licenses.mit;
|
2023-11-23 20:56:46 +01:00
|
|
|
maintainers = with lib.maintainers; [ ];
|
2022-04-01 21:34:55 +02:00
|
|
|
mainProgram = "omf-install";
|
2023-11-23 20:38:50 +01:00
|
|
|
inherit (fish.meta) platforms;
|
2021-03-24 23:24:54 +01:00
|
|
|
};
|
2022-07-07 03:46:29 +02:00
|
|
|
})
|
2021-03-24 23:24:54 +01:00
|
|
|
# TODO: customize the omf-install script
|