about summary refs log tree commit diff
path: root/pkgs/tools/misc/nginx-config-formatter
diff options
context:
space:
mode:
authorSvein Ove Aas <svein.ove@aas.no>2017-01-27 15:52:20 +0000
committerRobin Gloster <mail@glob.in>2017-01-27 16:52:20 +0100
commit3d78976c58492a0455c98f531eb3782206529c1d (patch)
tree23eb586dc75efb71db22aa050586c156e44d6965 /pkgs/tools/misc/nginx-config-formatter
parentced27b2966ecad3ccf275779f054188642ae9818 (diff)
nginx-config-formatter: init at 2016-06-16 (#22179)
Diffstat (limited to 'pkgs/tools/misc/nginx-config-formatter')
-rw-r--r--pkgs/tools/misc/nginx-config-formatter/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/tools/misc/nginx-config-formatter/default.nix b/pkgs/tools/misc/nginx-config-formatter/default.nix
new file mode 100644
index 0000000000000..22febe4ed9fae
--- /dev/null
+++ b/pkgs/tools/misc/nginx-config-formatter/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, python3 }:
+
+stdenv.mkDerivation rec {
+  version = "2016-06-16";
+  name = "nginx-config-formatter-${version}";
+
+  src = fetchFromGitHub {
+    owner = "1connect";
+    repo = "nginx-config-formatter";
+    rev = "fe5c77d2a503644bebee2caaa8b222c201c0603d";
+    sha256 = "0akpkbq5136k1i1z1ls6yksis35hbr70k8vd10laqwvr1jj41bga";
+  };
+
+  buildInputs = [ python3 ];
+
+  doCheck = true;
+  checkPhase = ''
+    python3 $src/test_nginxfmt.py
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    install -m 0755 $src/nginxfmt.py $out/bin/nginxfmt
+  '';
+
+  meta = with stdenv.lib; {
+    description = "nginx config file formatter";
+    maintainers = with maintainers; [ baughn ];
+    license = licenses.asl20;
+    homepage = https://github.com/1connect/nginx-config-formatter;
+  };
+}