Files
haskell.nix/test/project-flags/stack.nix
T
Hamish Mackenzie 89f50a96dd Use pkgs.lib instead of stdenv.lib (#1031)
Fixes:

Warning: `stdenv.lib` is deprecated and will be removed in the next release. Please use `pkgs.lib` instead. For more information see https://github.com/NixOS/nixpkgs/issues/108938
2021-02-11 01:07:16 +13:00

36 lines
812 B
Nix

{ stdenv, lib, stackProject', recurseIntoAttrs, haskellLib, testSrc }:
with lib;
let
project = stackProject' {
src = testSrc "project-flags";
};
packages = project.hsPkgs;
in recurseIntoAttrs {
ifdInputs = {
inherit (project) stack-nix;
};
run = stdenv.mkDerivation {
name = "callStackToNix-test";
buildCommand = ''
exe="${packages.test-project-flags.components.exes.test-project-flags-exe.exePath}"
printf "checking whether executable runs... " >& 2
cat ${haskellLib.check packages.test-project-flags.components.exes.test-project-flags-exe}/test-stdout
touch $out
'';
meta.platforms = platforms.all;
passthru = {
# Attributes used for debugging with nix repl
inherit pkgSet packages;
stack-nix = stack.nix;
};
};
}