mirror of
https://github.com/nmattia/niv.git
synced 2024-09-16 01:47:08 +03:00
Use ormolu from nixpkgs
This commit is contained in:
parent
8e0e8017c5
commit
fc2cd34b83
@ -148,7 +148,7 @@ let
|
||||
niv-devshell = haskellPackages.shellFor {
|
||||
buildInputs = [
|
||||
pkgs.nixpkgs-fmt
|
||||
pkgs.ormolu
|
||||
pkgs.haskellPackages.ormolu
|
||||
];
|
||||
packages = ps: [ ps.niv ];
|
||||
shellHook = ''
|
||||
|
@ -1,14 +1,9 @@
|
||||
{ sources ? import ./sources.nix }:
|
||||
let
|
||||
ormoluCompiler = "ghc865";
|
||||
in
|
||||
import sources.nixpkgs {
|
||||
overlays = [
|
||||
(_: pkgs: { inherit sources; })
|
||||
(_: pkgs: { nixpkgs-fmt = import pkgs.sources.nixpkgs-fmt {}; })
|
||||
(_: pkgs: { termtosvg = pkgs.callPackage ./termtosvg.nix {}; })
|
||||
(import ./haskell-overlay.nix { inherit ormoluCompiler; })
|
||||
(_: pkgs: { ormolu = pkgs.haskell.packages."${ormoluCompiler}".ormolu; })
|
||||
];
|
||||
config = {};
|
||||
}
|
||||
|
@ -1,14 +0,0 @@
|
||||
{ ormoluCompiler }: self: super:
|
||||
|
||||
let
|
||||
ormolu = import super.sources.ormolu { pkgs = self; inherit ormoluCompiler; };
|
||||
in
|
||||
{
|
||||
haskell = super.haskell // {
|
||||
packages = super.haskell.packages // {
|
||||
"${ormolu.ormoluCompiler}" = super.haskell.packages.${ormolu.ormoluCompiler}.override {
|
||||
overrides = ormolu.ormoluOverlay;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -23,18 +23,6 @@
|
||||
"url": "https://github.com/nix-community/nixpkgs-fmt/archive/2a64f4b6a597d0d62004ffcec3ae4fd83cd1efc8.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"ormolu": {
|
||||
"branch": "master",
|
||||
"description": "A formatter for Haskell source code",
|
||||
"homepage": null,
|
||||
"owner": "tweag",
|
||||
"repo": "ormolu",
|
||||
"rev": "22839ed74c9964578ae3b2af5c693f605ac8a687",
|
||||
"sha256": "055z8p8kl80fr50crcvy2djk3qg2x34p8pa7kihxlcj9wrhsijyy",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/tweag/ormolu/archive/22839ed74c9964578ae3b2af5c693f605ac8a687.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"termtosvg": {
|
||||
"branch": "develop",
|
||||
"description": "Record terminal sessions as SVG animations",
|
||||
|
@ -1,12 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
###
|
||||
### fmt — find changed Haskell files and format them with ormolu
|
||||
### fmt - find changed Haskell files and format them with ormolu
|
||||
###
|
||||
### Usage:
|
||||
### fmt [-c] [-i]
|
||||
### fmt [-c]
|
||||
###
|
||||
### Options:
|
||||
### -i Format files inplace, will change files!
|
||||
### -c Only check formatting, don't change files
|
||||
### -h Print this message
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user