File tree Expand file tree Collapse file tree 3 files changed +28
-16
lines changed Expand file tree Collapse file tree 3 files changed +28
-16
lines changed Original file line number Diff line number Diff line change 126
126
buildRebar3 {
127
127
inherit version ;
128
128
name = "acceptor_pool" ;
129
- appConfigPath = ./config ;
130
129
131
130
src = fetchHex {
132
131
inherit version ;
142
141
buildRebar3 {
143
142
inherit version ;
144
143
name = "aws_signature" ;
145
- appConfigPath = ./config ;
146
144
147
145
src = fetchHex {
148
146
inherit version ;
199
197
buildRebar3 {
200
198
inherit version ;
201
199
name = "chatterbox" ;
202
- appConfigPath = ./config ;
203
200
204
201
src = fetchHex {
205
202
inherit version ;
240
237
buildRebar3 {
241
238
inherit version ;
242
239
name = "ctx" ;
243
- appConfigPath = ./config ;
244
240
245
241
src = fetchHex {
246
242
inherit version ;
560
556
buildRebar3 {
561
557
inherit version ;
562
558
name = "gproc" ;
563
- appConfigPath = ./config ;
564
559
565
560
src = fetchHex {
566
561
inherit version ;
576
571
buildRebar3 {
577
572
inherit version ;
578
573
name = "grpcbox" ;
579
- appConfigPath = ./config ;
580
574
581
575
src = fetchHex {
582
576
inherit version ;
599
593
buildRebar3 {
600
594
inherit version ;
601
595
name = "hpack" ;
602
- appConfigPath = ./config ;
603
596
604
597
src = fetchHex {
605
598
inherit version ;
720
713
buildRebar3 {
721
714
inherit version ;
722
715
name = "opentelemetry" ;
723
- appConfigPath = ./config ;
724
716
725
717
src = fetchHex {
726
718
inherit version ;
756
748
buildRebar3 {
757
749
inherit version ;
758
750
name = "opentelemetry_exporter" ;
759
- appConfigPath = ./config ;
760
751
761
752
src = fetchHex {
762
753
inherit version ;
817
808
buildRebar3 {
818
809
inherit version ;
819
810
name = "png" ;
820
- appConfigPath = ./config ;
821
811
822
812
src = fetchHex {
823
813
inherit version ;
970
960
buildRebar3 {
971
961
inherit version ;
972
962
name = "telemetry" ;
973
- appConfigPath = ./config ;
974
963
975
964
src = fetchHex {
976
965
inherit version ;
1006
995
buildRebar3 {
1007
996
inherit version ;
1008
997
name = "tls_certificate_check" ;
1009
- appConfigPath = ./config ;
1010
998
1011
999
src = fetchHex {
1012
1000
inherit version ;
Original file line number Diff line number Diff line change @@ -143,8 +143,7 @@ defmodule DepsNix.Derivation do
143
143
in
144
144
#{ drv . builder } {
145
145
inherit version;
146
- name = "#{ drv . name } ";
147
- appConfigPath = #{ format_path ( drv . app_config_path ) } ;
146
+ name = "#{ drv . name } ";#{ format_app_config_path ( drv ) }
148
147
149
148
src = #{ src ( drv . src ) } #{ beam_deps ( drv . beam_deps ) }
150
149
};
@@ -174,8 +173,25 @@ defmodule DepsNix.Derivation do
174
173
|> Util . indent ( from: 2 )
175
174
end
176
175
177
- defp format_path ( path ) do
178
- if String . starts_with? ( path , "." ) , do: path , else: "./#{ path } "
176
+ defp format_app_config_path ( % DepsNix.Derivation {
177
+ builder: "buildMix" ,
178
+ app_config_path: path
179
+ } ) do
180
+ "\n appConfigPath = #{ prefix_path ( path ) } ;"
181
+ |> Util . indent ( from: 1 )
182
+ |> Util . indent ( from: 1 )
183
+ end
184
+
185
+ defp format_app_config_path ( _drv ) do
186
+ ""
187
+ end
188
+
189
+ defp prefix_path ( << "." , _rest :: binary >> = path ) do
190
+ path
191
+ end
192
+
193
+ defp prefix_path ( path ) do
194
+ "./#{ path } "
179
195
end
180
196
end
181
197
end
Original file line number Diff line number Diff line change @@ -236,6 +236,14 @@ defmodule DepsNix.DerivationTest do
236
236
end
237
237
238
238
describe "string representation" do
239
+ test "rebar3 builds don't get appConfigPaths" do
240
+ refute dep ( builders: [ :rebar3 ] , scm: Mix.SCM.Hex )
241
+ |> pick ( )
242
+ |> Derivation . from ( % DepsNix.Options { } )
243
+ |> to_string ( )
244
+ |> String . contains? ( "appConfigPath" )
245
+ end
246
+
239
247
test "paths get special treatment" do
240
248
assert % Derivation {
241
249
builder: "buildMix" ,
You can’t perform that action at this time.
0 commit comments