tests.haskell-setBuildTarget: inline haskell package def to avoid IFD
This commit is contained in:
parent
ba354d5ad8
commit
88d9f2419e
@ -1,11 +1,23 @@
|
||||
{ pkgs, haskellPackages }: with pkgs.haskell.lib;
|
||||
|
||||
{ pkgs, haskellPackages }:
|
||||
|
||||
let
|
||||
drv = haskellPackages.callCabal2nix "haskell-setBuildTarget" ./. {};
|
||||
test = target: excluded:
|
||||
# This can be regenerated by running `cabal2nix .` in the current directory.
|
||||
pkgDef =
|
||||
{ mkDerivation, base, lib }:
|
||||
mkDerivation {
|
||||
pname = "haskell-setBuildTarget";
|
||||
version = "0.1.0.0";
|
||||
src = ./.;
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
executableHaskellDepends = [ base ];
|
||||
license = lib.licenses.bsd3;
|
||||
};
|
||||
|
||||
let only = setBuildTarget drv target;
|
||||
drv = haskellPackages.callPackage pkgDef {};
|
||||
|
||||
test = target: excluded:
|
||||
let only = pkgs.haskell.lib.setBuildTarget drv target;
|
||||
in ''
|
||||
if [[ ! -f "${only}/bin/${target}" ]]; then
|
||||
echo "${target} was not built"
|
||||
|
Loading…
Reference in New Issue
Block a user