fix: improve ble.sh build
This commit is contained in:
parent
9b48362f41
commit
97a05c4456
|
@ -3,17 +3,33 @@ final: prev: {
|
|||
inherit (prev.sources.blesh-nvfetcher) version src;
|
||||
|
||||
dontBuild = false;
|
||||
buildInputs = [prev.git];
|
||||
buildInputs = [
|
||||
prev.gitMinimal
|
||||
];
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace GNUmakefile \
|
||||
--replace "git submodule update --init --recursive" ""
|
||||
'';
|
||||
nativeCheckInputs = oldAttrs.nativeCheckInputs ++ [prev.busybox];
|
||||
|
||||
installFlags = [
|
||||
"PREFIX=$(out)"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
source $stdenv/setup
|
||||
installPhase
|
||||
'';
|
||||
|
||||
mkdir -p "$out/share/blesh/lib"
|
||||
postInstall = ''
|
||||
mkdir -p "$out/bin"
|
||||
cat <<EOF >"$out/bin/blesh-share"
|
||||
#!${prev.runtimeShell}
|
||||
# Run this script to find the ble.sh shared folder
|
||||
# where all the shell scripts are living.
|
||||
echo "$out/share/blesh"
|
||||
EOF
|
||||
chmod +x "$out/bin/blesh-share"
|
||||
|
||||
cat <<EOF >"$out/share/blesh/lib/_package.sh"
|
||||
_ble_base_package_type=nix
|
||||
|
@ -23,10 +39,6 @@ final: prev: {
|
|||
return 1
|
||||
}
|
||||
EOF
|
||||
|
||||
make install INSDIR=$out/share/blesh
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue