2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, python3 }:
|
2017-01-27 15:52:20 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-03-20 17:49:40 +00:00
|
|
|
version = "2019-02-13";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "nginx-config-formatter";
|
2017-01-27 15:52:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "1connect";
|
|
|
|
repo = "nginx-config-formatter";
|
2019-03-20 17:49:40 +00:00
|
|
|
rev = "4ea6bbc1bdeb1d28419548aeca90f323e64e0e05";
|
|
|
|
sha256 = "0h6pj9i0wim9pzkafi92l1nhlnl2a530vnm7qqi3n2ra8iwfyw4f";
|
2017-01-27 15:52:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ python3 ];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = ''
|
|
|
|
python3 $src/test_nginxfmt.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
install -m 0755 $src/nginxfmt.py $out/bin/nginxfmt
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-01-27 15:52:20 +00:00
|
|
|
description = "nginx config file formatter";
|
2017-01-27 17:53:49 +00:00
|
|
|
maintainers = with maintainers; [ Baughn ];
|
2017-01-27 15:52:20 +00:00
|
|
|
license = licenses.asl20;
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/1connect/nginx-config-formatter";
|
2017-01-27 15:52:20 +00:00
|
|
|
};
|
|
|
|
}
|