8000 GitHub - akirak/flake-no-path: Detect local paths in flake.lock
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

akirak/flake-no-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flake-no-path for Nix

This script checks path: references in flake.lock files. If there is any node that is locked to an absolute path, it will cause a non-zero exit.

flake.lock can be either given as arguments or searched recursively from the working directory.

Usage

nix run github:akirak/flake-no-path -- [FILE...]

You can combine it with pre-commit-hooks.nix.

Example:

   pre-commit-check = pre-commit-hooks.lib.${system}.run {
     src = ./.;
     hooks = {
       nixpkgs-fmt.enable = true;
       nix-linter.enable = true;
       flake-no-path = {
         enable = true;
         name = "Ensure that flake.lock does not contain a local path";
         entry = "${flake-no-path}/bin/flake-no-path";
         files = "flake\.lock$";
         pass_filenames = true;
       };
     };
   };

About

Detect local paths in flake.lock

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •  
0