File tree Expand file tree Collapse file tree 5 files changed +36
-46
lines changed Expand file tree Collapse file tree 5 files changed +36
-46
lines changed Original file line number Diff line number Diff line change 1
1
let
2
2
pkgs = import ./nix { } ;
3
3
in
4
- pkgs . packages
4
+ pkgs . packages // pkgs . checks
Original file line number Diff line number Diff line change 5
5
let
6
6
overlay =
7
7
_ : pkgs :
8
+ let
9
+ run = pkgs . callPackage ./run.nix { inherit tools ; } ;
10
+ tools = pkgs . callPackage ./tools.nix { } ;
11
+ in
8
12
{
9
13
inherit ( pkgs ) nixfmt niv ormolu nixpkgs-fmt nix-linter ;
10
- cabal-fmt = pkgs . haskellPackages . cabal-fmt ;
11
- hindent = pkgs . haskellPackages . callCabal2nix "hindent" sources . hindent { } ;
12
- packages = pkgs . callPackages ./packages.nix { } ;
14
+ cabal-fmt = pkgs . haskell . lib . enableSeparateBinOutput pkgs . haskellPackages . cabal-fmt ;
15
+ hindent = pkgs . haskell . lib . enableSeparateBinOutput pkgs . haskellPackages . hindent ;
16
+ inherit tools ;
17
+ # Flake style attributes
18
+ packages = {
19
+ inherit tools run ;
20
+ inherit ( pkgs . gitAndTools ) pre-commit ;
21
+ } ;
22
+ checks = tools // {
23
+ # A pre-commit-check for nix-pre-commit itself
24
+ pre-commit-check = run {
25
+ src = ../. ;
26
+ hooks = {
27
+ shellcheck . enable = true ;
28
+ nixpkgs-fmt . enable = true ;
29
+ } ;
30
+ excludes = [
31
+ # autogenerated by niv
32
+ "nix/sources.nix$"
33
+ ] ;
34
+ } ;
35
+ } ;
13
36
} ;
14
37
in
15
38
import nixpkgs {
16
39
overlays = [ overlay ] ;
17
- config = { } ;
40
+ # broken is needed for hindent to build
41
+ config = { allowBroken = true ; } ;
18
42
inherit system ;
19
43
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11
11
"url" : " https://github.com/hercules-ci/gitignore/archive/2ced4519f865341adcb143c5d668f955a2cb997f.tar.gz" ,
12
12
"url_template" : " https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
13
13
},
14
- "hindent" : {
15
- "branch" : " master" ,
16
- "description" : " Haskell pretty printer" ,
17
- "homepage" : null ,
18
- "owner" : " chrisdone" ,
19
- "repo" : " hindent" ,
20
- "rev" : " a75d4033969ecf7d4d0a5eb985d3d1abb3b9301f" ,
21
- "sha256" : " 0g9dm3mr7wi7bk55fvswv0zcw1khgyr2bmchrg6ks82jc9znxkr6" ,
22
- "type" : " tarball" ,
23
- "url" : " https://github.com/chrisdone/hindent/archive/a75d4033969ecf7d4d0a5eb985d3d1abb3b9301f.tar.gz" ,
24
- "url_template" : " https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
25
- },
26
14
"nixpkgs" : {
27
- "branch" : " release-20.09 " ,
15
+ "branch" : " master " ,
28
16
"description" : " A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to" ,
29
17
"homepage" : " https://github.com/NixOS/nixpkgs" ,
30
18
"owner" : " NixOS" ,
31
19
"repo" : " nixpkgs" ,
32
- "rev" : " b60f5e90cf20d08be6b26177b50b44f2c6d653f5 " ,
33
- "sha256" : " 1pfk4gmsr1z3wz5f3crfy5r306d157ncqaidnmbrcjm812iy2baq " ,
20
+ "rev" : " 3be2b567425214cd7cab693a9820717d11b0bdac " ,
21
+ "sha256" : " 12kbh6fkyq703s1vcrypra7k844m8qnhz54ilqvldjap7hj1c57w " ,
34
22
"type" : " tarball" ,
35
- "url" : " https://github.com/NixOS/nixpkgs/archive/b60f5e90cf20d08be6b26177b50b44f2c6d653f5 .tar.gz" ,
23
+ "url" : " https://github.com/NixOS/nixpkgs/archive/3be2b567425214cd7cab693a9820717d11b0bdac .tar.gz" ,
36
24
"url_template" : " https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
37
25
}
38
26
}
Original file line number Diff line number Diff line change 16
16
, nixfmt
17
17
, nix-linter
18
18
, callPackage
19
- , pythonPackages
19
+ , python39Packages
20
20
, rustfmt
21
21
, clippy
22
22
, cargo
26
26
} :
27
27
28
28
{
29
- inherit ansible-lint hlint shellcheck ormolu hindent cabal-fmt nixpkgs-fmt nixfmt nix-linter rustfmt clippy cargo html-tidy ;
29
+ inherit hlint shellcheck ormolu hindent cabal-fmt nixpkgs-fmt nixfmt nix-linter rustfmt clippy cargo html-tidy ;
30
30
inherit ( elmPackages ) elm-format ;
31
31
inherit ( haskellPackages ) stylish-haskell brittany hpack fourmolu ;
32
- inherit ( pythonPackages ) yamllint ;
32
+ inherit ( python39Packages ) yamllint ansible-lint ;
33
33
inherit ( nodePackages ) prettier ;
34
34
purty = callPackage ./purty { purty = nodePackages . purty ; } ;
35
35
terraform-fmt = callPackage ./terraform-fmt { } ;
You can’t perform that action at this time.
0 commit comments