From 4ac43fb1824fadaf22d620a407e819a84515d0cf Mon Sep 17 00:00:00 2001 From: Skyler Grey Date: Sun, 22 Jan 2023 21:00:40 +0000 Subject: [PATCH] Prevent the nix flake using sudo - Nix's build environment doesn't have sudo - The default install command here used sudo - This commit adds a custom nix build phase to prevent the use of sudo --- flake.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/flake.nix b/flake.nix index 1782390..1a4652e 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,18 @@ gawk pkg-config ] ++ (import ./deps.nix {inherit pkgs;}); + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + mkdir -p $out/share/man/man1 + + cp activate-linux $out/bin + cp activate-linux.1 $out/share/man/man1 + + runHook postInstall + ''; }; packages.default = self.packages.${system}.activate-linux;