| 10 Dec 2025 |
toonn | (Highly recommend Haskell.nix for this use case.) | 10:14:49 |
maralorn | I don’t think I agree. 😄 | 10:22:45 |
iqubic (she/her) | maralorn: No. None of the other packages I'm requiring in my Cabal file have sbv as a dependency. It's a top-level dependency, and not a transitive dependency. | 10:44:45 |
iqubic (she/her) | How would I use that in my dev environment? I'm using callCabal2Nix, so it might be a bit hard to override this. | 10:45:27 |
maralorn | Redacted or Malformed Event | 10:59:07 |
maralorn |
- Figure out which package there is. e.g. if your version of nixpkgs has sbv_13_0 or sbv_13_3.
| 11:00:09 |
maralorn |
- adapt line 4 like this
myPkg = pkgs.haskell.packages.ghc912.callCabal2nix "aoc25" src { sbv = pkgs.haskell.packages.ghc912.sbv_13_3; }
| 11:00:53 |
maralorn | If you can’t find an sbv_x_y attribute to your liking you can instead use callHackage and if that doesn’t work callHackageDirect. Both are documented in the nixpkgs manual. | 11:01:49 |
iqubic (she/her) | Using pkgs.haskell.packages.ghc912.sbv_13_3 isn't working.
LATITUDE-NIXOS hs/aoc25 » nix-shell 1 ↵
fetching path input 'path:/nix/store/3w2nr2aq2gp76nb6lh1alx6h10mwvp5d-source'
error:
… while evaluating an expression to select 'drvPath' on it
at «internal»:1:552:
… while evaluating strict
at «internal»:1:552:
(stack trace truncated; use '--show-trace' to show the full trace)
error: attribute 'outPath' missing
at /nix/store/3w2nr2aq2gp76nb6lh1alx6h10mwvp5d-source/lib/deprecated/misc.nix:253:19:
252| startSet = map (x: {
253| key = x.outPath;
| ^
254| val = x;
note: trace involved the following derivations:
derivation 'aoc-shell
| 11:07:12 |
maralorn | That error message confuses me. | 11:08:10 |
iqubic (she/her) | Why? | 11:08:27 |
maralorn | Because it is not "has no attribute sbv_13_3". | 11:09:07 |
maralorn | You can find possible sbv attributes by launching nix repl binding pkgs = import <nixpkgs> {} and then doing tabcompletion. | 11:10:53 |
iqubic (she/her) | Oh... I see what the issue is.. | 11:15:39 |
iqubic (she/her) | { pkgs ? import <nixpkgs> {} }:
let
src = pkgs.nix-gitignore.gitignoreSource [] ./.;
newSbv = { sbv = pkgs.haskell.packages.ghc912.sbv_12_2; };
myPkg = pkgs.haskell.packages.ghc912.callCabal2nix "aoc25" src { sbv = newSbv; };
in
pkgs.stdenv.mkDerivation {
name = "aoc-shell";
buildInputs = [
myPkg.env.nativeBuildInputs
pkgs.cabal-install
pkgs.haskell.packages.ghc912.haskell-language-server
# pkgs.z3
];
}
| 11:15:49 |
| @felineterrorist:matrix.org left the room. | 11:16:09 |
iqubic (she/her) | Extra set of brackets in the declaration of newSbv | 11:16:09 |
iqubic (she/her) | Even after fixing that, sbv is still marked as broken... | 11:17:29 |
iqubic (she/her) | maralorn: I have no clue why this is marked as broken... | 11:22:07 |
iqubic (she/her) | I did the tab completion ting to get a valid thing... | 11:22:28 |
maralorn | iqubic (she/her): Im the broadest terms: sbv is probably marked broken because it has no maintainer in nixkpgs. | 11:25:05 |
maralorn | And I don’t know what the specific reason is. | 11:25:40 |
maralorn | It is probably noted in a comment in a file called broken.yaml in nixpkgs. | 11:26:07 |
maralorn | But anyway you can remove the broken flag and see what happens. | 11:26:36 |
maralorn | ... sbv = pkgs.haskell.lib.compose.unmarkBroken pkgs.… | 11:27:14 |
maralorn | If you are really lucky it just builds. | 11:27:27 |
maralorn | If you are medium lucky it builds after you apply pkgs.haskell.lib.compose.doJailbreak or pkgs.haskell.lib.compose.dontCheck to the package. | 11:28:12 |
maralorn | If you are not lucky none of that helps and then we get to the reason why toonn recommendation might not be that bad after all. 😄 | 11:29:03 |
maralorn | I mean every package is fixable but the effort can get larger.^^ | 11:29:34 |
toonn | My personal preference for Haskell.nix is because it sticks to Cabal's dependency model, which is constraint resolution. The Nixpkgs Haskell infra is for when you want to package something for Nixpkgs or when you really don't want to every build your dependencies in exchange for dealing with all the version incompatibilities that implies. IMO, reasonable people can have differing opinions. | 11:44:46 |