New to nix. I’m trying to move my haskell project tinytools over to use nix. I have the following release.nix file
let
nixpkgs = import <nixpkgs> {};
compiler = "ghc96";
mypkgs = nixpkgs.pkgs.haskell.packages.${compiler}.override {
overrides = self: super: {
reflex-test-host = nixpkgs.pkgs.haskellPackages.callHackageDirect {
pkg = "reflex-test-host";
ver = "0.1.2.3";
sha256 = "9ee3ad9ac4fc58c6dcabcd9fbc6d109a51d8e86ba2682cee8367bc6b452f09ea";
} {};
reflex-vty = nixpkgs.pkgs.haskellPackages.callHackageDirect {
pkg = "reflex-vty";
ver = "0.5.1.0";
sha256 = "ff25d77e771a08214f7e4e699fc31e16a6406bce51d3f35515430b882caafebd";
} {};
tinytools = nixpkgs.pkgs.haskellPackages.callHackageDirect {
pkg = "tinytools";
ver = "0.1.0.7";
sha256 = "ff25d77e771a08214f7e4e699fc31e16a6406bce51d3f35515430b882caafebd";
} {};
};
};
in
mypkgs.callCabal2nix "tinytools-vty" (./.) { }
However, nix doesn’t seem to be fetching the overrides. Specifically, nix tries to build reflex-test-host-0.1.2.2 (as opposed to the override version 0.1.2.3) which will fail. I’m pretty sure it’s also not pulling the other dependencies listed as the hash for tinytools is incorrect and it did not complain about it.
I’ve tried a half dozen other slight variations thereof and continue running into the same issue. I don’t understand what I’m doing wrong. I’m following the guide here https://github.com/Gabriella439/haskell-nix/tree/main/project1
Anyone know how I might get this working?
Thanks in advance!
edit:
no matter what version I set for reflex-test-host in callHackageDirect, it outputs the following:
~/kitchen/faucet/tinytools-vty:potato$ nix-build release.nix
these 3 derivations will be built:
/nix/store/mhc9yrdj6y9pk1p2sv4wkvih9z97c6w7-reflex-test-host-0.1.2.2.drv
/nix/store/n03vcci91rxl8wr9qpn2gg50cb5jcnry-reflex-test-host-0.1.2.2.drv
/nix/store/21pbrc0hwkl4mp9qih3ric9ji3j7v0l0-tinytools-vty-0.1.0.7.drv
I do not understand why it keeps trying to build 0.1.2.2.
Actually I even tried removing all erefrences to reflex-test-host throughout my entire project and it’s still producing the same output