| 15 Dec 2024 |
alexfmpe | Because it only became a de facto dependency after you activated the config that declared it | 18:53:42 |
alexfmpe | So I'd need to build twice. One to switch to a new dep and another to use it | 18:54:05 |
alexfmpe | Found this out the hard way when trying to do some trivial edit months after and now being unable to build | 18:55:24 |
alexfmpe | Because the first activation had put me on a newer nixpkgs but not yet tried to build | 18:56:03 |
sterni (he/him) | https://hydra.nixos.org/eval/1810504 | 19:06:25 |
@megmug:matrix.org | alexfmpe: I tried out direnv and it works now - thank you! | 19:45:22 |
| 16 Dec 2024 |
| @feet-wind:matrix.org removed their display name feet-wind. | 05:36:02 |
| @feet-wind:matrix.org left the room. | 05:36:05 |
| dithpri joined the room. | 18:29:13 |
hellwolf | 9️⃣🔹1️⃣2️⃣ | 20:58:24 |
hellwolf | 🎄 | 20:58:48 |
sterni (he/him) | I'll push that tomorrow I think | 22:07:48 |
sterni (he/him) | Hadrian has weird bounds issues again | 22:07:53 |
hellwolf | s/sterni/santa/ | 22:17:12 |
| 17 Dec 2024 |
iqubic (she/her) | So, I'm using the following shell.nix for a a Haskell project of mine. The project is my Advent of Code solutions. This is using using cabal2nix to fetch the dependencies. I would like to use the Hackage package sbv in this project, however the latest version of sbv in Nixpkgs is 10.2, which is refusing to build. Hackage shows that later versions of the package, like 11.0, do exist. Is there some way I can modify my shell.nix to get a newer version of this package?
{ pkgs ? import <nixpkgs> {} }:
let
src = pkgs.nix-gitignore.gitignoreSource [] ./.;
myPkg = pkgs.haskellPackages.callCabal2nix "aoc24" src {};
in
pkgs.stdenv.mkDerivation {
name = "aoc-shell";
buildInputs = [
myPkg.env.nativeBuildInputs
pkgs.haskell-language-server
pkgs.cabal-install
pkgs.hlint
];
}
| 07:39:13 |
maralorn | "Refusing to build"? | 07:40:40 |
iqubic (she/her) | It's marked as broken. | 07:41:44 |
iqubic (she/her) | https://dpaste.com/7KUW6R7PA | 07:41:45 |
iqubic (she/her) | So Nix is refusing to evaluate it. | 07:42:03 |
maralorn | Well disabling that broken flag is probably a slight bit easier than swapping for a newer version. | 07:43:33 |
iqubic (she/her) | How can I do that? | 07:44:01 |
maralorn | Eitherway you will need to apply an overlay to pkgs.haskellPackages in line 4. | 07:44:46 |
iqubic (she/her) | That sounds a bit tricky. | 07:45:29 |
maralorn | It's not so hard if you have an example. Sadly I am on my phone and I have to run. | 07:47:38 |
iqubic (she/her) | I see. | 07:47:45 |
iqubic (she/her) | I might be able to find an example in an older project of mine. | 07:47:56 |
iqubic (she/her) | Nope... Not finding any examples in my past projects. | 07:52:33 |
linj |
overlays.default = final: prev: {
haskellPackages = prev.haskellPackages.override (args: {
overrides = final.lib.composeExtensions args.overrides (
let
hlib = final.haskell.lib.compose;
in
hfinal: hprev: {
hid-examples =
let
# filter out haskell-unrelated files to avoid unnecessary rebuilds
src = builtins.path {
path = ./.;
# NOTE setting name is important because the default one contains
# the store path of this flake, which defeats the motivation
name = "source";
filter =
path: type:
!builtins.elem (builtins.baseNameOf path) [
"flake.nix"
"flake.lock"
".envrc"
];
};
in
hfinal.callCabal2nix "hid-examples" src { };
colonnade = final.lib.pipe hprev.colonnade [
hlib.markUnbroken
(hlib.overrideCabal (args': {
# https://github.com/byteverse/colonnade/issues/31
doCheck = if args'.version == "1.2.0.2" then false else true;
}))
];
streaming-utils = final.lib.pipe hprev.streaming-utils [
hlib.markUnbroken
(hlib.overrideCabal (args': {
# Error: Setup: Encountered missing or private dependencies:
# resourcet >1.0 && <1.3
jailbreak = if args'.version == "0.2.5.0" then true else false;
}))
];
}
);
});
};
| 07:56:52 |
linj | *
overlays.default = final: prev: {
haskellPackages = prev.haskellPackages.override (args: {
overrides = final.lib.composeExtensions args.overrides (
let
hlib = final.haskell.lib.compose;
in
hfinal: hprev: {
colonnade = final.lib.pipe hprev.colonnade [
hlib.markUnbroken
(hlib.overrideCabal (args': {
# https://github.com/byteverse/colonnade/issues/31
doCheck = if args'.version == "1.2.0.2" then false else true;
}))
];
streaming-utils = final.lib.pipe hprev.streaming-utils [
hlib.markUnbroken
(hlib.overrideCabal (args': {
# Error: Setup: Encountered missing or private dependencies:
# resourcet >1.0 && <1.3
jailbreak = if args'.version == "0.2.5.0" then true else false;
}))
];
}
);
});
};
| 07:57:19 |
linj | *
final: prev: {
haskellPackages = prev.haskellPackages.override (args: {
overrides = final.lib.composeExtensions args.overrides (
let
hlib = final.haskell.lib.compose;
in
hfinal: hprev: {
colonnade = final.lib.pipe hprev.colonnade [
hlib.markUnbroken
(hlib.overrideCabal (args': {
# https://github.com/byteverse/colonnade/issues/31
doCheck = if args'.version == "1.2.0.2" then false else true;
}))
];
streaming-utils = final.lib.pipe hprev.streaming-utils [
hlib.markUnbroken
(hlib.overrideCabal (args': {
# Error: Setup: Encountered missing or private dependencies:
# resourcet >1.0 && <1.3
jailbreak = if args'.version == "0.2.5.0" then true else false;
}))
];
}
);
});
};
| 07:58:03 |