Skip to content

Commit

Permalink
Merge pull request #37 from kai-tub/main
Browse files Browse the repository at this point in the history
Add flake usage to README & skip CI on doc changes
  • Loading branch information
zimbatm authored Apr 10, 2023
2 parents aa9ff6c + 4656b65 commit f529f42
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
jobs:
build:
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f529f42

Please sign in to comment.