Haskell in Nixpkgs/NixOS | 718 Members | |
| For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/ | 143 Servers |
| Sender | Message | Time |
|---|---|---|
| 19 Jan 2025 | ||
In reply to @b:chreekat.net That's hardly the bare minimum needed to avoid repetition. Perhaps DRY fails to explicitly account for the idea that some repetition is needed for defining things that are different even though they seem similar. For me, problems like this tend to go away when I model the problem more carefully. | 13:24:44 | |
| I think when modeling things more carefully always makes the result better. The question is does it make the process more efficient. | 13:28:32 | |
I've updated the hscurses library a little bit; in particular its new version would no longer need the line hscurses = addExtraLibrary pkgs.ncurses super.hscurses; in configuration-nix.nix (but would need to inherit ncurses from pkgs instead in the mkDerivation call in hackage-packages.nix instead in order to not pull in the Haskell lib named ncurses). Is the version update + the latter step something that's automagically made somehow? Or would that need a PR somewhere? | 13:53:33 | |
* I've updated the hscurses library a little bit; in particular its new version would no longer need the line hscurses = addExtraLibrary pkgs.ncurses super.hscurses; in configuration-nix.nix (but would need to inherit ncurses from pkgs instead in the mkDerivation call in hackage-packages.nix instead in order to not pull in the Haskell lib named ncurses). Is the version update + the latter step something that's automagically made somehow? Or would that need a PR somewhere? (My guess would be that changing configuration-nix.nix is a manual step?) | 13:54:12 | |
Changes in configuration-nix.nix and configuration-common.nix are always manual steps. However the version updates are automatic. It happens about once every two weeks on the haskell-updates branch in Nixpkgs. (Although now its more like once a month or so?) Here's an example PR where you can see the version updates happen: https://github.com/NixOS/nixpkgs/pull/371032 | 14:03:26 | |
Cool, thanks! If I (or you) would want to make the above changes after the update to hscurses is through (and the package is then presumably marked broken), we'd then have to PR to haskell-updates when a new draft PR is made? | 14:07:08 | |
And if hackage-packages.nix is automatically generated: is that mechanism smart enough to detect that the ncurses argument is not meaning haskellPackages.ncurses, but needs to be overridden with { inherit (pkgs) ncurses: }? | 14:10:08 | |
* And if hackage-packages.nix is automatically generated: is that mechanism smart enough to detect that the ncurses argument is not supposed to need haskellPackages.ncurses, but needs to be overridden with { inherit (pkgs) ncurses: }? | 14:11:39 | |
I'd recommend using haskell.lib.compose.overrideSrc since that deals with hackage revisions and allows further haskell specific overrides. | 19:12:17 | |
| 23:11:22 | ||
| 20 Jan 2025 | ||
| 10:22:02 | ||
| chreekat linj: Thanks for the hints back then. Does haskell.lib.compose.overrideCabal (as in both pretty-simple and nixfmt-rfc-style) can do the same as
I really need ghc910 (GHC2024). | 17:19:09 | |
| * chreekat linj: Thanks for the hints back then. Does haskell.lib.compose.overrideCabal (as in both given derivation examples pretty-simple and nixfmt-rfc-style) can do the same as
I really need ghc910 (GHC2024). | 17:19:41 | |
In reply to @joaomoreira:matrix.orgfor reference | 17:20:54 | |
| otherwise, how can I do it? | 17:21:59 | |
| you can apply overrideCabal in an overlay for ghc910, just need nested // | 18:31:24 | |
| ``` haskell = nixpkgs.haskell // { packages = nixpkgs.haskell.packages // { "${compiler}" = nixpkgs.haskell.packages.${compiler}.override(old: { overrides = self: super: { mypkg = overrideCabal super.mypkg (drv: ...) } }); }; }; }; ``` | 18:37:05 | |
| This sort of thjng | 18:37:08 | |
| * This sort of thing | 18:37:18 | |
| * <code> haskell = nixpkgs.haskell // { packages = nixpkgs.haskell.packages // { "${compiler}" = nixpkgs.haskell.packages.${compiler}.override(old: { overrides = self: super: { mypkg = overrideCabal super.mypkg (drv: ...) } }); }; }; }; </code> ``` | 18:37:38 | |
| * <code> haskell = nixpkgs.haskell // { packages = nixpkgs.haskell.packages // { "${compiler}" = nixpkgs.haskell.packages.${compiler}.override(old: { overrides = self: super: { mypkg = overrideCabal super.mypkg (drv: ...) } }); }; }; }; </code> | 18:37:47 | |
| * ``` haskell = nixpkgs.haskell // { packages = nixpkgs.haskell.packages // { "${compiler}" = nixpkgs.haskell.packages.${compiler}.override(old: { overrides = self: super: { mypkg = overrideCabal super.mypkg (drv: ...) } }); }; }; }; ``` | 18:38:42 | |
| Is triple back tick formatting broken for anyone else for weeks now? | 18:39:03 | |
| 21 Jan 2025 | ||
| I tried getting access to specific version of fourmolu like this:
But it results in an error. Relevant error messages:
Is that expected ? Is there any workaround for it ? | 03:03:13 | |