From 8e9b72be8276e3ea2e0933cd260359535523e43f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Thu, 21 Sep 2023 16:07:56 +0200 Subject: [PATCH] nixos/sudo-rs: add crossCompile 'fix' This is just a quick fix based on pname, as I have no idea how to use slicing in the module We should instead use slicing to get the package for the host --- nixos/modules/security/sudo-rs.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/security/sudo-rs.nix b/nixos/modules/security/sudo-rs.nix index 83bef3bbf91c..6b8f09a8d3d0 100644 --- a/nixos/modules/security/sudo-rs.nix +++ b/nixos/modules/security/sudo-rs.nix @@ -285,7 +285,7 @@ in src = pkgs.writeText "sudoers-in" cfg.configFile; preferLocalBuild = true; } - "${cfg.package}/bin/visudo -f $src -c && cp $src $out"; + "${pkgs.buildPackages."${cfg.package.pname}"}/bin/visudo -f $src -c && cp $src $out"; mode = "0440"; };