Skip to content

Bump nixpkgs to nixpkgs-unstable #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let
pkgs = import ./nix { };
in
pkgs.packages
pkgs.packages // pkgs.checks
32 changes: 28 additions & 4 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,39 @@
let
overlay =
_: pkgs:
let
run = pkgs.callPackage ./run.nix { inherit tools; };
tools = pkgs.callPackage ./tools.nix { };
in
{
inherit (pkgs) nixfmt niv ormolu nixpkgs-fmt nix-linter;
cabal-fmt = pkgs.haskellPackages.cabal-fmt;
hindent = pkgs.haskellPackages.callCabal2nix "hindent" sources.hindent { };
packages = pkgs.callPackages ./packages.nix { };
cabal-fmt = pkgs.haskell.lib.enableSeparateBinOutput pkgs.haskellPackages.cabal-fmt;
hindent = pkgs.haskell.lib.enableSeparateBinOutput pkgs.haskellPackages.hindent;
inherit tools;
# Flake style attributes
packages = {
inherit tools run;
inherit (pkgs.gitAndTools) pre-commit;
};
checks = tools // {
# A pre-commit-check for nix-pre-commit itself
pre-commit-check = run {
src = ../.;
hooks = {
shellcheck.enable = true;
nixpkgs-fmt.enable = true;
};
excludes = [
# autogenerated by niv
"nix/sources.nix$"
];
};
};
};
in
import nixpkgs {
overlays = [ overlay ];
config = { };
# broken is needed for hindent to build
config = { allowBroken = true; };
inherit system;
}
22 changes: 0 additions & 22 deletions nix/packages.nix

This file was deleted.

20 changes: 4 additions & 16 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,16 @@
"url": "https://github.com/hercules-ci/gitignore/archive/2ced4519f865341adcb143c5d668f955a2cb997f.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"hindent": {
"branch": "master",
"description": "Haskell pretty printer",
"homepage": null,
"owner": "chrisdone",
"repo": "hindent",
"rev": "a75d4033969ecf7d4d0a5eb985d3d1abb3b9301f",
"sha256": "0g9dm3mr7wi7bk55fvswv0zcw1khgyr2bmchrg6ks82jc9znxkr6",
"type": "tarball",
"url": "https://github.com/chrisdone/hindent/archive/a75d4033969ecf7d4d0a5eb985d3d1abb3b9301f.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
"branch": "release-20.09",
"branch": "master",
"description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to",
"homepage": "https://github.com/NixOS/nixpkgs",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b60f5e90cf20d08be6b26177b50b44f2c6d653f5",
"sha256": "1pfk4gmsr1z3wz5f3crfy5r306d157ncqaidnmbrcjm812iy2baq",
"rev": "3be2b567425214cd7cab693a9820717d11b0bdac",
"sha256": "12kbh6fkyq703s1vcrypra7k844m8qnhz54ilqvldjap7hj1c57w",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/b60f5e90cf20d08be6b26177b50b44f2c6d653f5.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/3be2b567425214cd7cab693a9820717d11b0bdac.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
6 changes: 3 additions & 3 deletions nix/tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
, nixfmt
, nix-linter
, callPackage
, pythonPackages
, python39Packages
, rustfmt
, clippy
, cargo
Expand All @@ -26,10 +26,10 @@
}:

{
inherit ansible-lint hlint shellcheck ormolu hindent cabal-fmt nixpkgs-fmt nixfmt nix-linter rustfmt clippy cargo html-tidy;
inherit hlint shellcheck ormolu hindent cabal-fmt nixpkgs-fmt nixfmt nix-linter rustfmt clippy cargo html-tidy;
inherit (elmPackages) elm-format;
inherit (haskellPackages) stylish-haskell brittany hpack fourmolu;
inherit (pythonPackages) yamllint;
inherit (python39Packages) yamllint ansible-lint;
inherit (nodePackages) prettier;
purty = callPackage ./purty { purty = nodePackages.purty; };
terraform-fmt = callPackage ./terraform-fmt { };
Expand Down