Skip to content

Commit

Permalink
Try #1641:
Browse files Browse the repository at this point in the history
  • Loading branch information
iohk-bors[bot] authored Sep 4, 2022
2 parents 1f3508b + 2611a66 commit 344e344
Show file tree
Hide file tree
Showing 171 changed files with 17,032 additions and 8,281 deletions.
2 changes: 1 addition & 1 deletion builder/hspkg-builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ let
||
# These are the dependencies of `Cabal`
!builtins.elem package.identifier.name
["nix-tools" "alex" "happy" "hscolour" "Cabal" "bytestring" "aeson" "time"
["nix-tools" "alex" "happy" "hscolour" "Cabal" "Cabal-syntax" "bytestring" "aeson" "time"
"filepath" "base-compat-batteries" "base-compat" "unix" "directory" "transformers"
"containers" "binary" "mtl" "text" "process" "parsec"];

Expand Down
12 changes: 8 additions & 4 deletions lib/call-cabal-project-to-nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ in
# any plutus-apps input being used for a
# package.
, evalPackages
, pkgconfSelector ? (_: [])
, ...
}@args:

Expand Down Expand Up @@ -167,6 +168,8 @@ let

index-state-pinned = index-state != null || cabalProjectIndexState != null;

pkgconfPkgs = import ./pkgconf-nixpkgs-map.nix pkgs;

in
assert (if index-state-found == null
then throw "No index state passed and none found in ${cabalProjectFileName}" else true);
Expand Down Expand Up @@ -329,14 +332,14 @@ let
# when `checkMaterialization` is set.
dummy-ghc-data =
let
materialized = ../materialized/dummy-ghc + "/${ghc.targetPrefix}${ghc.name}-${pkgs.stdenv.buildPlatform.system}";
materialized = ../materialized/dummy-ghc + "/${ghc.targetPrefix}${ghc.name}-${pkgs.stdenv.buildPlatform.system}"
+ pkgs.lib.optionalString (builtins.compareVersions ghc.version "8.10" < 0 && ghc.targetPrefix == "" && builtins.compareVersions pkgs.lib.version "22.05" < 0) "-old";
in pkgs.haskell-nix.materialize ({
sha256 = null;
sha256Arg = "sha256";
materialized = if __pathExists materialized
then materialized
else __trace ("WARNING: No materialized dummy-ghc-data for "
+ "${ghc.targetPrefix}${ghc.name}-${pkgs.stdenv.buildPlatform.system}.")
else __trace "WARNING: No materialized dummy-ghc-data. mkdir ${toString materialized}"
null;
reasonNotSafe = null;
} // pkgs.lib.optionalAttrs (checkMaterialization != null) {
Expand Down Expand Up @@ -463,7 +466,8 @@ let
} // pkgs.lib.optionalAttrs (checkMaterialization != null) {
inherit checkMaterialization;
}) (evalPackages.runCommand (nameAndSuffix "plan-to-nix-pkgs") {
nativeBuildInputs = [ nix-tools dummy-ghc dummy-ghc-pkg cabal-install evalPackages.rsync evalPackages.gitMinimal ];
nativeBuildInputs = [ nix-tools dummy-ghc dummy-ghc-pkg cabal-install evalPackages.rsync evalPackages.gitMinimal evalPackages.pkgconfig ];
buildInputs = pkgconfSelector pkgconfPkgs;
# Needed or stack-to-nix will die on unicode inputs
LOCALE_ARCHIVE = pkgs.lib.optionalString (evalPackages.stdenv.buildPlatform.libc == "glibc") "${evalPackages.glibcLocales}/lib/locale/locale-archive";
LANG = "en_US.UTF-8";
Expand Down
4 changes: 2 additions & 2 deletions lib/ghcjs-project.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
if (builtins.compareVersions ghcjsVersion "8.10.0.0" >= 0)
then pkgs.haskell-nix.tool compiler-nix-name "cabal" {
index-state = pkgs.haskell-nix.internalHackageIndexState;
version = "3.6.2.0";
version = "3.8.1.0";
materialized = ../materialized/ghcjs/cabal + "/${compiler-nix-name}";
}
else pkgs.haskell-nix.tool compiler-nix-name "cabal" {
Expand All @@ -48,7 +48,7 @@
# Cabal 3.2.1.0 no longer supports he mix of `cabal-version`,
# lack of `custom-setup` and `v1-install` used by ghcjs boot.
cabalProjectLocal = ''
constraints: Cabal <3.2.1.0
constraints: Cabal <3.2.1.0, Cabal-syntax <0
'';
materialized = ../materialized/ghcjs/cabal + "/${compiler-nix-name}";
}
Expand Down
3 changes: 2 additions & 1 deletion lib/pkgconf-nixpkgs-map.nix
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ pkgs:
"sctp" = [ pkgs."lksctp-tools" ]; # This is linux-specific, we should create a common attribute if we ever add sctp support for other systems.
"sdl2" = [ pkgs."SDL2" ];
"sndfile" = [ pkgs."libsndfile" ];
"sodium" = [ pkgs."libsodium" ];
"sodium" = [ pkgs."libsodium".dev ];
"libsodium" = [ pkgs."libsodium".dev ];
"sqlite3" = [ pkgs."sqlite" ];
"ssh2" = [ pkgs."libssh2" ];
"statgrab" = [ pkgs."libstatgrab" ];
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 344e344

Please sign in to comment.