Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/norfairking/weeder-nix
A nix library for calling weeder on your Haskell codebase
https://github.com/norfairking/weeder-nix
Last synced: about 2 months ago
JSON representation
A nix library for calling weeder on your Haskell codebase
- Host: GitHub
- URL: https://github.com/norfairking/weeder-nix
- Owner: NorfairKing
- License: other
- Created: 2024-04-08T06:47:17.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-10-27T01:06:03.000Z (about 2 months ago)
- Last Synced: 2024-10-27T02:18:42.798Z (about 2 months ago)
- Language: Nix
- Size: 10.7 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Weeder Nix
Produce a weeder check for a list of Haskell Packages from Nix
## Quick Start
Add this repository as a flake:
``` nix
{
inputs = {
weeder-nix.url = "github:NorfairKing/weeder-nix";
};
}
```Make a weeder check
``` nix
{
outputs = { self, weeder-nix }: {
checks.x86-64_linux.dependency-graph = weeder-nix.lib.x86_64-linux.makeWeederCheck {
haskellPackages = pkgs.haskellPackages;
packages = [
"foobar"
"foobar-gen"
];
};
};
}
```## API Reference
### `makeWeederCheck`
Make a weeder check for given Haskell Packages.
(This does the `addHieOutput` handling for you.)Arguments:
* `name`: Name of the check derivation
* `weederToml`: Path to the `weeder.toml` configuration file.
* `packages`: List of package names to make the check for.
* `haskellPackages`: `haskellPackages` to get those packages from.
* `reportOnly`: Don't fail if weeds are found, but instead succeed and create a report of the weeds instead.
* `extraArgs`: Extra command-line arguments for the `weeder` invocation.See `./nix/weederCheckFor.nix` for the available arguments.
### `weederCheckScriptFor`
Make a weeder check based on raw packages.
This assumes you've used something like `addHieOutput`.
You probably don't need to use this.See `./nix/weederCheckFor.nix`.
### `addHieOutput`
Add a `.hie` output to a Haskell package.
You probably don't need to use this.See `./nix/addHieOutput.nix`.