File tree 6 files changed +27
-6
lines changed
6 files changed +27
-6
lines changed Original file line number Diff line number Diff line change 571
571
nativeBuildInputs = nativeBuildDeps ;
572
572
buildInputs = buildDeps ++ propagatedDeps ;
573
573
574
+ # Work around pkgsStatic disabling all tests.
575
+ preHook =
576
+ ''
577
+ doCheck=1
578
+ doInstallCheck=1
579
+ '' ;
580
+
574
581
configureFlags = [ "--sysconfdir=/etc" ] ;
575
582
576
583
enableParallelBuilding = true ;
577
584
578
585
makeFlags = "profiledir=$(out)/etc/profile.d" ;
579
586
580
- doCheck = true ;
581
-
582
587
installFlags = "sysconfdir=$(out)/etc" ;
583
588
584
589
postInstall = ''
588
593
echo "file binary-dist $out/bin/nix" >> $out/nix-support/hydra-build-products
589
594
'' ;
590
595
591
- doInstallCheck = true ;
592
596
installCheckFlags = "sysconfdir=$(out)/etc" ;
593
597
594
598
stripAllList = [ "bin" ] ;
597
601
598
602
hardeningDisable = [ "pie" ] ;
599
603
} ;
604
+
600
605
dockerImage =
601
606
let
602
607
pkgs = nixpkgsFor . ${ system } ;
Original file line number Diff line number Diff line change 75
75
buildCommand = ''
76
76
mkdir -p $out/bin
77
77
echo ${ rootCA } # Just to make it depend on it
78
- echo "" > $out/bin/${ name }
78
+ echo "#! ${ shell } " > $out/bin/${ name }
79
79
chmod +x $out/bin/${ name }
80
80
'' ;
81
81
} ;
Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ export busybox="@sandbox_shell@"
50
50
export version=@PACKAGE_VERSION@
51
51
export system=@system@
52
52
53
+ export BUILD_SHARED_LIBS=@BUILD_SHARED_LIBS@
54
+
53
55
export IMPURE_VAR1=foo
54
56
export IMPURE_VAR2=bar
55
57
Original file line number Diff line number Diff line change @@ -18,7 +18,12 @@ cat << EOF > flake.nix
18
18
with import ./config.nix;
19
19
mkDerivation {
20
20
name = "formatter";
21
- buildCommand = "mkdir -p \$ out/bin; cp \$ {./fmt.simple.sh} \$ out/bin/formatter";
21
+ buildCommand = ''
22
+ mkdir -p \$ out/bin
23
+ echo "#! ${shell} " > \$ out/bin/formatter
24
+ cat \$ {./fmt.simple.sh} >> \$ out/bin/formatter
25
+ chmod +x \$ out/bin/formatter
26
+ '';
22
27
};
23
28
};
24
29
}
Original file line number Diff line number Diff line change @@ -114,4 +114,8 @@ tests-environment = NIX_REMOTE= $(bash) -e
114
114
115
115
clean-files += $(d ) /common.sh $(d ) /config.nix $(d ) /ca/config.nix
116
116
117
- test-deps += tests/common.sh tests/config.nix tests/ca/config.nix tests/plugins/libplugintest.$(SO_EXT )
117
+ test-deps += tests/common.sh tests/config.nix tests/ca/config.nix
118
+
119
+ ifeq ($(BUILD_SHARED_LIBS ) , 1)
120
+ test-deps += tests/plugins/libplugintest.$(SO_EXT )
121
+ endif
Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ source common.sh
2
2
3
3
set -o pipefail
4
4
5
+ if [[ $BUILD_SHARED_LIBS != 1 ]]; then
6
+ echo " plugins are not supported"
7
+ exit 99
8
+ fi
9
+
5
10
res=$( nix --option setting-set true --option plugin-files $PWD /plugins/libplugintest* eval --expr builtins.anotherNull)
6
11
7
12
[ " $res " x = " nullx" ]
You can’t perform that action at this time.
0 commit comments