1 with import (builtins.fetchTarball {
2 # FIXME: upgrade to nixpkgs 19 when stable and stick to stable
4 name = "nixos-unstable-2018-12-08";
5 url = https://github.com/nixos/nixpkgs/archive/61c3169a0e17d789c566d5b241bfe309ce4a6275.tar.gz;
6 sha256 = "0qbycg7wkb71v20rchlkafrjfpbk2fnlvvbh3ai9pyfisci5wxvq";
10 webRoot = pkgs.stdenv.mkDerivation rec {
11 name = "adminer-4.7.0";
13 url = "https://www.adminer.org/static/download/4.7.0/${name}.php";
14 sha256 = "1qq2g7rbfh2vrqfm3g0bz0qs057b049n0mhabnsbd1sgnpvnc5z7";
16 phases = "installPhase";
19 cp $src $out/index.php
23 socket = "/var/run/phpfpm/adminer.sock";
32 pm.process_idle_timeout = 60
33 ;php_admin_flag[log_errors] = on
34 php_admin_value[open_basedir] = "${webRoot}:/tmp"
38 Alias /adminer ${webRoot}
39 <Directory ${webRoot}>
40 DirectoryIndex = index.php
42 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
50 include ${pkgs.nginx}/conf/fastcgi.conf;
51 fastcgi_split_path_info ^(.+?\.php)(/.*)$;
52 fastcgi_param HTTP_PROXY "";
53 fastcgi_param SCRIPT_FILENAME ${webRoot}/index.php;
54 fastcgi_pass unix:${phpFpm.socket};
55 fastcgi_index index.php;
56 fastcgi_intercept_errors on;