on e94de40 help sign in
37 lines 977 B history raw
1{ stdenv, cabalProject', recurseIntoAttrs, haskellLib, 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 "project-flags";
10 };
11 packages = project.hsPkgs;
13in recurseIntoAttrs {
14 ifdInputs = {
15 inherit (project) plan-nix;
16 };
17 run = stdenv.mkDerivation {
18 name = "call-cabal-project-to-nix-test";
20 buildCommand = ''
21 exe="${packages.test-project-flags.components.exes.test-project-flags-exe}/bin/test-project-flags-exe${stdenv.hostPlatform.extensions.executable}"
23 printf "checking whether executable runs... " >& 2
24 cat ${haskellLib.check packages.test-project-flags.components.exes.test-project-flags-exe}/test-stdout
26 touch $out
27 '';
29 meta.platforms = platforms.all;
31 passthru = {
32 # Attributes used for debugging with nix repl
33 inherit pkgSet packages;
34 plan-nix = plan.nix;
35 };
36 };