| 25 Aug 2025 |
| Magnolia Mayhem changed their profile picture. | 03:01:08 |
| Magnolia Mayhem changed their profile picture. | 03:01:29 |
| mra joined the room. | 07:25:22 |
mra | Howdy! Having some issues trying to set up a flake for development. I'm trying to use Clash to do FPGA stuff. The authors of Clash provide this starter template: https://github.com/clash-lang/clash-starters/tree/main/simple-nix, but I wanted to try to make a flake, thinking that it would be simpler to simply define a package, and then use nix develop to obtain a dev environment. I wrote this flake: https://paste.rs/guCkG.txt and just replaced all of the .nix files with this. It seems to work, but when I attempt to run the clash executable, I get a weird error: "<command line>: Could not find module ‘GHC.TypeLits.KnownNat.Solver’.". I can't figure out what causes this, and it doesn't happen when I run nix-develop in the root of the template as given, which is strange, since in both cases the build is just using runCabal2nix, rather than explicitly including this GHC plugin as a build input explicitly. | 07:29:35 |
maralorn | @morgan.arnold:matrix.org One theory would be, that your flake is picking a different nixpkgs version. The template seems to be pinned to a known good version. | 07:51:34 |
mra | oh, that's bizarre. somehow didn't notice all of the weirdness in the nix/ directory... is there a straightforward way of copying over the nix/ directory and then using that as the nixpkgs input for my flake? that seems like the simplest way to ensure that the versions are all good | 08:29:59 |
Pierre Thierry | I'll try that, that's way simpler than anything already shown as example for `shellFor`! | 10:36:26 |
maralorn | mra: the nixpkgs pin in the nix/ dir should have a commit hash somewhere. You can put that commit hash in the nixpkgs input in the flake. (see nix manual for syntax) | 10:36:53 |
sterni (he/him) | An alternative is to use callCabal2nix in the packages function which would generate the expression on the fly. (Basically like developPackage, but developPackage would, I think, not work since it behaves differently depending on whether the IN_NIX_SHELL environment variable is set.) | 11:36:33 |
sterni (he/him) | Pitching the idea to target an upgrade to 9.10.3: https://discourse.nixos.org/t/call-for-contributions-we-are-updating-to-ghc-9-10-2/67756/4 | 11:37:36 |
Teo (he/him) | That's a good call IMO. There's a pretty annoying in 9.10.2 where GHC will panic if you use a constructor you havent imported but you've imported the synonymous type | 11:41:56 |
alexfmpe | wow text 2.1.2 is the gift that keeps on giving | 13:05:58 |
Uraraka ~ Ochaco | In reply to @alexfmpe:matrix.org wow text 2.1.2 is the gift that keeps on giving Isn't it just? I use T.show now. I had to change around and not use nix for packages and just use hackage because it wasn't in nix for ages | 13:13:36 |
maralorn | It is a very simple change, yes. But we nix maintainers need to wait for it to propagate through every package in the ecosystem to adopt it. And that is one of the many reasons that we can't deliver the deployment speed that you apparently expect. | 13:57:51 |