Skip to content

Commit

Permalink
rewrite rules for windows triple migration
Browse files Browse the repository at this point in the history
  • Loading branch information
angerman committed Feb 16, 2020
1 parent dff61c3 commit bb021d5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 24 deletions.
18 changes: 0 additions & 18 deletions nix/haskell.nix
Expand Up @@ -83,24 +83,6 @@ let
packages.cardano-wallet-core.components.all.preBuild = pkgs.lib.mkForce "";
}

# Allow reinstallation of Win32
{ nonReinstallablePkgs =
[ "rts" "ghc-heap" "ghc-prim" "integer-gmp" "integer-simple" "base"
"deepseq" "array" "ghc-boot-th" "pretty" "template-haskell"
# ghcjs custom packages
"ghcjs-prim" "ghcjs-th"
"ghc-boot"
"ghc" "array" "binary" "bytestring" "containers"
"filepath" "ghc-boot" "ghc-compact" "ghc-prim"
# "ghci" "haskeline"
"hpc"
"mtl" "parsec" "text" "transformers"
"xhtml"
# "stm" "terminfo"
];
#reinstallableLibGhc = true;
}

# Musl libc fully static build
(with pkgs.stdenv; let
staticLibs = [ zlib openssl libffi gmp6 ];
Expand Down
27 changes: 21 additions & 6 deletions nix/migration-tests.nix
Expand Up @@ -33,19 +33,31 @@
with pkgs.lib;

let

# From nixpkgs 19.09 onwards we use `x86_64-w64-mingw32` instead of
# the legacy `x86_64-pc-mingw32` that nixpkgs incorrectly used. Thus
# to test migration paths for releases that have been build with nixpkgs
# prior to 19.09, we'll need to rewrite the crossSystem.config.
# This is controlled by the `needsRewrite` flags int he releases.
rewriteCrossSystem = crossSystem: if crossSystem.config == "x86_64-w64-mingw32" then crossSystem // { config = "x86_64-pc-mingw32"; } else crossSystem;
# List of git revisions to test against.
releases = [
{ rev = "v2019-12-13";
sha256 = "1a2b4iflwwp824b1k9b82jw2q8pqlar6hg96nv03zv55glkgdllm";
allowFail = true; }
allowFail = true;
needsRewrite = true; }
{ rev = "v2019-12-16";
sha256 = "0y5xf43lrc7gygvxh5ywkglr3d1xcc19dsskm7frl0v6m9yxzni6"; }
sha256 = "0y5xf43lrc7gygvxh5ywkglr3d1xcc19dsskm7frl0v6m9yxzni6";
needsRewrite = true; }
{ rev = "v2019-12-23";
sha256 = "1fq8hjwqnajlz7g09zihmzhjc3hyyjl685nr5qa4r2fqnjzq5i24"; }
sha256 = "1fq8hjwqnajlz7g09zihmzhjc3hyyjl685nr5qa4r2fqnjzq5i24";
needsRewrite = true; }
{ rev = "v2020-01-07";
sha256 = "1bsw89xhd60jjdxx9d5ya6ly0rpswwcj7x5ppqjhydvsdsrd3rww"; }
sha256 = "1bsw89xhd60jjdxx9d5ya6ly0rpswwcj7x5ppqjhydvsdsrd3rww";
needsRewrite = true; }
{ rev = "v2020-01-14";
sha256 = "0kvwzrkpv3d62qr9sh9h7v7d398c600qr9dgw6zd3wcmxjk53762"; }
sha256 = "0kvwzrkpv3d62qr9sh9h7v7d398c600qr9dgw6zd3wcmxjk53762";
needsRewrite = true; }
];

# Download the sources for a release.
Expand All @@ -62,8 +74,11 @@ let
if rel == null
then import ../default.nix { inherit system crossSystem config; }
else let src = fetchRelease rel; in import src {
inherit system crossSystem config;
inherit system config;
gitrev = src.rev;
crossSystem = if rel.needsRewrite
then rewriteCrossSystem crossSystem
else crossSystem;
};

# Grab the migration test from the current version.
Expand Down

0 comments on commit bb021d5

Please sign in to comment.