Usually when you want to build a normal haskell project with nix, one would have as a starting point
der = pkgs.haskell.packages."${compiler}".callCabal2nix name src { };
Now if that project can be compiled with different cabal flags, which in turn require different dependencies, like in a cabal file one has
if flag(SomeFlag)
build-depends: pacakgename >= 0.5.1 && <0.6
then the starting point can be created with
der = pkgs.haskell.packages."${compiler}".callCabal2nixWithOptions name src "-f SomeFlag" { }
which creates the correct derivation (i.e includes the correct build dependencies)
Is there any way to specify that special flag, not on the build stage but on the derivation creation stage?
Is cabal2nix used internally and is it possible to pass down to it -f flag?
Without this, while the correct flag is passed at the build stage, the error i get is
Setup: Encountered missing or private dependencies:
Usually when you want to build a normal haskell project with nix, one would have as a starting point
Now if that project can be compiled with different cabal flags, which in turn require different dependencies, like in a cabal file one has
then the starting point can be created with
which creates the correct derivation (i.e includes the correct build dependencies)
Is there any way to specify that special flag, not on the build stage but on the derivation creation stage? Is cabal2nix used internally and is it possible to pass down to it
-f
flag?Without this, while the correct flag is passed at the build stage, the error i get is
Setup: Encountered missing or private dependencies:
Thank you