Test `cabalProject` when `src` is a non store path (#752)
commit29a9b936ebfb1c526c9c51a165055bf1a3be6ca4
authorHamish Mackenzie <Hamish.Mackenzie@iohk.io>
dateTue 7 Jul 2020, 21:13 (6 years ago)
parenta2bc3db
.buildkite/pipeline.yml+5
@@ -33,3 +33,8 @@ steps:
3333 command:
3434 - nix-build build.nix -A maintainer-scripts.check-materialization-concurrency -o check-materialization-concurrency.sh
3535 - ./check-materialization-concurrency.sh
36+
37+ - label: 'Make sure non store paths like can be used as src'
38+ command:
39+ - nix-build build.nix -A maintainer-scripts.check-path-support -o check-path-support.sh
40+ - ./check-path-support.sh
build.nix+1
@@ -55,6 +55,7 @@ in rec {
5555 ];
5656 };
5757 check-materialization-concurrency = pkgs.buildPackages.callPackage ./scripts/check-materialization-concurrency/check.nix {};
58+ check-path-support = pkgs.buildPackages.callPackage ./scripts/check-path-support.nix {};
5859 };
5960
6061 # These are pure parts of maintainer-script so they can be built by hydra
scripts/check-path-support.nixnew file+13
@@ -0,0 +1,13 @@
1+{ stdenv, writeScript, nix }:
2+
3+with stdenv.lib;
4+
5+writeScript "check-path-supprot.sh" ''
6+ #!${stdenv.shell}
7+
8+ set -euo pipefail
9+
10+ export PATH="${makeBinPath [ nix ]}"
11+
12+ nix-build -E '((import ./. {}).pkgs.haskell-nix.cabalProject { compiler-nix-name = "ghc865"; src = ./test/cabal-simple; }).cabal-simple.components.library'
13+''