Skip to content
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

Update niv fails with: Type tag 'ash' is not recognized. Try upgrading identify and pre-commit? #21

Closed
anka-213 opened this issue Oct 12, 2020 · 2 comments

Comments

@anka-213
Copy link

See the log here: https://github.com/anka-213/cclaw-nix-stuff/runs/1240368729?check_suite_focus=true

I assume it is related to this pull request: cachix/git-hooks.nix#63

Is there a way to force it to use an older version of pre-commit-hooks.nix, while still updating the other packages?

@domenkozar
Copy link
Contributor

Good catch!

You should be able to fix that by applying:

diff --git a/nix/default.nix b/nix/default.nix
index 091e441..630207d 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -1,13 +1,14 @@
 { sources ? import ./sources.nix
 }:
-
 let
   # default nixpkgs
-  pkgs = import sources.nixpkgs {};
+  pkgs = import sources.nixpkgs { };
 
   # gitignore.nix 
   gitignoreSource = (import sources."gitignore.nix" { inherit (pkgs) lib; }).gitignoreSource;
 
+  pre-commit-hooks = (import sources."pre-commit-hooks.nix");
+
   src = gitignoreSource ./..;
 in
 {
@@ -15,12 +16,13 @@ in
 
   # provided by shell.nix
   devTools = {
-    inherit (pkgs) niv pre-commit;
+    inherit (pkgs) niv;
+    inherit (pre-commit-hooks) pre-commit;
   };
 
   # to be built by github actions
   ci = {
-    pre-commit-check = (import sources."pre-commit-hooks.nix").run {
+    pre-commit-check = pre-commit-hooks.run {
       inherit src;
       hooks = {
         shellcheck.enable = true;

@anka-213
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants