nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 pkg-config,
6 openssl,
7 perl,
8 libmysqlclient,
9 sqlite,
10 mariadb,
11 postgresql,
12 mbedtls,
13 versionCheckHook,
14 nix-update-script,
15}:
16
17rustPlatform.buildRustPackage (finalAttrs: {
18 pname = "ocsp-server";
19 version = "0.6.1";
20
21 src = fetchFromGitHub {
22 owner = "DorianCoding";
23 repo = "OCSP-server";
24 tag = "v${finalAttrs.version}";
25 hash = "sha256-7JYefylOs+Chqejt+hpB1AD4FTdbIhfKS1He4xAFMLo=";
26 };
27
28 cargoHash = "sha256-2wtQO6Mp4rkeklpCDKFRre5WGao7dQd+Mmma80QRo00=";
29
30 checkFlags = [
31 # Requires database access
32 "--skip=test::checkconfig"
33 ];
34
35 nativeBuildInputs = [
36 pkg-config
37 perl
38 libmysqlclient
39 sqlite
40 ];
41
42 buildInputs = [
43 openssl
44 sqlite
45 mariadb
46 postgresql
47 mbedtls
48 ];
49
50 nativeInstallCheckInputs = [
51 versionCheckHook
52 ];
53 doInstallCheck = true;
54
55 passthru = {
56 updateScript = nix-update-script { };
57 };
58
59 meta = {
60 description = "OCSP responder fetching certificate status from MySQL/MariaDB database";
61 homepage = "https://github.com/DorianCoding/OCSP-server";
62 license = lib.licenses.gpl3Only;
63 maintainers = with lib.maintainers; [ liberodark ];
64 mainProgram = "ocsp-server";
65 };
66})