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