best practices
This commit is contained in:
parent
14081528c8
commit
51b04164c5
1 changed files with 4 additions and 20 deletions
|
|
@ -8,7 +8,7 @@
|
||||||
}:
|
}:
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "fish";
|
pname = "fish";
|
||||||
version = "4.1-2025-03-16-rust";
|
version = "4.1-2025-03-16-rust-${builtins.substring 0 7 "642ec399ca17bbde973dc20461335396fe922e4c"}";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/fish-shell/fish-shell.git";
|
url = "https://github.com/fish-shell/fish-shell.git";
|
||||||
|
|
@ -25,12 +25,8 @@ rustPlatform.buildRustPackage rec {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ncurses gettext];
|
buildInputs = [ ncurses gettext ];
|
||||||
nativeBuildInputs = with python3Packages; [
|
nativeBuildInputs = with python3Packages; [ sphinx sphinx_rtd_theme ];
|
||||||
sphinx
|
|
||||||
sphinx_rtd_theme
|
|
||||||
gettext
|
|
||||||
];
|
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
export FISH_BUILD_VERSION="${version}"
|
export FISH_BUILD_VERSION="${version}"
|
||||||
|
|
@ -38,23 +34,11 @@ rustPlatform.buildRustPackage rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
export HOME=$(mktemp -d)
|
|
||||||
mkdir -p $HOME/.local/share/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
|
mkdir -p $out/share/fish/tools
|
||||||
cp $src/share/tools/create_manpage_completions.py $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/
|
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/create_manpage_completions.py
|
||||||
chmod +x $out/share/fish/tools/deroff.py
|
chmod +x $out/share/fish/tools/deroff.py
|
||||||
|
|
||||||
rm -rf $HOME
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
@ -65,7 +49,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
mainProgram = "fish";
|
mainProgram = "fish";
|
||||||
maintainer = "Cobray";
|
maintainers = [ "Cobray" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
passthru.shellPath = "/bin/fish";
|
passthru.shellPath = "/bin/fish";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue