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
Showing
1 changed file
with
33 additions
and
18 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 |
---|---|---|
@@ -1,19 +1,34 @@ | ||
with (import <nixpkgs> {}).pkgs; | ||
let pkg = haskellngPackages.callPackage | ||
({ mkDerivation, base, containers, generic-deriving, ghc-prim, mtl | ||
, stdenv, stm, tagged, tasty, transformers, xml | ||
}: | ||
mkDerivation { | ||
pname = "tasty-ant-xml"; | ||
version = "1.0.2"; | ||
src = ./.; | ||
buildDepends = [ | ||
base containers generic-deriving ghc-prim mtl stm tagged tasty | ||
transformers xml | ||
]; | ||
homepage = "http://github.com/ocharles/tasty-ant-xml"; | ||
description = "Render tasty output to XML for Jenkins"; | ||
license = stdenv.lib.licenses.bsd3; | ||
}) {}; | ||
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }: | ||
|
||
let | ||
|
||
inherit (nixpkgs) pkgs; | ||
|
||
f = { mkDerivation, base, containers, directory, filepath | ||
, generic-deriving, ghc-prim, mtl, stdenv, stm, tagged, tasty | ||
, transformers, xml | ||
}: | ||
mkDerivation { | ||
pname = "tasty-ant-xml"; | ||
version = "1.1.3"; | ||
src = ./.; | ||
libraryHaskellDepends = [ | ||
base containers directory filepath generic-deriving ghc-prim mtl | ||
stm tagged tasty transformers xml | ||
]; | ||
homepage = "http://github.com/ocharles/tasty-ant-xml"; | ||
description = "Render tasty output to XML for Jenkins"; | ||
license = stdenv.lib.licenses.bsd3; | ||
}; | ||
|
||
haskellPackages = if compiler == "default" | ||
then pkgs.haskellPackages | ||
else pkgs.haskell.packages.${compiler}; | ||
|
||
variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id; | ||
|
||
drv = variant (haskellPackages.callPackage f {}); | ||
|
||
in | ||
pkg.env | ||
|
||
if pkgs.lib.inNixShell then drv.env else drv |