All Projects → serokell → Nixfmt

serokell / Nixfmt

Licence: mpl-2.0
A formatter for Nix code

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Nixfmt

Nixpkgs Fmt
Nix code formatter for nixpkgs [[email protected]]
Stars: ✭ 171 (-14.93%)
Mutual labels:  nix, formatter
canonix
Experiment in Nix formatting
Stars: ✭ 18 (-91.04%)
Mutual labels:  formatter, nix
Legacy Old Hercules
Abandoned
Stars: ✭ 174 (-13.43%)
Mutual labels:  nix
Zkeme80
An assembler and operating system for the TI-84+ written in Scheme, Forth and Z80 assembly.
Stars: ✭ 200 (-0.5%)
Mutual labels:  nix
Nix Docker
Docker images for the Nix package manager
Stars: ✭ 189 (-5.97%)
Mutual labels:  nix
Nixpkgs Wayland
Automated, pre-built packages for Wayland (sway/wlroots) tools for NixOS.
Stars: ✭ 178 (-11.44%)
Mutual labels:  nix
Naersk
Build rust crates in Nix. No configuration, no code generation, no IFD. Sandbox friendly.
Stars: ✭ 193 (-3.98%)
Mutual labels:  nix
Musnix
Real-time audio in NixOS
Stars: ✭ 173 (-13.93%)
Mutual labels:  nix
All Hies
Cached Haskell IDE Engine Nix builds for all GHC versions
Stars: ✭ 201 (+0%)
Mutual labels:  nix
Jstoolnpp
A JavaScript (JSON) tool for Notepad++ (formerly JSMinNpp) and Visual Studio Code.
Stars: ✭ 186 (-7.46%)
Mutual labels:  formatter
Nix Index
Quickly locate nix packages with specific files
Stars: ✭ 197 (-1.99%)
Mutual labels:  nix
Comma
Stars: ✭ 186 (-7.46%)
Mutual labels:  nix
Dayperiodformatter
A formatter for localized day periods (morning, afternoon, night, etc.)
Stars: ✭ 181 (-9.95%)
Mutual labels:  formatter
Emacs Overlay
Bleeding edge emacs overlay [[email protected]]
Stars: ✭ 194 (-3.48%)
Mutual labels:  nix
Pypi2nix
Abandoned! Generate Nix expressions for Python packages
Stars: ✭ 178 (-11.44%)
Mutual labels:  nix
Hclfmt
Format and prettify HCL files
Stars: ✭ 200 (-0.5%)
Mutual labels:  formatter
Nixpkgs Channels
DEPRECATED! Use NixOS/nixpkgs repository instead.
Stars: ✭ 173 (-13.93%)
Mutual labels:  nix
Stylefmt
stylefmt is a tool that automatically formats stylesheets.
Stars: ✭ 2,123 (+956.22%)
Mutual labels:  formatter
Nixbox
NixOS Vagrant boxes [[email protected]]
Stars: ✭ 189 (-5.97%)
Mutual labels:  nix
Arion
Run docker-compose with help from Nix/NixOS
Stars: ✭ 202 (+0.5%)
Mutual labels:  nix

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 ❤️ 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!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].