| 10 Dec 2025 |
iopq | how do I do that | 14:04:18 |
maralorn | https://nix.dev/reference/pinning-nixpkgs.html | 14:20:02 |
iqubic (she/her) | Is it possible for me to just mark this as unbroken and also skip the tests too? | 16:20:17 |
iopq | I use stack build, how do I pin a nixpkgs version while doing that | 16:21:47 |
maralorn | Yes, just apply both functions in sequence. | 16:31:12 |
iqubic (she/her) | Got it. | 16:31:24 |
iqubic (she/her) | Lets see if this works. | 16:31:29 |
maralorn | Oh, you mean you are using the stack nix integration? | 16:31:47 |
maralorn | I think stack tries to load the environment from a shell.nix in the same dir? | 16:32:08 |
maralorn | So if you pin nixpkgs in that shell.nix it might work? But better double check this via looking into the stack documentation. | 16:32:34 |
iqubic (she/her) | If it doesn't I have one more thing to try. I know that my main NixOS config is building the latest version of XMonad from the Hackage, and I can just modify that to build sbv | 16:32:40 |
iqubic (she/her) | * If it doesn't I have one more thing to try. I know that my main NixOS config is building the latest version of XMonad from the Hackage, and I can just modify that to build the actual latest sbv | 16:32:57 |
iopq | there is no shell.nix in that folder though | 16:33:01 |
maralorn | Then create one? But it might just not work because I am not a stack user and haven’t memorized the documentation. | 16:34:16 |
iqubic (she/her) | maralorn: This seems to be working for me:
GNU nano 8.7 shell.nix
{ pkgs ? import <nixpkgs> {} }:
let
src = pkgs.nix-gitignore.gitignoreSource [] ./.;
unbrokenSbv = pkgs.haskell.lib.compose.unmarkBroken pkgs.haskell.packages.ghc912.sbv_12_2;
myPkg = pkgs.haskell.packages.ghc912.callCabal2nix "aoc25" src { sbv = pkgs.haskell.lib.compose.dontCheck unbro>
in
pkgs.stdenv.mkDerivation {
name = "aoc-shell";
buildInputs = [
myPkg.env.nativeBuildInputs
pkgs.cabal-install
pkgs.haskell.packages.ghc912.haskell-language-server
pkgs.z3
];
}
| 16:40:11 |
iqubic (she/her) | * maralorn: This seems to be working for me:
{ pkgs ? import <nixpkgs> {} }:
let
src = pkgs.nix-gitignore.gitignoreSource [] ./.;
unbrokenSbv = pkgs.haskell.lib.compose.unmarkBroken pkgs.haskell.packages.ghc912.sbv_12_2;
myPkg = pkgs.haskell.packages.ghc912.callCabal2nix "aoc25" src { sbv = pkgs.haskell.lib.compose.dontCheck unbro>
in
pkgs.stdenv.mkDerivation {
name = "aoc-shell";
buildInputs = [
myPkg.env.nativeBuildInputs
pkgs.cabal-install
pkgs.haskell.packages.ghc912.haskell-language-server
pkgs.z3
];
}
| 16:40:26 |
iqubic (she/her) | maralorn: And my solution to the Advent of Code puzzle last night was correct. | 16:54:01 |
iqubic (she/her) | When I built with tests, about 100 out of 80,000 failed. I guess that's why it's broken. | 16:54:28 |
iqubic (she/her) | maralorn: Thanks for your help. I'll be going now! | 17:07:38 |
peddie | last I checked, the sbv tests failed because they are golden output tests and when nixpkgs runs them, it invokes the smt solver by its full path rather than just by executable name, so the exact output doesn't match? not sure how or whether this can be resolved. but I bet the tests are otherwise ok | 23:20:42 |
| 11 Dec 2025 |
andromeda | cabal2nix is to me actually quite pleasant | 05:25:53 |
andromeda | so in Setup.hs, when I need to locate the Wayland protocols, I'm thinking I have a cabal flag to use Nix. In the Setup.hs file, if this nix flag is flown, the protocols will be found in the wayland-protocols nixpkg. Otherwise, they will be found in the 'normal' place. Does that track? | 05:52:59 |
maralorn | custom setup.hs is not very popular | 08:35:48 |
maralorn | Would probably be better if there were a proper way to discover Wayland-protocols but I have no clue if there is | 08:36:45 |
maralorn | I.g. if it works it works | 08:37:14 |
magic_rb | Please dont call nix in setup.hs, you need to somehow get it in via env var | 08:38:39 |
magic_rb | Then you dont need a flag, if set NIX_WAYLAND_PROTOCOLS then | 08:38:57 |
magic_rb | Call nix in setup.hs will make it impossible to build in a nix sandbox without the recursive-nix feature | 08:39:47 |
magic_rb | * Calling nix in setup.hs will make it impossible to build in a nix sandbox without the recursive-nix feature | 08:40:31 |
magic_rb | Or some other container/vm fuckery | 08:40:40 |