on e94de40 help sign in
39 lines 1.0 kB history raw
1{ stdenv, mkStackPkgSet, callStackToNix, importAndFilterProject, recurseIntoAttrs, haskellLib, testSrc }:
3with stdenv.lib;
5let
6 callProjectResults = callStackToNix {
7 src = testSrc "stack-simple";
8 };
9 pkgSet = mkStackPkgSet {
10 stack-pkgs = importAndFilterProject callProjectResults;
11 pkg-def-extras = [];
12 modules = [];
13 };
14 packages = pkgSet.config.hsPkgs;
16in recurseIntoAttrs {
17 ifdInputs = {
18 stack-nix = callProjectResults.projectNix;
19 };
20 run = stdenv.mkDerivation {
21 name = "callStackToNix-test";
23 buildCommand = ''
24 exe="${packages.stack-simple.components.exes.stack-simple-exe}/bin/stack-simple-exe${stdenv.hostPlatform.extensions.executable}"
26 printf "checking whether executable runs... " >& 2
27 cat ${haskellLib.check packages.stack-simple.components.exes.stack-simple-exe}/test-stdout
29 touch $out
30 '';
32 meta.platforms = platforms.all;
34 passthru = {
35 # Attributes used for debugging with nix repl
36 inherit pkgSet packages;
37 };
38 };