Skip to content

Commit

Permalink
[chore] documentation update for #21
Browse files Browse the repository at this point in the history
[chore] repair adjust nix dev env
  • Loading branch information
MangoIV committed May 31, 2024
1 parent 5603647 commit 48b78f0
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 23 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ To install `cabal-audit`, you can use Nix by running the following command:
nix run github:mangoiv/cabal-audit -- --help
```

If you don't use `nix`, you can also build from source with `cabal` or
[download a static executable from one of the latest workflow runs](https://github.com/MangoIV/cabal-audit/releases/tag/nightly).
If you don't use `nix`, you can also build from source with `cabal`. Just clone the repository and run `cabal install`.

You can also [download a static executable from one of the latest workflow runs](https://github.com/MangoIV/cabal-audit/releases/tag/nightly).

> [!Note]
> We also have a `cachix`. If you trust me (which I do not recommend, never trust anybody!), run `cachix use cabal-audit` to
Expand Down Expand Up @@ -90,6 +91,9 @@ dependency "process" at version 1.6.17.0 is vulnerable for:

## Contributing

Contributions are welcome. This repo is flake-enabled. To setup a `devShell`, run `nix develop` or `direnv allow`.
Contributions are welcome.

Building the project in a non-nix environment should be as easy as `cabal build`, the build is tested against multiple ghc versions and operating systems in the CI so it should always work with one of these. If you don't use nix, installing the necessary tooling is as always possible with [ghcup](https://www.haskell.org/ghcup/).

This repo is flake-enabled. To setup a `devShell`, run `nix develop` or `direnv allow`.
If you change dependencies, please run `regen-nix` to regenerate the nix derivations.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
];
devshell = {
name = "cabal-audit";
packagesFrom = [(import ./nix/haskell-shell.nix {inherit pkgs hspkgs;})];
packagesFrom = [(import ./nix/haskell-shell.nix {inherit hspkgs;})];
packages = [pkgs.cabal2nix pkgs.alejandra];
startup.pre-commit.text = config.pre-commit.installationScript;
};
Expand Down
4 changes: 2 additions & 2 deletions nix/cvss.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ mkDerivation {
version = "0.1";
src = fetchgit {
url = "https://github.com/haskell/security-advisories.git";
sha256 = "064w3hca4kpaysjp7mnfk3ggvf4l11i7a8qqjiw05j96zhs5cgnc";
rev = "ed728d3aeb69add3f1f62d205cbb5b59a99aa4f0";
sha256 = "16n0cck9i7f2ws6rmmrlcqw2yp18v0xsg6w56giv29vx90yadqp2";
rev = "1f8e5699f7bc96dcc069d3675ef6b95710ccfbde";
fetchSubmodules = true;
};
postUnpack = "sourceRoot+=/code/cvss/; echo source root reset to $sourceRoot";
Expand Down
2 changes: 2 additions & 0 deletions nix/haskell-overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ _: hfinal: hprev: {

toml-parser = hprev.toml-parser_2_0_0_0;
Cabal-syntax = hprev.Cabal-syntax_3_10_3_0;
Cabal = hprev.Cabal_3_10_3_0;
extensions = hprev.extensions.override {inherit (hfinal) Cabal;};
}
12 changes: 2 additions & 10 deletions nix/haskell-shell.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
{
pkgs,
hspkgs,
...
}:
{hspkgs, ...}:
hspkgs.shellFor {
packages = hps: [hps.cabal-audit];

nativeBuildInputs = [
pkgs.haskell-language-server
pkgs.haskellPackages.fourmolu
];
nativeBuildInputs = [hspkgs.haskell-language-server hspkgs.fourmolu];
}
4 changes: 2 additions & 2 deletions nix/hsec-core.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ mkDerivation {
version = "0.1.0.0";
src = fetchgit {
url = "https://github.com/haskell/security-advisories.git";
sha256 = "064w3hca4kpaysjp7mnfk3ggvf4l11i7a8qqjiw05j96zhs5cgnc";
rev = "ed728d3aeb69add3f1f62d205cbb5b59a99aa4f0";
sha256 = "16n0cck9i7f2ws6rmmrlcqw2yp18v0xsg6w56giv29vx90yadqp2";
rev = "1f8e5699f7bc96dcc069d3675ef6b95710ccfbde";
fetchSubmodules = true;
};
postUnpack = "sourceRoot+=/code/hsec-core/; echo source root reset to $sourceRoot";
Expand Down
4 changes: 2 additions & 2 deletions nix/hsec-tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ mkDerivation {
version = "0.1.0.0";
src = fetchgit {
url = "https://github.com/haskell/security-advisories.git";
sha256 = "064w3hca4kpaysjp7mnfk3ggvf4l11i7a8qqjiw05j96zhs5cgnc";
rev = "ed728d3aeb69add3f1f62d205cbb5b59a99aa4f0";
sha256 = "16n0cck9i7f2ws6rmmrlcqw2yp18v0xsg6w56giv29vx90yadqp2";
rev = "1f8e5699f7bc96dcc069d3675ef6b95710ccfbde";
fetchSubmodules = true;
};
postUnpack = "sourceRoot+=/code/hsec-tools/; echo source root reset to $sourceRoot";
Expand Down
6 changes: 3 additions & 3 deletions nix/osv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
}:
mkDerivation {
pname = "osv";
version = "0.1.0.0";
version = "0.1.0.1";
src = fetchgit {
url = "https://github.com/haskell/security-advisories.git";
sha256 = "064w3hca4kpaysjp7mnfk3ggvf4l11i7a8qqjiw05j96zhs5cgnc";
rev = "ed728d3aeb69add3f1f62d205cbb5b59a99aa4f0";
sha256 = "16n0cck9i7f2ws6rmmrlcqw2yp18v0xsg6w56giv29vx90yadqp2";
rev = "1f8e5699f7bc96dcc069d3675ef6b95710ccfbde";
fetchSubmodules = true;
};
postUnpack = "sourceRoot+=/code/osv/; echo source root reset to $sourceRoot";
Expand Down

0 comments on commit 48b78f0

Please sign in to comment.