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

[SPIKE] Get cross-compilation working using iohk haskell.nix #764

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Materialize the nix plan
  • Loading branch information
avh4 committed Mar 23, 2022
commit d796bec53225eab23509eda804b4a2b31f0a15d9
74 changes: 74 additions & 0 deletions .plan.nix/avh4-lib.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{ system
, compiler
, flags
, pkgs
, hsPkgs
, pkgconfPkgs
, errorHandler
, config
, ... }:
{
flags = {};
package = {
specVersion = "2.4";
identifier = { name = "avh4-lib"; version = "0.0.0.1"; };
license = "BSD-3-Clause";
copyright = "See https://github.com/avh4/elm-format/blob/master/LICENSE";
maintainer = "gruen0aermel@gmail.com";
author = "Aaron VonderHaar";
homepage = "";
url = "";
synopsis = "Common code for haskell projects";
description = "";
buildType = "Simple";
isLocal = true;
};
components = {
"library" = {
depends = [
(hsPkgs."ansi-terminal" or (errorHandler.buildDepError "ansi-terminal"))
(hsPkgs."ansi-wl-pprint" or (errorHandler.buildDepError "ansi-wl-pprint"))
(hsPkgs."array" or (errorHandler.buildDepError "array"))
(hsPkgs."base" or (errorHandler.buildDepError "base"))
(hsPkgs."bimap" or (errorHandler.buildDepError "bimap"))
(hsPkgs."binary" or (errorHandler.buildDepError "binary"))
(hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring"))
(hsPkgs."containers" or (errorHandler.buildDepError "containers"))
(hsPkgs."directory" or (errorHandler.buildDepError "directory"))
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath"))
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl"))
(hsPkgs."process" or (errorHandler.buildDepError "process"))
(hsPkgs."relude" or (errorHandler.buildDepError "relude"))
(hsPkgs."text" or (errorHandler.buildDepError "text"))
];
buildable = true;
};
tests = {
"al-tests" = {
depends = [
(hsPkgs."ansi-terminal" or (errorHandler.buildDepError "ansi-terminal"))
(hsPkgs."ansi-wl-pprint" or (errorHandler.buildDepError "ansi-wl-pprint"))
(hsPkgs."array" or (errorHandler.buildDepError "array"))
(hsPkgs."base" or (errorHandler.buildDepError "base"))
(hsPkgs."bimap" or (errorHandler.buildDepError "bimap"))
(hsPkgs."binary" or (errorHandler.buildDepError "binary"))
(hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring"))
(hsPkgs."containers" or (errorHandler.buildDepError "containers"))
(hsPkgs."directory" or (errorHandler.buildDepError "directory"))
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath"))
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl"))
(hsPkgs."process" or (errorHandler.buildDepError "process"))
(hsPkgs."relude" or (errorHandler.buildDepError "relude"))
(hsPkgs."text" or (errorHandler.buildDepError "text"))
(hsPkgs."tasty" or (errorHandler.buildDepError "tasty"))
(hsPkgs."tasty-hspec" or (errorHandler.buildDepError "tasty-hspec"))
(hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit"))
];
build-tools = [
(hsPkgs.buildPackages.tasty-discover.components.exes.tasty-discover or (pkgs.buildPackages.tasty-discover or (errorHandler.buildToolDepError "tasty-discover:tasty-discover")))
];
buildable = true;
};
};
};
} // rec { src = (pkgs.lib).mkDefault ../avh4-lib; }
86 changes: 86 additions & 0 deletions .plan.nix/elm-format-lib.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{ system
, compiler
, flags
, pkgs
, hsPkgs
, pkgconfPkgs
, errorHandler
, config
, ... }:
{
flags = {};
package = {
specVersion = "2.4";
identifier = { name = "elm-format-lib"; version = "0.0.0.1"; };
license = "BSD-3-Clause";
copyright = "See https://github.com/avh4/elm-format/blob/master/LICENSE";
maintainer = "gruen0aermel@gmail.com";
author = "Aaron VonderHaar";
homepage = "";
url = "";
synopsis = "Common code used by elm-format and elm-refactor";
description = "";
buildType = "Simple";
isLocal = true;
};
components = {
"library" = {
depends = [
(hsPkgs."aeson" or (errorHandler.buildDepError "aeson"))
(hsPkgs."ansi-terminal" or (errorHandler.buildDepError "ansi-terminal"))
(hsPkgs."ansi-wl-pprint" or (errorHandler.buildDepError "ansi-wl-pprint"))
(hsPkgs."array" or (errorHandler.buildDepError "array"))
(hsPkgs."base" or (errorHandler.buildDepError "base"))
(hsPkgs."bimap" or (errorHandler.buildDepError "bimap"))
(hsPkgs."binary" or (errorHandler.buildDepError "binary"))
(hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring"))
(hsPkgs."containers" or (errorHandler.buildDepError "containers"))
(hsPkgs."directory" or (errorHandler.buildDepError "directory"))
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath"))
(hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl"))
(hsPkgs."optparse-applicative" or (errorHandler.buildDepError "optparse-applicative"))
(hsPkgs."process" or (errorHandler.buildDepError "process"))
(hsPkgs."relude" or (errorHandler.buildDepError "relude"))
(hsPkgs."text" or (errorHandler.buildDepError "text"))
(hsPkgs."avh4-lib" or (errorHandler.buildDepError "avh4-lib"))
(hsPkgs."elm-format-markdown" or (errorHandler.buildDepError "elm-format-markdown"))
];
buildable = true;
};
tests = {
"efl-tests" = {
depends = [
(hsPkgs."aeson" or (errorHandler.buildDepError "aeson"))
(hsPkgs."ansi-terminal" or (errorHandler.buildDepError "ansi-terminal"))
(hsPkgs."ansi-wl-pprint" or (errorHandler.buildDepError "ansi-wl-pprint"))
(hsPkgs."array" or (errorHandler.buildDepError "array"))
(hsPkgs."base" or (errorHandler.buildDepError "base"))
(hsPkgs."bimap" or (errorHandler.buildDepError "bimap"))
(hsPkgs."binary" or (errorHandler.buildDepError "binary"))
(hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring"))
(hsPkgs."containers" or (errorHandler.buildDepError "containers"))
(hsPkgs."directory" or (errorHandler.buildDepError "directory"))
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath"))
(hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl"))
(hsPkgs."optparse-applicative" or (errorHandler.buildDepError "optparse-applicative"))
(hsPkgs."process" or (errorHandler.buildDepError "process"))
(hsPkgs."relude" or (errorHandler.buildDepError "relude"))
(hsPkgs."text" or (errorHandler.buildDepError "text"))
(hsPkgs."avh4-lib" or (errorHandler.buildDepError "avh4-lib"))
(hsPkgs."elm-format-markdown" or (errorHandler.buildDepError "elm-format-markdown"))
(hsPkgs."split" or (errorHandler.buildDepError "split"))
(hsPkgs."tasty" or (errorHandler.buildDepError "tasty"))
(hsPkgs."tasty-hspec" or (errorHandler.buildDepError "tasty-hspec"))
(hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit"))
(hsPkgs."elm-format-test-lib" or (errorHandler.buildDepError "elm-format-test-lib"))
];
build-tools = [
(hsPkgs.buildPackages.tasty-discover.components.exes.tasty-discover or (pkgs.buildPackages.tasty-discover or (errorHandler.buildToolDepError "tasty-discover:tasty-discover")))
];
buildable = true;
};
};
};
} // rec { src = (pkgs.lib).mkDefault ../elm-format-lib; }
37 changes: 37 additions & 0 deletions .plan.nix/elm-format-markdown.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{ system
, compiler
, flags
, pkgs
, hsPkgs
, pkgconfPkgs
, errorHandler
, config
, ... }:
{
flags = {};
package = {
specVersion = "2.4";
identifier = { name = "elm-format-markdown"; version = "0.0.0.1"; };
license = "BSD-3-Clause";
copyright = "See https://github.com/avh4/elm-format/blob/master/LICENSE";
maintainer = "gruen0aermel@gmail.com";
author = "Aaron VonderHaar";
homepage = "";
url = "";
synopsis = "Markdown parsing for Elm documentation comments";
description = "";
buildType = "Simple";
isLocal = true;
};
components = {
"library" = {
depends = [
(hsPkgs."base" or (errorHandler.buildDepError "base"))
(hsPkgs."containers" or (errorHandler.buildDepError "containers"))
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl"))
(hsPkgs."text" or (errorHandler.buildDepError "text"))
];
buildable = true;
};
};
} // rec { src = (pkgs.lib).mkDefault ../elm-format-markdown; }
67 changes: 67 additions & 0 deletions .plan.nix/elm-format-test-lib.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{ system
, compiler
, flags
, pkgs
, hsPkgs
, pkgconfPkgs
, errorHandler
, config
, ... }:
{
flags = {};
package = {
specVersion = "2.4";
identifier = { name = "elm-format-test-lib"; version = "0.0.0.1"; };
license = "BSD-3-Clause";
copyright = "See https://github.com/avh4/elm-format/blob/master/LICENSE";
maintainer = "gruen0aermel@gmail.com";
author = "Aaron VonderHaar";
homepage = "";
url = "";
synopsis = "Test helpers used by elm-format-tests and elm-refactor-tests";
description = "";
buildType = "Simple";
isLocal = true;
};
components = {
"library" = {
depends = [
(hsPkgs."base" or (errorHandler.buildDepError "base"))
(hsPkgs."containers" or (errorHandler.buildDepError "containers"))
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath"))
(hsPkgs."hspec-core" or (errorHandler.buildDepError "hspec-core"))
(hsPkgs."hspec-golden" or (errorHandler.buildDepError "hspec-golden"))
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl"))
(hsPkgs."split" or (errorHandler.buildDepError "split"))
(hsPkgs."tasty" or (errorHandler.buildDepError "tasty"))
(hsPkgs."tasty-hspec" or (errorHandler.buildDepError "tasty-hspec"))
(hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit"))
(hsPkgs."text" or (errorHandler.buildDepError "text"))
(hsPkgs."avh4-lib" or (errorHandler.buildDepError "avh4-lib"))
];
buildable = true;
};
tests = {
"elm-format-test-lib-tests" = {
depends = [
(hsPkgs."base" or (errorHandler.buildDepError "base"))
(hsPkgs."containers" or (errorHandler.buildDepError "containers"))
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath"))
(hsPkgs."hspec-core" or (errorHandler.buildDepError "hspec-core"))
(hsPkgs."hspec-golden" or (errorHandler.buildDepError "hspec-golden"))
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl"))
(hsPkgs."split" or (errorHandler.buildDepError "split"))
(hsPkgs."tasty" or (errorHandler.buildDepError "tasty"))
(hsPkgs."tasty-hspec" or (errorHandler.buildDepError "tasty-hspec"))
(hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit"))
(hsPkgs."text" or (errorHandler.buildDepError "text"))
(hsPkgs."avh4-lib" or (errorHandler.buildDepError "avh4-lib"))
];
build-tools = [
(hsPkgs.buildPackages.tasty-discover.components.exes.tasty-discover or (pkgs.buildPackages.tasty-discover or (errorHandler.buildToolDepError "tasty-discover:tasty-discover")))
];
buildable = true;
};
};
};
} // rec { src = (pkgs.lib).mkDefault .././.././elm-format-test-lib; }
72 changes: 72 additions & 0 deletions .plan.nix/elm-format.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{ system
, compiler
, flags
, pkgs
, hsPkgs
, pkgconfPkgs
, errorHandler
, config
, ... }:
{
flags = {};
package = {
specVersion = "2.4";
identifier = { name = "elm-format"; version = "0.8.5"; };
license = "BSD-3-Clause";
copyright = "See https://github.com/avh4/elm-format/blob/master/LICENSE";
maintainer = "gruen0aermel@gmail.com";
author = "Aaron VonderHaar";
homepage = "https://elm-lang.org";
url = "";
synopsis = "A source code formatter for Elm";
description = "A simple way to format your Elm code according to the official\nstyle guide.";
buildType = "Simple";
isLocal = true;
};
components = {
exes = {
"elm-format" = {
depends = [
(hsPkgs."aeson" or (errorHandler.buildDepError "aeson"))
(hsPkgs."ansi-wl-pprint" or (errorHandler.buildDepError "ansi-wl-pprint"))
(hsPkgs."base" or (errorHandler.buildDepError "base"))
(hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring"))
(hsPkgs."containers" or (errorHandler.buildDepError "containers"))
(hsPkgs."optparse-applicative" or (errorHandler.buildDepError "optparse-applicative"))
(hsPkgs."relude" or (errorHandler.buildDepError "relude"))
(hsPkgs."text" or (errorHandler.buildDepError "text"))
(hsPkgs."avh4-lib" or (errorHandler.buildDepError "avh4-lib"))
(hsPkgs."elm-format-lib" or (errorHandler.buildDepError "elm-format-lib"))
];
buildable = true;
};
};
tests = {
"elm-format-tests" = {
depends = [
(hsPkgs."aeson" or (errorHandler.buildDepError "aeson"))
(hsPkgs."ansi-wl-pprint" or (errorHandler.buildDepError "ansi-wl-pprint"))
(hsPkgs."base" or (errorHandler.buildDepError "base"))
(hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring"))
(hsPkgs."containers" or (errorHandler.buildDepError "containers"))
(hsPkgs."optparse-applicative" or (errorHandler.buildDepError "optparse-applicative"))
(hsPkgs."relude" or (errorHandler.buildDepError "relude"))
(hsPkgs."text" or (errorHandler.buildDepError "text"))
(hsPkgs."avh4-lib" or (errorHandler.buildDepError "avh4-lib"))
(hsPkgs."elm-format-lib" or (errorHandler.buildDepError "elm-format-lib"))
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl"))
(hsPkgs."tasty" or (errorHandler.buildDepError "tasty"))
(hsPkgs."tasty-hspec" or (errorHandler.buildDepError "tasty-hspec"))
(hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit"))
(hsPkgs."tasty-quickcheck" or (errorHandler.buildDepError "tasty-quickcheck"))
(hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck"))
(hsPkgs."quickcheck-io" or (errorHandler.buildDepError "quickcheck-io"))
(hsPkgs."bimap" or (errorHandler.buildDepError "bimap"))
(hsPkgs."cmark" or (errorHandler.buildDepError "cmark"))
(hsPkgs."elm-format-test-lib" or (errorHandler.buildDepError "elm-format-test-lib"))
];
buildable = true;
};
};
};
} // rec { src = (pkgs.lib).mkDefault ../.; }
13 changes: 9 additions & 4 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{ sources ? import ./nix/sources.nix { } }:

let
haskellNix = import sources.haskellNix { };
pkgs = import haskellNix.sources.nixpkgs-unstable haskellNix.nixpkgsArgs;
in pkgs.haskell-nix.project {
src = ./.;
compiler-nix-name = "ghc901";
}

pkgSet = pkgs.haskell-nix.mkCabalProjectPkgSet {
plan-pkgs = import ./pkgs.nix;
pkg-def-extras = [ ];
modules = [ ];
};

in pkgSet.config.hsPkgs
Loading