From 106b8616f7c808f1706545dc8f05488986bbbca6 Mon Sep 17 00:00:00 2001 From: "Hedtke, Moritz" Date: Thu, 18 Feb 2021 13:00:22 +0100 Subject: [PATCH] step-ca: Add systemd service file at correct location to get it picked up automatically --- pkgs/tools/security/step-ca/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/tools/security/step-ca/default.nix b/pkgs/tools/security/step-ca/default.nix index 7c5adc649be..584a597d67d 100644 --- a/pkgs/tools/security/step-ca/default.nix +++ b/pkgs/tools/security/step-ca/default.nix @@ -2,6 +2,7 @@ , lib , fetchFromGitHub , buildGoModule +, coreutils , pcsclite , PCSC , pkg-config @@ -26,6 +27,14 @@ buildGoModule rec { lib.optionals (stdenv.isLinux) [ pcsclite ] ++ lib.optionals (stdenv.isDarwin) [ PCSC ]; + postPatch = '' + substituteInPlace systemd/step-ca.service --replace "/bin/kill" "${coreutils}/bin/kill" + ''; + + postInstall = '' + install -Dm444 -t $out/lib/systemd/system systemd/step-ca.service + ''; + # Tests fail on darwin with # panic: httptest: failed to listen on a port: listen tcp6 [::1]:0: bind: operation not permitted [recovered] # probably some sandboxing issue