properly assigns the custom shell
This commit is contained in:
parent
5ebd696c23
commit
19b83baf88
6 changed files with 49 additions and 31 deletions
|
|
@ -1,13 +1,16 @@
|
|||
{ lib, rustPlatform, fetchgit, ncurses, sphinx, python3 }:
|
||||
{ lib, rustPlatform, fetchgit, ncurses, python3Packages, gettext }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "fish";
|
||||
version = "4.1-2025-03-14-rust";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/fish-shell/fish-shell.git";
|
||||
rev = "refs/heads/master";
|
||||
fetchSubmodules = true;
|
||||
sha256 = "18zpwa3yddic6wdwj7g51w6n4apwsixfvl179yddk2nwfpxhv4hq";
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = "${src}/Cargo.lock";
|
||||
outputHashes = {
|
||||
|
|
@ -15,26 +18,41 @@ rustPlatform.buildRustPackage rec {
|
|||
"pcre2-sys-0.2.9" = "0mhjw7fvrzxb3fd0c534a17qgy6svz0z8269d2fs6q8aw11610mr";
|
||||
};
|
||||
};
|
||||
buildInputs = [ ncurses ];
|
||||
nativeBuildInputs = [ sphinx python3 ];
|
||||
|
||||
buildInputs = [ ncurses gettext ];
|
||||
nativeBuildInputs = with python3Packages; [
|
||||
sphinx
|
||||
sphinx_rtd_theme
|
||||
gettext
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
export FISH_BUILD_VERSION="${version}"
|
||||
export FISH_BUILD_DOCS=1
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
export HOME=$(mktemp -d)
|
||||
mkdir -p $HOME/.local/share/fish/install
|
||||
$out/bin/fish --install
|
||||
|
||||
if [ ! -f $HOME/.config/fish/config.fish ]; then
|
||||
$out/bin/fish --install
|
||||
fi
|
||||
|
||||
mkdir -p $out/share/fish
|
||||
cp -r $HOME/.local/share/fish/install/* $out/share/fish/ 2>/dev/null || true
|
||||
|
||||
mkdir -p $out/share/fish/tools
|
||||
cp $src/share/tools/create_manpage_completions.py $out/share/fish/tools/
|
||||
cp $src/share/tools/deroff.py $out/share/fish/tools/
|
||||
chmod +x $out/share/fish/tools/create_manpage_completions.py
|
||||
chmod +x $out/share/fish/tools/deroff.py
|
||||
|
||||
rm -rf $HOME
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "The user-friendly command line shell (Rust version)";
|
||||
homepage = "https://fishshell.com/";
|
||||
|
|
@ -42,5 +60,6 @@ rustPlatform.buildRustPackage rec {
|
|||
platforms = platforms.unix;
|
||||
mainProgram = "fish";
|
||||
};
|
||||
|
||||
passthru.shellPath = "/bin/fish";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue