From 9865e974f51cfca8ce02d434f7f47fc238fc2d08 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 14 Nov 2022 21:55:46 +0100 Subject: modularize tools --- tools/ca/default.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tools/ca/default.nix (limited to 'tools/ca') diff --git a/tools/ca/default.nix b/tools/ca/default.nix new file mode 100644 index 00000000..c5fe0cea --- /dev/null +++ b/tools/ca/default.nix @@ -0,0 +1,25 @@ +{ system, self, mach-nix, leapseconds, ... }: +let + pkgs = self.legacyPackages.${system}; +in mach-nix.lib.${system}.buildPythonPackage { + pname = "ca"; + src = pkgs.lib.sourceByRegex ./. ["^setup\.py$" "^ca(/[^/]+.*)?$"]; + version = "0.0.0"; + ignoreDataOutdated = true; + + requirements = '' + cryptography >=38.0.0 + fqdn + atomicwrites + leapseconddata + xkcdpass + ''; + + _.cryptography.buildInputs = with pkgs; [ openssl ]; + + postInstall = '' + wrapProgram $out/bin/ca \ + --set-default LEAPSECONDS_FILE ${leapseconds} \ + --prefix PATH : ${pkgs.lib.makeBinPath (with pkgs; [sops])} + ''; +} -- cgit v1.2.3