yarn: fix jovian-stubs
This commit is contained in:
@@ -183,35 +183,15 @@
|
|||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
jovian-stubs = prev.stdenv.mkDerivation {
|
# Only replace holo-update (and its steamos-update alias) with our
|
||||||
name = "jovian-stubs";
|
# binary-cache pull script. All other stubs (pkexec, sudo,
|
||||||
dontUnpack = true;
|
# holo-reboot, holo-select-branch, …) come from upstream unchanged.
|
||||||
installPhase = ''
|
jovian-stubs = prev.jovian-stubs.overrideAttrs (old: {
|
||||||
mkdir -p $out/bin
|
buildCommand = (old.buildCommand or "") + ''
|
||||||
ln -s ${steamos-update-script} $out/bin/holo-update
|
install -D -m 755 ${steamos-update-script} $out/bin/holo-update
|
||||||
|
install -D -m 755 ${steamos-update-script} $out/bin/steamos-update
|
||||||
# pkexec: pass through to real pkexec
|
|
||||||
cat > $out/bin/pkexec << 'STUB'
|
|
||||||
#!/bin/sh
|
|
||||||
exec /run/wrappers/bin/pkexec "$@"
|
|
||||||
STUB
|
|
||||||
|
|
||||||
# sudo: strip flags and run the command directly (no escalation).
|
|
||||||
# privileged ops are delegated to root systemd services via systemctl.
|
|
||||||
cat > $out/bin/sudo << 'STUB'
|
|
||||||
#!/bin/sh
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case "$1" in
|
|
||||||
-*) shift ;;
|
|
||||||
*) break ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
exec "$@"
|
|
||||||
STUB
|
|
||||||
|
|
||||||
find $out/bin -type f -exec chmod 755 {} +
|
|
||||||
'';
|
'';
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user