nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, lib, fetchFromGitHub, apacheHttpd }:
2
3stdenv.mkDerivation rec {
4 pname = "mod_cspnonce";
5 version = "1.4";
6
7 src = fetchFromGitHub {
8 owner = "wyattoday";
9 repo = "mod_cspnonce";
10 rev = version;
11 hash = "sha256-uUWRKUjS2LvHgT5xrK+LZLQRHc6wMaxGca2OsVxVlRs=";
12 };
13
14 buildInputs = [ apacheHttpd ];
15
16 buildPhase = ''
17 apxs -ca mod_cspnonce.c
18 '';
19
20 installPhase = ''
21 runHook preInstall
22 mkdir -p $out/modules
23 cp .libs/mod_cspnonce.so $out/modules
24 runHook postInstall
25 '';
26
27 meta = with lib; {
28 description = "An Apache2 module that makes it dead simple to add nonce values to the CSP";
29 homepage = "https://github.com/wyattoday/mod_cspnonce";
30 license = licenses.asl20;
31 platforms = platforms.unix;
32 maintainers = with maintainers; [ dasj19 ];
33 };
34}