Reflex FRP is a composable, cross-platform functional reactive programming framework for Haskell. It allows you to build interactive components in pure functional style, working in harmony with es...
Packages specifically has some extra magic in it to do with Thunks getting properly handled. Overrides is for your usual dontCheck / jailbreak, callHackage, etc.
Like haskell.packages.ghc864.ghcWithPackages(ps: [ps.zlib ps.HsOpenSSL]) but for all the stuff that goes into the build across backend/frontend/common.
I believe the packages being different is something to do with making sure they are in the ghcid repl properly when unpacked. But that may be wrong. :slight_smile:
Packages specifically has some extra magic in it to do with Thunks getting properly handled. Overrides is for your usual dontCheck / jailbreak, callHackage, etc.
Did package that in the packages will be built using callCabal2nixin the directory that contains .cabal file? Or it will pick the default.nix if it is exists?
Reflex FRP is a composable, cross-platform functional reactive programming framework for Haskell. It allows you to build interactive components in pure functional style, working in harmony with es...
So the case that I am facing right now is I try to include hasktorch in my obelisk project (without obelisk, it builds fine). But I want to put it in the packages attribute. But, according to this https://github.com/hasktorch/hasktorch/tree/master/libtorch-ffi and this https://github.com/hasktorch/hasktorch/blob/master/nix/shared.nix#L40, I realized that I cannot rely only on hackGet. I already try to modifydefault.nixinside libtorch-ffi, but as I mentioned in my previous chat, when I build the project with nix-build -A ghc.backend, the default.nixwas ignored, and it uses libtorch-ffi.cabal to build the package.
I'm getting anonymus function at ... called without required argument c10. So what is my best option here? Since I still want to put libtorch-ffi in my package.
So the case that I am facing right now is I try to include hasktorch in my obelisk project (without obelisk, it builds fine). But I want to put it in the packages attribute. But, according to this https://github.com/hasktorch/hasktorch/tree/master/libtorch-ffi and this https://github.com/hasktorch/hasktorch/blob/master/nix/shared.nix#L40, I realized that I cannot rely only on hackGet. I already try to modifydefault.nixinside libtorch-ffi, but as I mentioned in my previous chat, when I build the project with nix-build -A ghc.backend, the default.nixwas ignored, and it uses libtorch-ffi.cabal to build the package.
I'm getting anonymus function at ... called without required argument c10. So what is my best option here? Since I still want to put libtorch-ffi in my package.
I think I finally able to build this library with obelisk. One thing that I notice (as for my reminder here) is that package and overrides attribute is tied together. what I did is I hackGet hasktorch, and since it fails some test, I put the package in overrides and put dontCheck to avoid the test.
I'm not sure how it works though. I thought that package and overrides will be evaluated together and package mentiond in package attribute can't be override anymore.
I have 2 problem when dealing with reflex-platform and obelisk:
when I use
reflex-platform.nixpkgs.haskellPackages
, it means that I use the ghc865 right? Because I can't see thehaskellPackages
mentioned anywhere in reflex-platform'sdefault.nix
. What I see is onlyghc
here https://github.com/reflex-frp/reflex-platform/blob/develop/default.nix#L192.When I put haskell package inside
are packages both in
packages
andoverrides
become accessible? How do I havehaskellPackages
contains those packages set?Packages specifically has some extra magic in it to do with Thunks getting properly handled. Overrides is for your usual dontCheck / jailbreak, callHackage, etc.
Ghc and ghcjs are both compilerWithPackages.
Like
haskell.packages.ghc864.ghcWithPackages(ps: [ps.zlib ps.HsOpenSSL])
but for all the stuff that goes into the build across backend/frontend/common.I believe the packages being different is something to do with making sure they are in the ghcid repl properly when unpacked. But that may be wrong. :slight_smile:
Did package that in the
packages
will be built usingcallCabal2nix
in the directory that contains.cabal
file? Or it will pick thedefault.nix
if it is exists?For example, the directory structure is:
and it seems using
hackGet
in thepackages
ignores thedefault.nix
Yeah, it does a callCabal2nix on it iirc.
Hackget itself doesn't do that, but something in obelisk does. Hackget is pretty simple and not magical: https://github.com/reflex-frp/reflex-platform/blob/develop/nixpkgs-overlays/hack-get/default.nix
I see. I have seen some of OS project which only using
hackGet
on all the package that goes intopackages
attribute like here: https://gitlab.com/obsidian.systems/kiln/blob/develop/tezos-bake-central/default.nix#L42So the case that I am facing right now is I try to include hasktorch in my obelisk project (without obelisk, it builds fine). But I want to put it in the
packages
attribute. But, according to this https://github.com/hasktorch/hasktorch/tree/master/libtorch-ffi and this https://github.com/hasktorch/hasktorch/blob/master/nix/shared.nix#L40, I realized that I cannot rely only onhackGet
. I already try to modifydefault.nix
inside libtorch-ffi, but as I mentioned in my previous chat, when I build the project withnix-build -A ghc.backend
, thedefault.nix
was ignored, and it useslibtorch-ffi.cabal
to build the package.I'm getting
anonymus function at ... called without required argument c10
. So what is my best option here? Since I still want to put libtorch-ffi in my package.I just realized that obelisk still uses ghc 8.4?
okay, I just realized I use obelisk
master
branch instead ofdevelop
branch. I write here for my self reminder.I always use the
develop
branch.And then switch over the skeleton to that of develop's skeleton.
Yeah, that is what I am missing until I see the
.obelisk/impl
folder in kiln package.I think I finally able to build this library with obelisk. One thing that I notice (as for my reminder here) is that
package
andoverrides
attribute is tied together. what I did is IhackGet
hasktorch, and since it fails some test, I put the package inoverrides
and putdontCheck
to avoid the test.I'm not sure how it works though. I thought that package and overrides will be evaluated together and package mentiond in
package
attribute can't be override anymore.