Revert "molly-guard: 0.7.2 -> 0.8.5"

This commit is contained in:
emaryn 2025-05-16 13:37:17 +08:00 committed by GitHub
parent 7f4561cd3f
commit 0cba587728
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,26 +7,22 @@
systemd, systemd,
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation rec {
pname = "molly-guard"; pname = "molly-guard";
version = "0.8.5"; version = "0.7.2";
src = fetchurl { src = fetchurl {
url = "https://launchpad.net/ubuntu/+archive/primary/+files/molly-guard_${finalAttrs.version}_all.deb"; url = "https://launchpad.net/ubuntu/+archive/primary/+files/molly-guard_${version}_all.deb";
hash = "sha256-9CQNU+5OPmCPTN3rotyJPLcvI8eo5WJQqx0OaI7Wox4="; sha256 = "1k6b1hn8lc4rj9n036imsl7s9lqj6ny3acdhnbnamsdkkndmxrw7";
}; };
nativeBuildInputs = [ dpkg ]; nativeBuildInputs = [ dpkg ];
installPhase = '' installPhase = ''
runHook preInstall sed -i "s|/lib/molly-guard|${systemd}/sbin|g" lib/molly-guard/molly-guard
sed -i "s|run-parts|${busybox}/bin/run-parts|g" lib/molly-guard/molly-guard
sed -i "s|/lib/molly-guard|${systemd}/sbin|g" usr/lib/molly-guard/molly-guard sed -i "s|/etc/molly-guard/|$out/etc/molly-guard/|g" lib/molly-guard/molly-guard
sed -i "s|run-parts|${busybox}/bin/run-parts|g" usr/lib/molly-guard/molly-guard cp -r ./ $out/
sed -i "s|/etc/molly-guard/|$out/etc/molly-guard/|g" usr/lib/molly-guard/molly-guard
cp -r usr $out
runHook postInstall
''; '';
postFixup = '' postFixup = ''
@ -35,12 +31,12 @@ stdenv.mkDerivation (finalAttrs: {
done; done;
''; '';
meta = { meta = with lib; {
description = "Attempts to prevent you from accidentally shutting down or rebooting machines"; description = "Attempts to prevent you from accidentally shutting down or rebooting machines";
homepage = "https://salsa.debian.org/debian/molly-guard"; homepage = "https://salsa.debian.org/debian/molly-guard";
license = lib.licenses.artistic2; license = licenses.artistic2;
platforms = lib.platforms.linux; platforms = platforms.linux;
maintainers = with lib.maintainers; [ DerTim1 ]; maintainers = with maintainers; [ DerTim1 ];
priority = -10; priority = -10;
}; };
}) }