os/overlays/blesh.nix
teutat3s ead398b835
bash: use latest ble.sh version
Use fzf for completion again

Fix starship with newest ble.sh version, eval a second time after ble.sh
2023-07-04 01:42:49 +02:00

33 lines
789 B
Nix

final: prev: {
blesh = prev.blesh.overrideAttrs (oldAttrs: rec {
inherit (prev.sources.blesh-nvfetcher) version src;
dontBuild = false;
buildInputs = [prev.git];
patchPhase = ''
substituteInPlace GNUmakefile \
--replace "git submodule update --init --recursive" ""
'';
nativeCheckInputs = oldAttrs.nativeCheckInputs ++ [prev.busybox];
installPhase = ''
runHook preInstall
mkdir -p "$out/share/blesh/lib"
cat <<EOF >"$out/share/blesh/lib/_package.sh"
_ble_base_package_type=nix
function ble/base/package:nix/update {
echo "Ble.sh is installed by Nix. You can update it there." >&2
return 1
}
EOF
make install INSDIR=$out/share/blesh
runHook postInstall
'';
});
}