reflex-frp / reflex-platform

A curated package set and set of tools that let you build Haskell packages so they can run on a variety of platforms. reflex-platform is built on top of the nix package manager.
https://reflex-frp.org
BSD 3-Clause "New" or "Revised" License
719 stars 164 forks source link

How to use overlays? #732

Open asheshambasta opened 3 years ago

asheshambasta commented 3 years ago

Hello all, I've been using reflex-platform for a side project, at the following version:

  homepage: https://reflex-frp.org
  url: https://github.com/reflex-frp/reflex-platform/archive/8d421e9e06b0477cbc065346aaf596c9db6cc387.tar.gz
  owner: reflex-frp
  branch: rc/0.6.0.0
  url_template: https://github.com/<owner>/<repo>/archive/<rev>.tar.gz
  repo: reflex-platform
  type: tarball
  sha256: 06fy5b0mk5k2ps1h78yihf4j76cb855r86y9p4jv5d91nfyl2dck
  description: A curated package set and set of tools that let you build Haskell packages so they can run on a variety of platforms. reflex-platform is built on top of the nix package manager.
  rev: 8d421e9e06b0477cbc065346aaf596c9db6cc387

And I'm attempting to use custom packages like so.


The goal here is to be able to use custom-prelude as a dependency of fht-data and others. The structure is the following:


The issue is, having the custom-prelude overlay in nixpkgsOverlays makes no difference.

I get:

╰─$ nix-shell --run 'cabal repl fht-data'
error: anonymous function at /nix/store/5b7vvgla6jdb73hszr6dlp1sibhrpgaa-cabal2nix-fht-data/default.nix:1:1 called without required argument 'custom-prelude', at /nix/store/p3x4ha4dwj9agifi05wq0vf3m93p3vsx-source/pkgs/development/haskell-modules/make-package-set.nix:87:27
(use '--show-trace' to show detailed location information)

However, when I comment out this line I get a build error related to the custom-prelude package.

I'm a little confused on how to approach this: should a dependency be in the overrides set, or in overlays?

ali-abrar commented 3 months ago

Here's an example of overlays in use: https://github.com/obsidiansystems/obelisk/blob/master/default.nix#L23-L33