Merge pull request #37 from kai-tub/main

Add flake usage to README & skip CI on doc changes
This commit is contained in:
Jonas Chevalier 2023-04-10 21:19:13 +02:00 committed by GitHub
commit f529f42792
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View File

@ -2,7 +2,11 @@ on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
jobs:
build:

View File

@ -86,6 +86,27 @@ and `path` types to a matcher.
The matcher is a function that takes a `path` and `type` and returns `true` if
the pattern matches.
The flake usage is like this:
```nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
nix-filter.url = "github:numtide/nix-filter";
};
outputs = { self, nixpkgs, nix-filter }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
# Avoid calling it nix-filter as it may result in an infinite recursion
filter = nix-filter.lib;
# ....
in
{
# ...
};
}
```
## Builtin matchers
The functor also contains a number of matchers: