17 stdenvNoCC.mkDerivation (finalAttrs: {
18 pname = "blade-formatter";
21 src = fetchFromGitHub {
23 repo = "blade-formatter";
24 rev = "v${finalAttrs.version}";
25 hash = "sha256-iaWpIa+H+ocAXGc042PfmCu9UcJZeso9ripWB2/1oTs=";
28 yarnOfflineCache = fetchYarnDeps {
29 yarnLock = finalAttrs.src + "/yarn.lock";
30 hash = "sha256-zn0PgLIWk23EhYeOKF2RkpvLOusVrqoBazKcJpIAzm8=";
41 updateScript = nix-update-script { };
43 version = testers.testVersion {
44 package = blade-formatter;
45 command = "blade-formatter --version";
48 simple = testers.testEqualContents {
49 assertion = "blade-formatter formats a basic blade file";
50 expected = writeText "expected" ''
58 nativeBuildInputs = [ blade-formatter ];
59 base = writeText "base" ''
60 @if( true ) Hello world! @endif
64 blade-formatter $base > $out
71 description = "Laravel Blade template formatter";
72 homepage = "https://github.com/shufo/blade-formatter";
73 license = lib.licenses.mit;
74 maintainers = with lib.maintainers; [ lelgenio ];
75 mainProgram = "blade-formatter";
76 inherit (nodejs.meta) platforms;