Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use overlays? #732

Open
asheshambasta opened this issue Jul 13, 2021 · 1 comment
Open

How to use overlays? #732

asheshambasta opened this issue Jul 13, 2021 · 1 comment

Comments

@asheshambasta
Copy link

asheshambasta commented Jul 13, 2021

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:

  • fht-data: implement things that can be compiled with GHCJS (datatypes etc)
  • fht-frontend: Reflex part (front)
  • fht-base: Also shared types
  • fht-api: Servant API endpoints
  • fht-backend: backend

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants