on 19052d8 help sign in
35 lines 859 B history raw
1{ stdenv, lib, cabalProject', haskellLib, recurseIntoAttrs, testSrc, compiler-nix-name }:
3with lib;
5let
6 project = cabalProject' {
7 inherit compiler-nix-name;
8 src = testSrc "buildable";
9 modules = [ { packages.buildable-test.flags.exclude-broken = true; } ];
10 };
11 packages = project.hsPkgs;
13in recurseIntoAttrs {
14 ifdInputs = {
15 inherit (project) plan-nix;
16 };
17 run = stdenv.mkDerivation {
18 name = "buildable-test";
20 buildCommand =
21 (concatStrings (mapAttrsToList (name: value: ''
22 printf "checking whether executable runs... " >& 2
23 cat ${haskellLib.check value}/test-stdout
24 '') packages.buildable-test.components.exes)) + ''
25 touch $out
26 '';
28 meta.platforms = platforms.all;
30 passthru = {
31 # Attributes used for debugging with nix repl
32 inherit project packages;
33 };
34 };