From c161ba1af18ba8d03b497059fe15e5a4c5ffb722 Mon Sep 17 00:00:00 2001 From: Majiir Paktu Date: Sun, 17 Sep 2023 21:49:21 -0400 Subject: [PATCH] pam_rssh: fix 1.1.0 update The version was bumped in 661d2a9275a14082e92d37942b93331e3dcce8a2 but the source rev and hash were not updated. - Tied source rev to version. - Updated the hashes. - Added a patch to fix new tests that expect coreutils in /bin. --- pkgs/os-specific/linux/pam_rssh/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/pam_rssh/default.nix b/pkgs/os-specific/linux/pam_rssh/default.nix index d19457bf3762..2da53d462790 100644 --- a/pkgs/os-specific/linux/pam_rssh/default.nix +++ b/pkgs/os-specific/linux/pam_rssh/default.nix @@ -1,25 +1,32 @@ { lib , rustPlatform , fetchFromGitHub +, coreutils , pkg-config , openssl , pam , openssh }: -rustPlatform.buildRustPackage { +rustPlatform.buildRustPackage rec { pname = "pam_rssh"; version = "1.1.0"; src = fetchFromGitHub { owner = "z4yx"; repo = "pam_rssh"; - rev = "92c240bd079e9711c7afa8bacfcf01de48f42577"; - hash = "sha256-mIQeItPh6RrF3cFbAth2Kmb2E/Xj+lOgatvjcLE4Yag="; + rev = "v${version}"; + hash = "sha256-SDtMqGy2zhq9jEQVwSEl4EwRp2jgXfTVLrCX7k/kBeU="; fetchSubmodules = true; }; - cargoHash = "sha256-QMyMqsjZ91WimIaaSCXtbRScS3BoB+yFtHjx3xViq7U="; + cargoHash = "sha256-gNy1tcHDUOG1XduGAIMapvx5dlq+U1LitUQkccGfb9o="; + + postPatch = '' + substituteInPlace src/auth_keys.rs \ + --replace '/bin/echo' '${coreutils}/bin/echo' \ + --replace '/bin/false' '${coreutils}/bin/false' + ''; nativeBuildInputs = [ pkg-config