~kaction/nixfmt

An opinionated formatter for Nix
5e004ddd — Zhenya Vinogradov 4 years ago
Merge pull request #68 from serokell/zhenya/aws-sync
86be8c3d — Zhenya Vinogradov 4 years ago
Deployment: run `aws cp` before `aws sync` to replace existing files
ccfd9dab — Zhenya Vinogradov 4 years ago
Merge pull request #64 from serokell/zhenya/ops934-deploy-to-aws

clone

read-only
https://git.sr.ht/~kaction/nixfmt
read/write
git@git.sr.ht:~kaction/nixfmt

You can also use your local clone with git send-email.

#nixfmt

nixfmt is a formatter for Nix code, intended to easily apply a uniform style.

You are encouraged to test this out on your code and submit any undesirable formatting you find as an issue

Build Status Cachix

#Installation

  • nixfmt is in nixpkgs master as of 2019-09-04:

    nix-env -iA nixpkgs.nixfmt
    
  • To get the most recent version, install from master:

    # Optional: use cachix to get cached builds even for master
    cachix use nixfmt
    nix-env -f https://github.com/serokell/nixfmt/archive/master.tar.gz -i
    

#Development

#With Nix

Haskell dependencies will be built by Nix.

  • Enter nix-shell
  • Build with cabal new-build

#Without Nix

Haskell dependencies will be built by Cabal.

  • Build with cabal new-build

#Usage

  • nixfmt < input.nix ā€“ reads Nix code form stdin, formats it, and outputs to stdout
  • nixfmt file.nix ā€“ format the file in place

#For Contributors

We welcome issues and pull requests on GitHub.

#About Serokell

nixfmt is maintained and funded with :heart: by Serokell. The names and logo for Serokell are trademark of Serokell OƜ.

We love open source software! See our other projects or hire us to design, develop and grow your idea!