Skip to content

docs(gotchas): Overriding libssh2 #411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions doc/gotchas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Gotchas

{#libssh2}
## Overriding `libssh2` Haskell library

```nix
# In `haskellProjects.default`
{
settings = {
libssh2 = {
broken = false;
# Overriding the package with `packages.libssh2.source = "0.2.0.9"` results in infinite recursion.

# Possibly having to do with `cabal2nix` not understading that [`libssh2` in `pkgconfig-depends` of `libssh2.cabal`](https://github.com/portnov/libssh2-hs/blob/bf7cbe643c7f4fb4fad3963705feb8351471eb01/libssh2/libssh2.cabal#L70)
# is not self-referential.
Comment on lines +12 to +15
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this above as Markdown paragraph below the heading? Without reading the code, the 'gotcha' section is stripped of any explanation as to its existance.

custom = (p: p.overrideAttrs (oa: rec {
version = "0.2.0.9";
src = pkgs.fetchzip {
url = "mirror://hackage/${oa.pname}-${version}/${oa.pname}-${version}.tar.gz";
sha256 = "sha256-/zzj11iOxkpEsKVwB4+IF8dNZwEuwUlgw+cZYguN8QI=";
};
}));
};
};
}
```

5 changes: 5 additions & 0 deletions doc/package-set.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,8 @@ Finally, you can externalize this `ghc810` package set as either a flake-parts m
## Examples

- https://github.com/nammayatri/common/pull/11/files

## See also

- [[gotchas]]