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