Skip to content

Commit 2243adf

Browse files
authored
Fix splitmix on android (#2388)
* Fix splitmix on android See haskellari/splitmix#97 * Fix defaults used when passing args to `shellFor`
1 parent 402740e commit 2243adf

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

overlays/haskell.nix

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -827,10 +827,11 @@ final: prev: {
827827
# ];
828828
# }
829829
#
830-
shellFor = extraArgs: shellFor' (rawProject.args.shell // extraArgs).crossPlatforms extraArgs;
831-
shellFor' = crossPlatforms: extraArgs:
830+
shellFor = extraArgs: (appendModule { shell = extraArgs; }).shell;
831+
shell = shellFor' rawProject.args.shell.crossPlatforms;
832+
shellFor' = crossPlatforms:
832833
let
833-
shellArgs = builtins.removeAttrs (rawProject.args.shell // extraArgs) [ "crossPlatforms" ];
834+
shellArgs = builtins.removeAttrs rawProject.args.shell [ "crossPlatforms" ];
834835
# These are the args we will pass to the shells for the corss compiler
835836
argsCross =
836837
# These things should match main shell
@@ -848,9 +849,6 @@ final: prev: {
848849
inputsFrom = shellArgs.inputsFrom or [] ++ crossShells;
849850
});
850851

851-
# Default shell
852-
shell = shellFor {};
853-
854852
# Like `.hsPkgs.${packageName}` but when compined with `getComponent` any
855853
# cabal configure errors are defered until the components derivation builds.
856854
getPackage = packageName:

test/cabal.project.local

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
-- See https://github.com/haskellari/splitmix/pull/97
2+
source-repository-package
3+
type: git
4+
location: https://github.com/hamishmack/splitmix.git
5+
tag: e3549473b124a7ba078408ac0d2c8aa8111c3888
6+
--sha256: sha256-o18DEF4+z3/jGhMZbow8PFtYBiIm6+b4B+6o5tM6ez0=
7+
18
if impl(ghc>=9.12.1)
29
-- allow newer packages, that are bound to be newer due to
310
-- being shipped with a newer compiler. If you extend this

0 commit comments

Comments
 (0)