Closed idontgetoutmuch closed 11 months ago
Hi @idontgetoutmuch , I am not quite sure what the currently standard/in-vogue way of packaging Haskell libraries using Nix is, but you can see my attempt on the branch/PR referenced above. Let me know if that works for your platform (darwin/aarch64, as I see above).
$ nix-shell -p stack
$ stack build
The above worked successfully for me on x86-linux.
[nix-shell:~/Frames-beam]$ stack build
stack build
No setup information found for ghc-8.2.2 on your platform.
This probably means a GHC bindist has not yet been added for OS key 'macosx-aarch64'.
Supported versions: ghc-8.10.5, ghc-8.10.6, ghc-8.10.7, ghc-9.0.2, ghc-9.2.1, ghc-9.2.2, ghc-9.2.3, ghc-9.2.4, ghc-9.2.5, ghc-9.2.6, ghc-9.2.7, ghc-9.2.8, ghc-9.4.1, ghc-9.4.2, ghc-9.4.3, ghc-9.4.4, ghc-9.4.5, ghc-9.6.1, ghc-9.6.2
Which branch should I be on?
I tried this which at least allowed me to try building
let
myHaskellPackageOverlay = self: super: {
myHaskellPackages = super.haskellPackages.override {
overrides = hself: hsuper: rec {
htoml = super.haskell.lib.dontCheck (hself.callCabal2nixWithOptions "htoml" (builtins.fetchGit {
url = "https://github.com/mirokuratczyk/htoml";
rev = "33971287445c5e2531d9605a287486dfc3cbe1da";
}) "" { });
};
};
};
in
{ nixpkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixpkgs-22.05-darwin.tar.gz")
{
overlays = [ myHaskellPackageOverlay ];
config.allowBroken = true;
}
}:
let
pkgs = nixpkgs;
haskellDeps = ps: with ps; [
base
cassava
hasql
http-client
http-client-tls
http-conduit
microlens
path
path-io
pipes
postgresql-binary
process
unix-compat
vinyl
xlsx
zip
katip
Frames
bytestring
conduit
hasql
hasql-streams-conduit
hasql-streams-pipes
hasql-streams-streaming
hasql-streams-streamly
hasql-th
hasql-transaction
hasql-transaction-io
mtl
optparse-applicative
pipes
rel8
resourcet
safe-exceptions
streaming
streamly
text
unliftio-core
time
finite-typelits
lifted-base
indexed-list-literals
pqueue
some
sop-core
type-equality
vector-sized
generics-sop
constraints
beam-core
constraints-extras
dependent-sum
dependent-map
beam-migrate
beam-postgres
];
in
pkgs.stdenv.mkDerivation {
name = "rOnly";
buildInputs = [
pkgs.libintlOrEmpty
(pkgs.myHaskellPackages.ghcWithPackages haskellDeps)
pkgs.darwin.apple_sdk.frameworks.Cocoa
];
}
But got the following compiler errors
[4 of 6] Compiling Frames.SQL.Beam.Postgres.Query ( src/Frames/SQL/Beam/Postgres/Query.hs, /Users/dom/Frames-beam/dist-newstyle/build/aarch64-osx/ghc-9.0.2/Frames-beam-0.2.0.0/build/Frames/SQL/Beam/Postgres/Query.o, /Users/dom/Frames-beam/dist-newstyle/build/aarch64-osx/ghc-9.0.2/Frames-beam-0.2.0.0/build/Frames/SQL/Beam/Postgres/Query.dyn_o )
src/Frames/SQL/Beam/Postgres/Query.hs:38:18: error:
• Couldn't match type ‘Postgres’ with ‘PgSelectSyntax’
Expected: Q PgSelectSyntax b s (a (QExpr PgExpressionSyntax s))
Actual: Q Postgres b s (a (QExpr Postgres s))
• In the expression: all_ (tbl db)
In an equation for ‘allRows’: allRows tbl db = all_ (tbl db)
|
38 | allRows tbl db = all_ (tbl db)
| ^^^^^^^^^^^^^
src/Frames/SQL/Beam/Postgres/Query.hs:52:3: error:
• Couldn't match type ‘PgExpressionSyntax’ with ‘PgSelectSyntax’
Expected: Q PgSelectSyntax b s (a (QExpr PgExpressionSyntax s))
Actual: Q PgExpressionSyntax b s (a (QExpr PgExpressionSyntax s))
• In the expression: filter_ (filterLambda) (allRows tbl db)
In an equation for ‘allRowsWhere’:
allRowsWhere tbl db filterLambda
= filter_ (filterLambda) (allRows tbl db)
|
52 | filter_ (filterLambda) (allRows tbl db)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/Frames/SQL/Beam/Postgres/Query.hs:52:27: error:
• Couldn't match type ‘PgSelectSyntax’ with ‘PgExpressionSyntax’
Expected: Q PgExpressionSyntax b s (a (QExpr PgExpressionSyntax s))
Actual: Q PgSelectSyntax b s (a (QExpr PgExpressionSyntax s))
• In the second argument of ‘filter_’, namely ‘(allRows tbl db)’
In the expression: filter_ (filterLambda) (allRows tbl db)
In an equation for ‘allRowsWhere’:
allRowsWhere tbl db filterLambda
= filter_ (filterLambda) (allRows tbl db)
|
52 | filter_ (filterLambda) (allRows tbl db)
| ^^^^^^^^^^^^^^
I wonder if you tried building the branch update-lts
? That pins the
specific version of dependencies and GHC (which are somewhat dated by now).
Let me know if/how this branch works on your side.
On Fri, Jul 7, 2023 at 10:40 AM idontgetoutmuch @.***> wrote:
I tried this which at least allowed me to try building
let
myHaskellPackageOverlay = self: super: { myHaskellPackages = super.haskellPackages.override { overrides = hself: hsuper: rec { htoml = super.haskell.lib.dontCheck (hself.callCabal2nixWithOptions "htoml" (builtins.fetchGit { url = "https://github.com/mirokuratczyk/htoml"; rev = "33971287445c5e2531d9605a287486dfc3cbe1da"; }) "" { }); }; }; };
in
{ nixpkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixpkgs-22.05-darwin.tar.gz") { overlays = [ myHaskellPackageOverlay ]; config.allowBroken = true; } }:
let
pkgs = nixpkgs;
haskellDeps = ps: with ps; [ base cassava hasql http-client http-client-tls http-conduit microlens path path-io pipes postgresql-binary process unix-compat vinyl xlsx zip
katip Frames bytestring conduit hasql hasql-streams-conduit hasql-streams-pipes hasql-streams-streaming hasql-streams-streamly hasql-th hasql-transaction hasql-transaction-io mtl optparse-applicative pipes rel8 resourcet safe-exceptions streaming streamly text unliftio-core time finite-typelits lifted-base indexed-list-literals pqueue some sop-core type-equality vector-sized generics-sop constraints beam-core constraints-extras dependent-sum dependent-map beam-migrate beam-postgres
];
in
pkgs.stdenv.mkDerivation { name = "rOnly";
buildInputs = [ pkgs.libintlOrEmpty (pkgs.myHaskellPackages.ghcWithPackages haskellDeps) pkgs.darwin.apple_sdk.frameworks.Cocoa ]; }
But got the following compiler errors
[4 of 6] Compiling Frames.SQL.Beam.Postgres.Query ( src/Frames/SQL/Beam/Postgres/Query.hs, /Users/dom/Frames-beam/dist-newstyle/build/aarch64-osx/ghc-9.0.2/Frames-beam-0.2.0.0/build/Frames/SQL/Beam/Postgres/Query.o, /Users/dom/Frames-beam/dist-newstyle/build/aarch64-osx/ghc-9.0.2/Frames-beam-0.2.0.0/build/Frames/SQL/Beam/Postgres/Query.dyn_o )
src/Frames/SQL/Beam/Postgres/Query.hs:38:18: error: • Couldn't match type ‘Postgres’ with ‘PgSelectSyntax’ Expected: Q PgSelectSyntax b s (a (QExpr PgExpressionSyntax s)) Actual: Q Postgres b s (a (QExpr Postgres s)) • In the expression: all (tbl db) In an equation for ‘allRows’: allRows tbl db = all (tbl db) | 38 | allRows tbl db = all_ (tbl db) | ^^^^^^^^^^^^^
src/Frames/SQL/Beam/Postgres/Query.hs:52:3: error: • Couldn't match type ‘PgExpressionSyntax’ with ‘PgSelectSyntax’ Expected: Q PgSelectSyntax b s (a (QExpr PgExpressionSyntax s)) Actual: Q PgExpressionSyntax b s (a (QExpr PgExpressionSyntax s)) • In the expression: filter (filterLambda) (allRows tbl db) In an equation for ‘allRowsWhere’: allRowsWhere tbl db filterLambda = filter (filterLambda) (allRows tbl db) | 52 | filter_ (filterLambda) (allRows tbl db) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/Frames/SQL/Beam/Postgres/Query.hs:52:27: error: • Couldn't match type ‘PgSelectSyntax’ with ‘PgExpressionSyntax’ Expected: Q PgExpressionSyntax b s (a (QExpr PgExpressionSyntax s)) Actual: Q PgSelectSyntax b s (a (QExpr PgExpressionSyntax s)) • In the second argument of ‘filter’, namely ‘(allRows tbl db)’ In the expression: filter (filterLambda) (allRows tbl db) In an equation for ‘allRowsWhere’: allRowsWhere tbl db filterLambda = filter (filterLambda) (allRows tbl db) | 52 | filter (filterLambda) (allRows tbl db) | ^^^^^^^^^^^^^^
— Reply to this email directly, view it on GitHub https://github.com/gagandeepb/Frames-beam/issues/23#issuecomment-1625060307, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKMPJVBBGLMD3GBQRNRMFLXO7DO5ANCNFSM6AAAAAAY5Q7GSA . You are receiving this because you commented.Message ID: @.***>
@idontgetoutmuch Closing this one. From my side, https://github.com/gagandeepb/Frames-beam/pull/24 should fix this.