summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-11-14 21:55:46 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-11-14 21:55:46 +0100
commit9865e974f51cfca8ce02d434f7f47fc238fc2d08 (patch)
tree274b297267fee48ccdc4ab6cccf0026a10108039 /tools
parent430d2d0a1ff89ef6dbbab85bf55956c678acfebf (diff)
downloadnixos-9865e974f51cfca8ce02d434f7f47fc238fc2d08.tar
nixos-9865e974f51cfca8ce02d434f7f47fc238fc2d08.tar.gz
nixos-9865e974f51cfca8ce02d434f7f47fc238fc2d08.tar.bz2
nixos-9865e974f51cfca8ce02d434f7f47fc238fc2d08.tar.xz
nixos-9865e974f51cfca8ce02d434f7f47fc238fc2d08.zip
modularize tools
Diffstat (limited to 'tools')
-rw-r--r--tools/ca/default.nix25
1 files changed, 25 insertions, 0 deletions
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 @@
1{ system, self, mach-nix, leapseconds, ... }:
2let
3 pkgs = self.legacyPackages.${system};
4in mach-nix.lib.${system}.buildPythonPackage {
5 pname = "ca";
6 src = pkgs.lib.sourceByRegex ./. ["^setup\.py$" "^ca(/[^/]+.*)?$"];
7 version = "0.0.0";
8 ignoreDataOutdated = true;
9
10 requirements = ''
11 cryptography >=38.0.0
12 fqdn
13 atomicwrites
14 leapseconddata
15 xkcdpass
16 '';
17
18 _.cryptography.buildInputs = with pkgs; [ openssl ];
19
20 postInstall = ''
21 wrapProgram $out/bin/ca \
22 --set-default LEAPSECONDS_FILE ${leapseconds} \
23 --prefix PATH : ${pkgs.lib.makeBinPath (with pkgs; [sops])}
24 '';
25}