| 24 Jan 2025 |
tobz619 | In reply to @alexfmpe:matrix.org I just tell HLS to take it from PATH and nix shell on the relevant project does this work over different ghc versions? | 17:26:22 |
chreekat | tobz619: nah, you need to pull hls and ghc from the same nixpkgs pin for them to work together | 17:40:55 |
maralorn | chreekat: That’s true. But a sensible nix-shell will do exactly that. So yeah, tobz619 That totally works for different ghc versions. | 17:42:31 |
maralorn | Huh, maybe a misunderstanding. I am pretty sure alexfmpe meant to set the PATH with the HLS via the nix-shell. | 17:43:40 |
maralorn | tobz619: See the above linked nixpkgs manual entry on how to install the right hls for your ghc version. | 17:44:02 |
chreekat | (alexmfpe's method works fine if you use the same ghc for a bunch of stuff. I myself have a default ghc/hls in my env) | 17:47:21 |
chreekat | huh, i'm trying to use a certain nixpkgs pin that uses lts-22.4 for Reasons, but i'm getting a different version of the tls package than I expect | 17:48:11 |
chreekat | ah yes, naturally I wasn't using the nixpkgs pin I thought I was | 17:50:10 |
chreekat | lo, that wasn't the problem | 17:50:41 |
chreekat | 854b5340529bef34fe98b8ed91eff95ee5bf03fd , expected tls-1.8.0, got tls-1.6.0 | 17:56:02 |
chreekat | probably still getting the wrong nixpkgs pin somehow, but I don't know how | 17:56:44 |
chreekat | ahh, it's a boot thingy isn't it | 17:58:01 |
chreekat | er, no, but another package require <1.8 | 17:59:00 |
chreekat | so forcing 1.8 doesn't work, which is fine, because I should probably understand why it's not 1.8 in the first place | 17:59:17 |
chreekat | not tonight though! | 17:59:28 |
hellwolf | I just fixed the echidna build | 20:49:42 |
hellwolf | am I in time for the next haskell-updates, still? | 20:49:55 |
hellwolf | oh, haskell-updates is moving to 9.8 | 21:23:26 |
hellwolf | that breaks hevm | 21:23:30 |
hellwolf | https://github.com/NixOS/nixpkgs/pull/376526/files | 22:20:34 |
| 25 Jan 2025 |
hellwolf | when I use haskellPackages.mkDerivation, I can't override nativeBuildInputs, where I want to add makeWrapper | 12:22:31 |
hellwolf | what's the best practice you recommend me to do here? | 12:22:41 |
hellwolf | I could wrap the derivation in another std derivation where I do wrapProgram. But I am not sure if that's the best approach. | 12:23:06 |
hellwolf | looking into pkgs/development/haskell-modules/generic-builder.nix, it seems to me this is the best way:
executableToolDepends = [
makeWrapper
];
| 12:26:43 |
hellwolf | * looking into pkgs/development/haskell-modules/generic-builder.nix, it seems to me this is the best way:
executableToolDepends = [
makeWrapper
];
Then I can do wrapProgram in postInstall
| 12:27:05 |
Collin Arnett | This might be a really dumb idea but I was wondering what the best way would be to go about calling a nix flake from haskell. I have a test suite that requires some rather large files that are needed for testing and I would like the lifecycle of those files to be managed by nix. Ideally, the haskell code could resolve the path of the files I'm looking for during the test and nix could handle the evaluation if necessary. Nix managing these filles would be far nicer than haskell or manual management since if the file does not exist it can be fetched and stored lazily, only being cleaned up on GC.
The most bruteforce and straight forward way of doing this would be to drive the nix command to build the target, then parse the nix output for the resulting path. Is there some haskell package that has a better orchestration interface for Nix like I'm describing, should I just move forward with bruteforce method or is there some sort of really obvious way of doing what I'm asking? | 23:38:25 |
| 26 Jan 2025 |
Collin Arnett | This seems pretty nice https://hackage.haskell.org/package/hercules-ci-cnix-expr although undocumented. | 00:25:52 |
| @vigress9:matrix.org changed their profile picture. | 05:04:59 |
| @vigress9:matrix.org removed their profile picture. | 05:05:05 |
maralorn | @collinarnett:matrix.org I would pass in the files via environment variable and set that variable in the nix derivation for the testPhase and in the nix shell. | 09:56:46 |