mirror of
https://github.com/simplex-chat/haskell.nix.git
synced 2026-06-03 09:17:32 +00:00
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
36 lines
812 B
Nix
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;
|
|
};
|
|
};
|
|
}
|