mirror of
https://github.com/nmattia/niv.git
synced 2024-09-18 19:07:19 +03:00
Use ormolu from nixpkgs
This commit is contained in:
parent
8e0e8017c5
commit
fc2cd34b83
@ -148,7 +148,7 @@ let
|
|||||||
niv-devshell = haskellPackages.shellFor {
|
niv-devshell = haskellPackages.shellFor {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
pkgs.nixpkgs-fmt
|
pkgs.nixpkgs-fmt
|
||||||
pkgs.ormolu
|
pkgs.haskellPackages.ormolu
|
||||||
];
|
];
|
||||||
packages = ps: [ ps.niv ];
|
packages = ps: [ ps.niv ];
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
|
@ -1,14 +1,9 @@
|
|||||||
{ sources ? import ./sources.nix }:
|
{ sources ? import ./sources.nix }:
|
||||||
let
|
|
||||||
ormoluCompiler = "ghc865";
|
|
||||||
in
|
|
||||||
import sources.nixpkgs {
|
import sources.nixpkgs {
|
||||||
overlays = [
|
overlays = [
|
||||||
(_: pkgs: { inherit sources; })
|
(_: pkgs: { inherit sources; })
|
||||||
(_: pkgs: { nixpkgs-fmt = import pkgs.sources.nixpkgs-fmt {}; })
|
(_: pkgs: { nixpkgs-fmt = import pkgs.sources.nixpkgs-fmt {}; })
|
||||||
(_: pkgs: { termtosvg = pkgs.callPackage ./termtosvg.nix {}; })
|
(_: pkgs: { termtosvg = pkgs.callPackage ./termtosvg.nix {}; })
|
||||||
(import ./haskell-overlay.nix { inherit ormoluCompiler; })
|
|
||||||
(_: pkgs: { ormolu = pkgs.haskell.packages."${ormoluCompiler}".ormolu; })
|
|
||||||
];
|
];
|
||||||
config = {};
|
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": "https://github.com/nix-community/nixpkgs-fmt/archive/2a64f4b6a597d0d62004ffcec3ae4fd83cd1efc8.tar.gz",
|
||||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.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": {
|
"termtosvg": {
|
||||||
"branch": "develop",
|
"branch": "develop",
|
||||||
"description": "Record terminal sessions as SVG animations",
|
"description": "Record terminal sessions as SVG animations",
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/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:
|
### Usage:
|
||||||
### fmt [-c] [-i]
|
### fmt [-c]
|
||||||
###
|
###
|
||||||
### Options:
|
### Options:
|
||||||
### -i Format files inplace, will change files!
|
|
||||||
### -c Only check formatting, don't change files
|
### -c Only check formatting, don't change files
|
||||||
### -h Print this message
|
### -h Print this message
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user