-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
156180d
commit 9b0bc86
Showing
3 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
{...}: | ||
|
||
(import ./nixpkgs.nix {}).stacklock2nix-tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
{...}: | ||
|
||
let | ||
flake-lock = builtins.fromJSON (builtins.readFile ../my-example-haskell-lib-advanced/flake.lock); | ||
|
||
# Use the Nixpkgs that the my-example-haskell-lib-advanced is pinned to. | ||
nixpkgs-src = builtins.fetchTarball { | ||
url = "https://github.com/NixOS/nixpkgs/archive/${flake-lock.nodes.nixpkgs.locked.rev}.tar.gz"; | ||
sha256 = flake-lock.nodes.nixpkgs.locked.narHash; | ||
}; | ||
|
||
overlays = [ | ||
# stacklock2nix overlay | ||
(import ../nix/overlay.nix) | ||
|
||
# tests | ||
(final: prev: { | ||
stacklock2nix-tests = | ||
(final.callPackage ./test-new-package-set.nix {}) ++ [ | ||
# new tests go here | ||
]; | ||
}) | ||
]; | ||
|
||
pkgs = import nixpkgs-src { inherit overlays; }; | ||
|
||
in | ||
|
||
pkgs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
{ stacklock2nix | ||
, haskell | ||
, cabal-install | ||
, fetchurl | ||
}: | ||
|
||
let | ||
hasklib = haskell.lib.compose; | ||
|
||
stacklock = stacklock2nix { | ||
stackYaml = ../my-example-haskell-lib-advanced/stack.yaml; | ||
baseHaskellPkgSet = haskell.packages.ghc924; | ||
additionalHaskellPkgSetOverrides = hfinal: hprev: { | ||
# The servant-cassava.cabal file is malformed on GitHub: | ||
# https://github.com/haskell-servant/servant-cassava/pull/29 | ||
servant-cassava = | ||
hasklib.overrideCabal | ||
{ editedCabalFile = null; revision = null; } | ||
hprev.servant-cassava; | ||
|
||
amazonka = hasklib.dontCheck hprev.amazonka; | ||
amazonka-core = hasklib.dontCheck hprev.amazonka-core; | ||
amazonka-sso = hasklib.dontCheck hprev.amazonka-sso; | ||
amazonka-sts = hasklib.dontCheck hprev.amazonka-sts; | ||
}; | ||
cabal2nixArgsOverrides = args: args // { | ||
amazonka-sso = ver: { amazonka-test = null; }; | ||
amazonka-sts = ver: { amazonka-test = null; }; | ||
}; | ||
additionalDevShellNativeBuildInputs = stacklockHaskellPkgSet: [ | ||
cabal-install | ||
]; | ||
all-cabal-hashes = fetchurl { | ||
name = "all-cabal-hashes"; | ||
url = "https://github.com/commercialhaskell/all-cabal-hashes/archive/9ab160f48cb535719783bc43c0fbf33e6d52fa99.tar.gz"; | ||
sha256 = "sha256-QC07T3MEm9LIMRpxIq3Pnqul60r7FpAdope6S62sEX8="; | ||
}; | ||
}; | ||
in | ||
[ stacklock.newPkgSet.my-example-haskell-app | ||
stacklock.newPkgSetDevShell | ||
] |