Skip to content

Commit 29a9b93

Browse files
authored
Test cabalProject when src is a non store path (#752)
1 parent a2bc3db commit 29a9b93

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

.buildkite/pipeline.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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.nix

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
''

0 commit comments

Comments
 (0)