Skip to content

Commit d108f68

Browse files
committed
Bump nixpkgs to nixpkgs-unstable
Gives us fresher tooling and being able to move faster.
1 parent caba2a7 commit d108f68

File tree

5 files changed

+36
-46
lines changed

5 files changed

+36
-46
lines changed

default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
let
22
pkgs = import ./nix { };
33
in
4-
pkgs.packages
4+
pkgs.packages // pkgs.checks

nix/default.nix

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,39 @@
55
let
66
overlay =
77
_: pkgs:
8+
let
9+
run = pkgs.callPackage ./run.nix { inherit tools; };
10+
tools = pkgs.callPackage ./tools.nix { };
11+
in
812
{
913
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+
};
1336
};
1437
in
1538
import nixpkgs {
1639
overlays = [ overlay ];
17-
config = { };
40+
# broken is needed for hindent to build
41+
config = { allowBroken = true; };
1842
inherit system;
1943
}

nix/packages.nix

Lines changed: 0 additions & 22 deletions
This file was deleted.

nix/sources.json

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,16 @@
1111
"url": "https://github.com/hercules-ci/gitignore/archive/2ced4519f865341adcb143c5d668f955a2cb997f.tar.gz",
1212
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
1313
},
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-
},
2614
"nixpkgs": {
27-
"branch": "release-20.09",
15+
"branch": "nixpkgs-unstable",
2816
"description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to",
2917
"homepage": "https://github.com/NixOS/nixpkgs",
3018
"owner": "NixOS",
3119
"repo": "nixpkgs",
32-
"rev": "b60f5e90cf20d08be6b26177b50b44f2c6d653f5",
33-
"sha256": "1pfk4gmsr1z3wz5f3crfy5r306d157ncqaidnmbrcjm812iy2baq",
20+
"rev": "79cb2cb9869d7bb8a1fac800977d3864212fd97d",
21+
"sha256": "16q1z81ppgd69w00a4lclhjmmr37jazij157z49w7psbbna7il95",
3422
"type": "tarball",
35-
"url": "https://github.com/NixOS/nixpkgs/archive/b60f5e90cf20d08be6b26177b50b44f2c6d653f5.tar.gz",
23+
"url": "https://github.com/NixOS/nixpkgs/archive/79cb2cb9869d7bb8a1fac800977d3864212fd97d.tar.gz",
3624
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
3725
}
3826
}

nix/tools.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
, nixfmt
1717
, nix-linter
1818
, callPackage
19-
, pythonPackages
19+
, python39Packages
2020
, rustfmt
2121
, clippy
2222
, cargo
@@ -26,10 +26,10 @@
2626
}:
2727

2828
{
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;
3030
inherit (elmPackages) elm-format;
3131
inherit (haskellPackages) stylish-haskell brittany hpack fourmolu;
32-
inherit (pythonPackages) yamllint;
32+
inherit (python39Packages) yamllint ansible-lint;
3333
inherit (nodePackages) prettier;
3434
purty = callPackage ./purty { purty = nodePackages.purty; };
3535
terraform-fmt = callPackage ./terraform-fmt { };

0 commit comments

Comments
 (0)