aws-iam-ls 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (522) hide show
  1. package/.direnv/bin/nix-direnv-reload +19 -0
  2. package/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc +2156 -0
  3. package/.github/workflows/publish.yml +37 -0
  4. package/.github/workflows/test.yml +16 -0
  5. package/.vscodeignore +17 -0
  6. package/LICENSE +21 -0
  7. package/package.json +53 -0
  8. package/readme.md +25 -0
  9. package/src/data/condition-keys/global.json +362 -0
  10. package/src/data/servicereference/actions.json +1 -0
  11. package/src/data/servicereference/service-principals.json +1 -0
  12. package/src/data/servicereference/services/a2c.json +1 -0
  13. package/src/data/servicereference/services/a4b.json +1 -0
  14. package/src/data/servicereference/services/access-analyzer.json +1 -0
  15. package/src/data/servicereference/services/account.json +1 -0
  16. package/src/data/servicereference/services/acm-pca.json +1 -0
  17. package/src/data/servicereference/services/acm.json +1 -0
  18. package/src/data/servicereference/services/aco-automation.json +1 -0
  19. package/src/data/servicereference/services/action-recommendations.json +1 -0
  20. package/src/data/servicereference/services/activate.json +1 -0
  21. package/src/data/servicereference/services/aidevops.json +1 -0
  22. package/src/data/servicereference/services/aiops.json +1 -0
  23. package/src/data/servicereference/services/airflow-serverless.json +1 -0
  24. package/src/data/servicereference/services/airflow.json +1 -0
  25. package/src/data/servicereference/services/amplify.json +1 -0
  26. package/src/data/servicereference/services/amplifybackend.json +1 -0
  27. package/src/data/servicereference/services/amplifyuibuilder.json +1 -0
  28. package/src/data/servicereference/services/aoss.json +1 -0
  29. package/src/data/servicereference/services/apigateway.json +1 -0
  30. package/src/data/servicereference/services/app-integrations.json +1 -0
  31. package/src/data/servicereference/services/appconfig.json +1 -0
  32. package/src/data/servicereference/services/appfabric.json +1 -0
  33. package/src/data/servicereference/services/appflow.json +1 -0
  34. package/src/data/servicereference/services/application-autoscaling.json +1 -0
  35. package/src/data/servicereference/services/application-signals.json +1 -0
  36. package/src/data/servicereference/services/application-transformation.json +1 -0
  37. package/src/data/servicereference/services/applicationinsights.json +1 -0
  38. package/src/data/servicereference/services/appmesh-preview.json +1 -0
  39. package/src/data/servicereference/services/appmesh.json +1 -0
  40. package/src/data/servicereference/services/apprunner.json +1 -0
  41. package/src/data/servicereference/services/appstream.json +1 -0
  42. package/src/data/servicereference/services/appstudio.json +1 -0
  43. package/src/data/servicereference/services/appsync.json +1 -0
  44. package/src/data/servicereference/services/apptest.json +1 -0
  45. package/src/data/servicereference/services/aps.json +1 -0
  46. package/src/data/servicereference/services/arc-region-switch.json +1 -0
  47. package/src/data/servicereference/services/arc-zonal-shift.json +1 -0
  48. package/src/data/servicereference/services/arsenal.json +1 -0
  49. package/src/data/servicereference/services/artifact.json +1 -0
  50. package/src/data/servicereference/services/athena.json +1 -0
  51. package/src/data/servicereference/services/auditmanager.json +1 -0
  52. package/src/data/servicereference/services/autoscaling-plans.json +1 -0
  53. package/src/data/servicereference/services/autoscaling.json +1 -0
  54. package/src/data/servicereference/services/aws-marketplace-management.json +1 -0
  55. package/src/data/servicereference/services/aws-marketplace.json +1 -0
  56. package/src/data/servicereference/services/aws-mcp.json +1 -0
  57. package/src/data/servicereference/services/aws-portal.json +1 -0
  58. package/src/data/servicereference/services/awsconnector.json +1 -0
  59. package/src/data/servicereference/services/b2bi.json +1 -0
  60. package/src/data/servicereference/services/backup-gateway.json +1 -0
  61. package/src/data/servicereference/services/backup-search.json +1 -0
  62. package/src/data/servicereference/services/backup-storage.json +1 -0
  63. package/src/data/servicereference/services/backup.json +1 -0
  64. package/src/data/servicereference/services/batch.json +1 -0
  65. package/src/data/servicereference/services/bcm-dashboards.json +1 -0
  66. package/src/data/servicereference/services/bcm-data-exports.json +1 -0
  67. package/src/data/servicereference/services/bcm-pricing-calculator.json +1 -0
  68. package/src/data/servicereference/services/bcm-recommended-actions.json +1 -0
  69. package/src/data/servicereference/services/bedrock-agentcore.json +1 -0
  70. package/src/data/servicereference/services/bedrock-mantle.json +1 -0
  71. package/src/data/servicereference/services/bedrock.json +1 -0
  72. package/src/data/servicereference/services/billing.json +1 -0
  73. package/src/data/servicereference/services/billingconductor.json +1 -0
  74. package/src/data/servicereference/services/braket.json +1 -0
  75. package/src/data/servicereference/services/budgets.json +1 -0
  76. package/src/data/servicereference/services/bugbust.json +1 -0
  77. package/src/data/servicereference/services/cases.json +1 -0
  78. package/src/data/servicereference/services/cassandra.json +1 -0
  79. package/src/data/servicereference/services/ce.json +1 -0
  80. package/src/data/servicereference/services/chatbot.json +1 -0
  81. package/src/data/servicereference/services/chime.json +1 -0
  82. package/src/data/servicereference/services/cleanrooms-ml.json +1 -0
  83. package/src/data/servicereference/services/cleanrooms.json +1 -0
  84. package/src/data/servicereference/services/cloud9.json +1 -0
  85. package/src/data/servicereference/services/clouddirectory.json +1 -0
  86. package/src/data/servicereference/services/cloudformation.json +1 -0
  87. package/src/data/servicereference/services/cloudfront-keyvaluestore.json +1 -0
  88. package/src/data/servicereference/services/cloudfront.json +1 -0
  89. package/src/data/servicereference/services/cloudhsm.json +1 -0
  90. package/src/data/servicereference/services/cloudsearch.json +1 -0
  91. package/src/data/servicereference/services/cloudshell.json +1 -0
  92. package/src/data/servicereference/services/cloudtrail-data.json +1 -0
  93. package/src/data/servicereference/services/cloudtrail.json +1 -0
  94. package/src/data/servicereference/services/cloudwatch.json +1 -0
  95. package/src/data/servicereference/services/codeartifact.json +1 -0
  96. package/src/data/servicereference/services/codebuild.json +1 -0
  97. package/src/data/servicereference/services/codecatalyst.json +1 -0
  98. package/src/data/servicereference/services/codecommit.json +1 -0
  99. package/src/data/servicereference/services/codeconnections.json +1 -0
  100. package/src/data/servicereference/services/codedeploy-commands-secure.json +1 -0
  101. package/src/data/servicereference/services/codedeploy.json +1 -0
  102. package/src/data/servicereference/services/codeguru-profiler.json +1 -0
  103. package/src/data/servicereference/services/codeguru-reviewer.json +1 -0
  104. package/src/data/servicereference/services/codeguru-security.json +1 -0
  105. package/src/data/servicereference/services/codeguru.json +1 -0
  106. package/src/data/servicereference/services/codepipeline.json +1 -0
  107. package/src/data/servicereference/services/codestar-connections.json +1 -0
  108. package/src/data/servicereference/services/codestar-notifications.json +1 -0
  109. package/src/data/servicereference/services/codestar.json +1 -0
  110. package/src/data/servicereference/services/codewhisperer.json +1 -0
  111. package/src/data/servicereference/services/cognito-identity.json +1 -0
  112. package/src/data/servicereference/services/cognito-idp.json +1 -0
  113. package/src/data/servicereference/services/cognito-sync.json +1 -0
  114. package/src/data/servicereference/services/comprehend.json +1 -0
  115. package/src/data/servicereference/services/comprehendmedical.json +1 -0
  116. package/src/data/servicereference/services/compute-optimizer.json +1 -0
  117. package/src/data/servicereference/services/config.json +1 -0
  118. package/src/data/servicereference/services/connect-campaigns.json +1 -0
  119. package/src/data/servicereference/services/connect.json +1 -0
  120. package/src/data/servicereference/services/consoleapp.json +1 -0
  121. package/src/data/servicereference/services/consolidatedbilling.json +1 -0
  122. package/src/data/servicereference/services/controlcatalog.json +1 -0
  123. package/src/data/servicereference/services/controltower.json +1 -0
  124. package/src/data/servicereference/services/cost-optimization-hub.json +1 -0
  125. package/src/data/servicereference/services/cur.json +1 -0
  126. package/src/data/servicereference/services/customer-verification.json +1 -0
  127. package/src/data/servicereference/services/databrew.json +1 -0
  128. package/src/data/servicereference/services/dataexchange.json +1 -0
  129. package/src/data/servicereference/services/datapipeline.json +1 -0
  130. package/src/data/servicereference/services/datasync.json +1 -0
  131. package/src/data/servicereference/services/datazone.json +1 -0
  132. package/src/data/servicereference/services/dax.json +1 -0
  133. package/src/data/servicereference/services/dbqms.json +1 -0
  134. package/src/data/servicereference/services/deadline.json +1 -0
  135. package/src/data/servicereference/services/detective.json +1 -0
  136. package/src/data/servicereference/services/devicefarm.json +1 -0
  137. package/src/data/servicereference/services/devops-guru.json +1 -0
  138. package/src/data/servicereference/services/directconnect.json +1 -0
  139. package/src/data/servicereference/services/discovery.json +1 -0
  140. package/src/data/servicereference/services/dlm.json +1 -0
  141. package/src/data/servicereference/services/dms.json +1 -0
  142. package/src/data/servicereference/services/docdb-elastic.json +1 -0
  143. package/src/data/servicereference/services/drs.json +1 -0
  144. package/src/data/servicereference/services/ds-data.json +1 -0
  145. package/src/data/servicereference/services/ds.json +1 -0
  146. package/src/data/servicereference/services/dsql.json +1 -0
  147. package/src/data/servicereference/services/dynamodb.json +1 -0
  148. package/src/data/servicereference/services/ebs.json +1 -0
  149. package/src/data/servicereference/services/ec2-instance-connect.json +1 -0
  150. package/src/data/servicereference/services/ec2.json +1 -0
  151. package/src/data/servicereference/services/ec2messages.json +1 -0
  152. package/src/data/servicereference/services/ecr-public.json +1 -0
  153. package/src/data/servicereference/services/ecr.json +1 -0
  154. package/src/data/servicereference/services/ecs-mcp.json +1 -0
  155. package/src/data/servicereference/services/ecs.json +1 -0
  156. package/src/data/servicereference/services/eks-auth.json +1 -0
  157. package/src/data/servicereference/services/eks-mcp.json +1 -0
  158. package/src/data/servicereference/services/eks.json +1 -0
  159. package/src/data/servicereference/services/elasticache.json +1 -0
  160. package/src/data/servicereference/services/elasticbeanstalk.json +1 -0
  161. package/src/data/servicereference/services/elasticfilesystem.json +1 -0
  162. package/src/data/servicereference/services/elasticloadbalancing.json +1 -0
  163. package/src/data/servicereference/services/elasticmapreduce.json +1 -0
  164. package/src/data/servicereference/services/elastictranscoder.json +1 -0
  165. package/src/data/servicereference/services/elemental-activations.json +1 -0
  166. package/src/data/servicereference/services/elemental-appliances-software.json +1 -0
  167. package/src/data/servicereference/services/elemental-inference.json +1 -0
  168. package/src/data/servicereference/services/elemental-support-cases.json +1 -0
  169. package/src/data/servicereference/services/elemental-support-content.json +1 -0
  170. package/src/data/servicereference/services/emr-containers.json +1 -0
  171. package/src/data/servicereference/services/emr-serverless.json +1 -0
  172. package/src/data/servicereference/services/entityresolution.json +1 -0
  173. package/src/data/servicereference/services/es.json +1 -0
  174. package/src/data/servicereference/services/events.json +1 -0
  175. package/src/data/servicereference/services/evidently.json +1 -0
  176. package/src/data/servicereference/services/evs.json +1 -0
  177. package/src/data/servicereference/services/execute-api.json +1 -0
  178. package/src/data/servicereference/services/finspace-api.json +1 -0
  179. package/src/data/servicereference/services/finspace.json +1 -0
  180. package/src/data/servicereference/services/firehose.json +1 -0
  181. package/src/data/servicereference/services/fis.json +1 -0
  182. package/src/data/servicereference/services/fms.json +1 -0
  183. package/src/data/servicereference/services/forecast.json +1 -0
  184. package/src/data/servicereference/services/frauddetector.json +1 -0
  185. package/src/data/servicereference/services/freertos.json +1 -0
  186. package/src/data/servicereference/services/freetier.json +1 -0
  187. package/src/data/servicereference/services/fsx.json +1 -0
  188. package/src/data/servicereference/services/gamelift.json +1 -0
  189. package/src/data/servicereference/services/gameliftstreams.json +1 -0
  190. package/src/data/servicereference/services/geo-maps.json +1 -0
  191. package/src/data/servicereference/services/geo-places.json +1 -0
  192. package/src/data/servicereference/services/geo-routes.json +1 -0
  193. package/src/data/servicereference/services/geo.json +1 -0
  194. package/src/data/servicereference/services/glacier.json +1 -0
  195. package/src/data/servicereference/services/globalaccelerator.json +1 -0
  196. package/src/data/servicereference/services/glue.json +1 -0
  197. package/src/data/servicereference/services/grafana.json +1 -0
  198. package/src/data/servicereference/services/greengrass.json +1 -0
  199. package/src/data/servicereference/services/groundstation.json +1 -0
  200. package/src/data/servicereference/services/groundtruthlabeling.json +1 -0
  201. package/src/data/servicereference/services/guardduty.json +1 -0
  202. package/src/data/servicereference/services/health-agent.json +1 -0
  203. package/src/data/servicereference/services/health.json +1 -0
  204. package/src/data/servicereference/services/healthlake.json +1 -0
  205. package/src/data/servicereference/services/honeycode.json +1 -0
  206. package/src/data/servicereference/services/iam.json +1 -0
  207. package/src/data/servicereference/services/identity-sync.json +1 -0
  208. package/src/data/servicereference/services/identitystore-auth.json +1 -0
  209. package/src/data/servicereference/services/identitystore.json +1 -0
  210. package/src/data/servicereference/services/imagebuilder.json +1 -0
  211. package/src/data/servicereference/services/importexport.json +1 -0
  212. package/src/data/servicereference/services/inspector-scan.json +1 -0
  213. package/src/data/servicereference/services/inspector.json +1 -0
  214. package/src/data/servicereference/services/inspector2-telemetry.json +1 -0
  215. package/src/data/servicereference/services/inspector2.json +1 -0
  216. package/src/data/servicereference/services/interconnect.json +1 -0
  217. package/src/data/servicereference/services/internetmonitor.json +1 -0
  218. package/src/data/servicereference/services/invoicing.json +1 -0
  219. package/src/data/servicereference/services/iot-device-tester.json +1 -0
  220. package/src/data/servicereference/services/iot.json +1 -0
  221. package/src/data/servicereference/services/iotanalytics.json +1 -0
  222. package/src/data/servicereference/services/iotdeviceadvisor.json +1 -0
  223. package/src/data/servicereference/services/iotevents.json +1 -0
  224. package/src/data/servicereference/services/iotfleethub.json +1 -0
  225. package/src/data/servicereference/services/iotfleetwise.json +1 -0
  226. package/src/data/servicereference/services/iotjobsdata.json +1 -0
  227. package/src/data/servicereference/services/iotmanagedintegrations.json +1 -0
  228. package/src/data/servicereference/services/iotsitewise.json +1 -0
  229. package/src/data/servicereference/services/iottwinmaker.json +1 -0
  230. package/src/data/servicereference/services/iotwireless.json +1 -0
  231. package/src/data/servicereference/services/iq-permission.json +1 -0
  232. package/src/data/servicereference/services/iq.json +1 -0
  233. package/src/data/servicereference/services/ivs.json +1 -0
  234. package/src/data/servicereference/services/ivschat.json +1 -0
  235. package/src/data/servicereference/services/kafka-cluster.json +1 -0
  236. package/src/data/servicereference/services/kafka.json +1 -0
  237. package/src/data/servicereference/services/kafkaconnect.json +1 -0
  238. package/src/data/servicereference/services/kendra-ranking.json +1 -0
  239. package/src/data/servicereference/services/kendra.json +1 -0
  240. package/src/data/servicereference/services/kinesis.json +1 -0
  241. package/src/data/servicereference/services/kinesisanalytics.json +1 -0
  242. package/src/data/servicereference/services/kinesisvideo.json +1 -0
  243. package/src/data/servicereference/services/kms.json +1 -0
  244. package/src/data/servicereference/services/lakeformation.json +1 -0
  245. package/src/data/servicereference/services/lambda.json +1 -0
  246. package/src/data/servicereference/services/launchwizard.json +1 -0
  247. package/src/data/servicereference/services/lex.json +1 -0
  248. package/src/data/servicereference/services/license-manager-linux-subscriptions.json +1 -0
  249. package/src/data/servicereference/services/license-manager-user-subscriptions.json +1 -0
  250. package/src/data/servicereference/services/license-manager.json +1 -0
  251. package/src/data/servicereference/services/lightsail.json +1 -0
  252. package/src/data/servicereference/services/logs.json +1 -0
  253. package/src/data/servicereference/services/lookoutequipment.json +1 -0
  254. package/src/data/servicereference/services/lookoutmetrics.json +1 -0
  255. package/src/data/servicereference/services/lookoutvision.json +1 -0
  256. package/src/data/servicereference/services/m2.json +1 -0
  257. package/src/data/servicereference/services/machinelearning.json +1 -0
  258. package/src/data/servicereference/services/macie2.json +1 -0
  259. package/src/data/servicereference/services/managedblockchain-query.json +1 -0
  260. package/src/data/servicereference/services/managedblockchain.json +1 -0
  261. package/src/data/servicereference/services/mapcredits.json +1 -0
  262. package/src/data/servicereference/services/marketplacecommerceanalytics.json +1 -0
  263. package/src/data/servicereference/services/mechanicalturk.json +1 -0
  264. package/src/data/servicereference/services/mediaconnect.json +1 -0
  265. package/src/data/servicereference/services/mediaconvert.json +1 -0
  266. package/src/data/servicereference/services/mediaimport.json +1 -0
  267. package/src/data/servicereference/services/medialive.json +1 -0
  268. package/src/data/servicereference/services/mediapackage-vod.json +1 -0
  269. package/src/data/servicereference/services/mediapackage.json +1 -0
  270. package/src/data/servicereference/services/mediapackagev2.json +1 -0
  271. package/src/data/servicereference/services/mediastore.json +1 -0
  272. package/src/data/servicereference/services/mediatailor.json +1 -0
  273. package/src/data/servicereference/services/medical-imaging.json +1 -0
  274. package/src/data/servicereference/services/memorydb.json +1 -0
  275. package/src/data/servicereference/services/mgh.json +1 -0
  276. package/src/data/servicereference/services/mgn.json +1 -0
  277. package/src/data/servicereference/services/migrationhub-orchestrator.json +1 -0
  278. package/src/data/servicereference/services/migrationhub-strategy.json +1 -0
  279. package/src/data/servicereference/services/mobileanalytics.json +1 -0
  280. package/src/data/servicereference/services/mobiletargeting.json +1 -0
  281. package/src/data/servicereference/services/monitron.json +1 -0
  282. package/src/data/servicereference/services/mpa.json +1 -0
  283. package/src/data/servicereference/services/mq.json +1 -0
  284. package/src/data/servicereference/services/neptune-db.json +1 -0
  285. package/src/data/servicereference/services/neptune-graph.json +1 -0
  286. package/src/data/servicereference/services/network-firewall.json +1 -0
  287. package/src/data/servicereference/services/network-security-director.json +1 -0
  288. package/src/data/servicereference/services/networkflowmonitor.json +1 -0
  289. package/src/data/servicereference/services/networkmanager-chat.json +1 -0
  290. package/src/data/servicereference/services/networkmanager.json +1 -0
  291. package/src/data/servicereference/services/networkmonitor.json +1 -0
  292. package/src/data/servicereference/services/nimble.json +1 -0
  293. package/src/data/servicereference/services/notifications-contacts.json +1 -0
  294. package/src/data/servicereference/services/notifications.json +1 -0
  295. package/src/data/servicereference/services/nova-act.json +1 -0
  296. package/src/data/servicereference/services/oam.json +1 -0
  297. package/src/data/servicereference/services/observabilityadmin.json +1 -0
  298. package/src/data/servicereference/services/odb.json +1 -0
  299. package/src/data/servicereference/services/omics.json +1 -0
  300. package/src/data/servicereference/services/one.json +1 -0
  301. package/src/data/servicereference/services/opensearch.json +1 -0
  302. package/src/data/servicereference/services/opsworks-cm.json +1 -0
  303. package/src/data/servicereference/services/opsworks.json +1 -0
  304. package/src/data/servicereference/services/organizations.json +1 -0
  305. package/src/data/servicereference/services/osis.json +1 -0
  306. package/src/data/servicereference/services/outposts.json +1 -0
  307. package/src/data/servicereference/services/panorama.json +1 -0
  308. package/src/data/servicereference/services/partnercentral-account-management.json +1 -0
  309. package/src/data/servicereference/services/partnercentral.json +1 -0
  310. package/src/data/servicereference/services/payment-cryptography.json +1 -0
  311. package/src/data/servicereference/services/payments.json +1 -0
  312. package/src/data/servicereference/services/pca-connector-ad.json +1 -0
  313. package/src/data/servicereference/services/pca-connector-scep.json +1 -0
  314. package/src/data/servicereference/services/pcs.json +1 -0
  315. package/src/data/servicereference/services/personalize.json +1 -0
  316. package/src/data/servicereference/services/pi.json +1 -0
  317. package/src/data/servicereference/services/pipes.json +1 -0
  318. package/src/data/servicereference/services/polly.json +1 -0
  319. package/src/data/servicereference/services/pricing.json +1 -0
  320. package/src/data/servicereference/services/pricingplanmanager.json +1 -0
  321. package/src/data/servicereference/services/private-networks.json +1 -0
  322. package/src/data/servicereference/services/profile.json +1 -0
  323. package/src/data/servicereference/services/proton.json +1 -0
  324. package/src/data/servicereference/services/purchase-orders.json +1 -0
  325. package/src/data/servicereference/services/q.json +1 -0
  326. package/src/data/servicereference/services/qapps.json +1 -0
  327. package/src/data/servicereference/services/qbusiness.json +1 -0
  328. package/src/data/servicereference/services/qdeveloper.json +1 -0
  329. package/src/data/servicereference/services/qldb.json +1 -0
  330. package/src/data/servicereference/services/quicksight.json +1 -0
  331. package/src/data/servicereference/services/ram.json +1 -0
  332. package/src/data/servicereference/services/rbin.json +1 -0
  333. package/src/data/servicereference/services/rds-data.json +1 -0
  334. package/src/data/servicereference/services/rds-db.json +1 -0
  335. package/src/data/servicereference/services/rds.json +1 -0
  336. package/src/data/servicereference/services/redshift-data.json +1 -0
  337. package/src/data/servicereference/services/redshift-serverless.json +1 -0
  338. package/src/data/servicereference/services/redshift.json +1 -0
  339. package/src/data/servicereference/services/refactor-spaces.json +1 -0
  340. package/src/data/servicereference/services/rekognition.json +1 -0
  341. package/src/data/servicereference/services/repostspace.json +1 -0
  342. package/src/data/servicereference/services/resiliencehub.json +1 -0
  343. package/src/data/servicereference/services/resource-explorer-2.json +1 -0
  344. package/src/data/servicereference/services/resource-explorer.json +1 -0
  345. package/src/data/servicereference/services/resource-groups.json +1 -0
  346. package/src/data/servicereference/services/rhelkb.json +1 -0
  347. package/src/data/servicereference/services/robomaker.json +1 -0
  348. package/src/data/servicereference/services/rolesanywhere.json +1 -0
  349. package/src/data/servicereference/services/route53-recovery-cluster.json +1 -0
  350. package/src/data/servicereference/services/route53-recovery-control-config.json +1 -0
  351. package/src/data/servicereference/services/route53-recovery-readiness.json +1 -0
  352. package/src/data/servicereference/services/route53.json +1 -0
  353. package/src/data/servicereference/services/route53domains.json +1 -0
  354. package/src/data/servicereference/services/route53globalresolver.json +1 -0
  355. package/src/data/servicereference/services/route53profiles.json +1 -0
  356. package/src/data/servicereference/services/route53resolver.json +1 -0
  357. package/src/data/servicereference/services/rtbfabric.json +1 -0
  358. package/src/data/servicereference/services/rum.json +1 -0
  359. package/src/data/servicereference/services/s3-object-lambda.json +1 -0
  360. package/src/data/servicereference/services/s3-outposts.json +1 -0
  361. package/src/data/servicereference/services/s3.json +1 -0
  362. package/src/data/servicereference/services/s3express.json +1 -0
  363. package/src/data/servicereference/services/s3tables.json +1 -0
  364. package/src/data/servicereference/services/s3vectors.json +1 -0
  365. package/src/data/servicereference/services/sagemaker-data-science-assistant.json +1 -0
  366. package/src/data/servicereference/services/sagemaker-geospatial.json +1 -0
  367. package/src/data/servicereference/services/sagemaker-mlflow.json +1 -0
  368. package/src/data/servicereference/services/sagemaker-unified-studio-mcp.json +1 -0
  369. package/src/data/servicereference/services/sagemaker.json +1 -0
  370. package/src/data/servicereference/services/savingsplans.json +1 -0
  371. package/src/data/servicereference/services/scheduler.json +1 -0
  372. package/src/data/servicereference/services/schemas.json +1 -0
  373. package/src/data/servicereference/services/scn.json +1 -0
  374. package/src/data/servicereference/services/sdb.json +1 -0
  375. package/src/data/servicereference/services/secretsmanager.json +1 -0
  376. package/src/data/servicereference/services/security-ir.json +1 -0
  377. package/src/data/servicereference/services/securityagent.json +1 -0
  378. package/src/data/servicereference/services/securityhub.json +1 -0
  379. package/src/data/servicereference/services/securitylake.json +1 -0
  380. package/src/data/servicereference/services/serverlessrepo.json +1 -0
  381. package/src/data/servicereference/services/servicecatalog.json +1 -0
  382. package/src/data/servicereference/services/servicediscovery.json +1 -0
  383. package/src/data/servicereference/services/serviceextract.json +1 -0
  384. package/src/data/servicereference/services/servicequotas.json +1 -0
  385. package/src/data/servicereference/services/ses.json +1 -0
  386. package/src/data/servicereference/services/shield.json +1 -0
  387. package/src/data/servicereference/services/signer.json +1 -0
  388. package/src/data/servicereference/services/signin.json +1 -0
  389. package/src/data/servicereference/services/simspaceweaver.json +1 -0
  390. package/src/data/servicereference/services/sms-voice.json +1 -0
  391. package/src/data/servicereference/services/sms.json +1 -0
  392. package/src/data/servicereference/services/snow-device-management.json +1 -0
  393. package/src/data/servicereference/services/snowball.json +1 -0
  394. package/src/data/servicereference/services/sns.json +1 -0
  395. package/src/data/servicereference/services/social-messaging.json +1 -0
  396. package/src/data/servicereference/services/sqlworkbench.json +1 -0
  397. package/src/data/servicereference/services/sqs.json +1 -0
  398. package/src/data/servicereference/services/ssm-contacts.json +1 -0
  399. package/src/data/servicereference/services/ssm-guiconnect.json +1 -0
  400. package/src/data/servicereference/services/ssm-incidents.json +1 -0
  401. package/src/data/servicereference/services/ssm-quicksetup.json +1 -0
  402. package/src/data/servicereference/services/ssm-sap.json +1 -0
  403. package/src/data/servicereference/services/ssm.json +1 -0
  404. package/src/data/servicereference/services/ssmmessages.json +1 -0
  405. package/src/data/servicereference/services/sso-directory.json +1 -0
  406. package/src/data/servicereference/services/sso-oauth.json +1 -0
  407. package/src/data/servicereference/services/sso.json +1 -0
  408. package/src/data/servicereference/services/states.json +1 -0
  409. package/src/data/servicereference/services/storagegateway.json +1 -0
  410. package/src/data/servicereference/services/sts.json +1 -0
  411. package/src/data/servicereference/services/support-console.json +1 -0
  412. package/src/data/servicereference/services/support.json +1 -0
  413. package/src/data/servicereference/services/supportapp.json +1 -0
  414. package/src/data/servicereference/services/supportplans.json +1 -0
  415. package/src/data/servicereference/services/sustainability.json +1 -0
  416. package/src/data/servicereference/services/swf.json +1 -0
  417. package/src/data/servicereference/services/synthetics.json +1 -0
  418. package/src/data/servicereference/services/tag.json +1 -0
  419. package/src/data/servicereference/services/tax.json +1 -0
  420. package/src/data/servicereference/services/textract.json +1 -0
  421. package/src/data/servicereference/services/thinclient.json +1 -0
  422. package/src/data/servicereference/services/timestream-influxdb.json +1 -0
  423. package/src/data/servicereference/services/timestream.json +1 -0
  424. package/src/data/servicereference/services/tiros.json +1 -0
  425. package/src/data/servicereference/services/tnb.json +1 -0
  426. package/src/data/servicereference/services/transcribe.json +1 -0
  427. package/src/data/servicereference/services/transfer.json +1 -0
  428. package/src/data/servicereference/services/transform-custom.json +1 -0
  429. package/src/data/servicereference/services/transform.json +1 -0
  430. package/src/data/servicereference/services/translate.json +1 -0
  431. package/src/data/servicereference/services/trustedadvisor.json +1 -0
  432. package/src/data/servicereference/services/ts.json +1 -0
  433. package/src/data/servicereference/services/user-subscriptions.json +1 -0
  434. package/src/data/servicereference/services/uxc.json +1 -0
  435. package/src/data/servicereference/services/vendor-insights.json +1 -0
  436. package/src/data/servicereference/services/verified-access.json +1 -0
  437. package/src/data/servicereference/services/verifiedpermissions.json +1 -0
  438. package/src/data/servicereference/services/voiceid.json +1 -0
  439. package/src/data/servicereference/services/vpc-lattice-svcs.json +1 -0
  440. package/src/data/servicereference/services/vpc-lattice.json +1 -0
  441. package/src/data/servicereference/services/vpce.json +1 -0
  442. package/src/data/servicereference/services/waf-regional.json +1 -0
  443. package/src/data/servicereference/services/waf.json +1 -0
  444. package/src/data/servicereference/services/wafv2.json +1 -0
  445. package/src/data/servicereference/services/wam.json +1 -0
  446. package/src/data/servicereference/services/wellarchitected.json +1 -0
  447. package/src/data/servicereference/services/wickr.json +1 -0
  448. package/src/data/servicereference/services/wisdom.json +1 -0
  449. package/src/data/servicereference/services/workdocs.json +1 -0
  450. package/src/data/servicereference/services/worklink.json +1 -0
  451. package/src/data/servicereference/services/workmail.json +1 -0
  452. package/src/data/servicereference/services/workmailmessageflow.json +1 -0
  453. package/src/data/servicereference/services/workspaces-instances.json +1 -0
  454. package/src/data/servicereference/services/workspaces-web.json +1 -0
  455. package/src/data/servicereference/services/workspaces.json +1 -0
  456. package/src/data/servicereference/services/xray.json +1 -0
  457. package/src/data/servicereference/services.json +1 -0
  458. package/src/extension.d.ts +3 -0
  459. package/src/extension.js +23 -0
  460. package/src/grammars/tree-sitter-hcl.wasm +0 -0
  461. package/src/grammars/tree-sitter-json.wasm +0 -0
  462. package/src/grammars/tree-sitter-yaml.wasm +0 -0
  463. package/src/handlers/completion/action-value.d.ts +4 -0
  464. package/src/handlers/completion/action-value.js +46 -0
  465. package/src/handlers/completion/condition-block.d.ts +4 -0
  466. package/src/handlers/completion/condition-block.js +31 -0
  467. package/src/handlers/completion/condition-key.d.ts +4 -0
  468. package/src/handlers/completion/condition-key.js +80 -0
  469. package/src/handlers/completion/condition-operator.d.ts +4 -0
  470. package/src/handlers/completion/condition-operator.js +22 -0
  471. package/src/handlers/completion/effect-value.d.ts +4 -0
  472. package/src/handlers/completion/effect-value.js +14 -0
  473. package/src/handlers/completion/index.d.ts +14 -0
  474. package/src/handlers/completion/index.js +96 -0
  475. package/src/handlers/completion/principal-block-identifier.d.ts +4 -0
  476. package/src/handlers/completion/principal-block-identifier.js +4 -0
  477. package/src/handlers/completion/principal-block-type.d.ts +4 -0
  478. package/src/handlers/completion/principal-block-type.js +24 -0
  479. package/src/handlers/completion/principal-block.d.ts +4 -0
  480. package/src/handlers/completion/principal-block.js +28 -0
  481. package/src/handlers/completion/principal-identifier-completions.d.ts +2 -0
  482. package/src/handlers/completion/principal-identifier-completions.js +131 -0
  483. package/src/handlers/completion/principal-type.d.ts +4 -0
  484. package/src/handlers/completion/principal-type.js +23 -0
  485. package/src/handlers/completion/principal-typed-value.d.ts +4 -0
  486. package/src/handlers/completion/principal-typed-value.js +4 -0
  487. package/src/handlers/completion/principal-value.d.ts +4 -0
  488. package/src/handlers/completion/principal-value.js +18 -0
  489. package/src/handlers/completion/resource-value.d.ts +4 -0
  490. package/src/handlers/completion/resource-value.js +144 -0
  491. package/src/handlers/completion/statement-block.d.ts +10 -0
  492. package/src/handlers/completion/statement-block.js +51 -0
  493. package/src/handlers/completion/statement-key.d.ts +4 -0
  494. package/src/handlers/completion/statement-key.js +41 -0
  495. package/src/lib/iam-policy/condition-operators.d.ts +317 -0
  496. package/src/lib/iam-policy/condition-operators.js +129 -0
  497. package/src/lib/iam-policy/location.d.ts +71 -0
  498. package/src/lib/iam-policy/location.js +82 -0
  499. package/src/lib/iam-policy/partitions.d.ts +116 -0
  500. package/src/lib/iam-policy/partitions.js +51 -0
  501. package/src/lib/iam-policy/principals.d.ts +21 -0
  502. package/src/lib/iam-policy/principals.js +37 -0
  503. package/src/lib/iam-policy/reference/services.d.ts +22 -0
  504. package/src/lib/iam-policy/reference/services.js +99 -0
  505. package/src/lib/iam-policy/reference/types.d.ts +71 -0
  506. package/src/lib/iam-policy/reference/types.js +1 -0
  507. package/src/lib/iam-policy/statement-keys.d.ts +8 -0
  508. package/src/lib/iam-policy/statement-keys.js +159 -0
  509. package/src/lib/iam-policy/wildcard.d.ts +2 -0
  510. package/src/lib/iam-policy/wildcard.js +14 -0
  511. package/src/lib/treesitter/base.d.ts +35 -0
  512. package/src/lib/treesitter/base.js +50 -0
  513. package/src/lib/treesitter/hcl.d.ts +9 -0
  514. package/src/lib/treesitter/hcl.js +888 -0
  515. package/src/lib/treesitter/json.d.ts +9 -0
  516. package/src/lib/treesitter/json.js +376 -0
  517. package/src/lib/treesitter/manager.d.ts +9 -0
  518. package/src/lib/treesitter/manager.js +66 -0
  519. package/src/lib/treesitter/yaml.d.ts +9 -0
  520. package/src/lib/treesitter/yaml.js +878 -0
  521. package/src/server.d.ts +2 -0
  522. package/src/server.js +26 -0
@@ -0,0 +1,2156 @@
1
+ unset shellHook
2
+ PATH=${PATH:-}
3
+ nix_saved_PATH="$PATH"
4
+ XDG_DATA_DIRS=${XDG_DATA_DIRS:-}
5
+ nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS"
6
+ AR='ar'
7
+ export AR
8
+ AS='as'
9
+ export AS
10
+ BASH='/nix/store/3zrx6av2d1141igkcn8477cvbfqpcmcf-bash-5.3p9/bin/bash'
11
+ CC='clang'
12
+ export CC
13
+ CONFIG_SHELL='/nix/store/3zrx6av2d1141igkcn8477cvbfqpcmcf-bash-5.3p9/bin/bash'
14
+ export CONFIG_SHELL
15
+ CXX='clang++'
16
+ export CXX
17
+ DEVELOPER_DIR='/nix/store/49rnbvkp4nywgr2pqcmii0dr4sbj9zs7-apple-sdk-14.4'
18
+ export DEVELOPER_DIR
19
+ HOSTTYPE='aarch64'
20
+ HOST_PATH='/nix/store/ik1b3z19bgk8lagf461zq222kxrpdynb-libiconv-109.100.2/bin:/nix/store/chdj76m79c3lbwdn6bflwlqa2n2igx02-coreutils-9.10/bin:/nix/store/laagkkm7lnm746374c4cii932b77pmaw-findutils-4.10.0/bin:/nix/store/0xkxjb418kdssdxx3c8filikjqhzxwcx-diffutils-3.12/bin:/nix/store/xzsihjm86aqgqarrzifrzr4sfchw4225-gnused-4.9/bin:/nix/store/5f96fidrw1fhyv8kxmx1d31m7qymlqdd-gnugrep-3.12/bin:/nix/store/i45ysli6zxj414lyyyhrl19ir3jkfdna-gawk-5.3.2/bin:/nix/store/2q9piicbr4dws7xi4xggb1nqs08k541h-gnutar-1.35/bin:/nix/store/ayfjrsaf6firgmr4h0a2v3g61yl07a6n-gzip-1.14/bin:/nix/store/7bp4xz524b106ay6hxp27k83p50ziv4w-bzip2-1.0.8-bin/bin:/nix/store/l8jkq4dnsknlxz436w6gw5rcm09mvq6p-gnumake-4.4.1/bin:/nix/store/3zrx6av2d1141igkcn8477cvbfqpcmcf-bash-5.3p9/bin:/nix/store/67a37s907bmcms143slallmjnsh2s7w8-patch-2.8/bin:/nix/store/61cj6q1qv2dibpmryaccn4drwc55ysv8-xz-5.8.2-bin/bin:/nix/store/z4nj80nfcllba9n6drf4axylzb24s15k-file-5.45/bin'
21
+ export HOST_PATH
22
+ IFS='
23
+ '
24
+ IN_NIX_SHELL='impure'
25
+ export IN_NIX_SHELL
26
+ LD='ld'
27
+ export LD
28
+ LD_DYLD_PATH='/usr/lib/dyld'
29
+ export LD_DYLD_PATH
30
+ LINENO='76'
31
+ MACHTYPE='aarch64-apple-darwin25.2.0'
32
+ MACOSX_DEPLOYMENT_TARGET='14.0'
33
+ export MACOSX_DEPLOYMENT_TARGET
34
+ NIX_APPLE_SDK_VERSION='140400'
35
+ export NIX_APPLE_SDK_VERSION
36
+ NIX_BINTOOLS='/nix/store/qkqww6ccw4n4px5jzs1fkcg9yh1jnbxl-cctools-binutils-darwin-wrapper-1010.6'
37
+ export NIX_BINTOOLS
38
+ NIX_BINTOOLS_WRAPPER_TARGET_HOST_arm64_apple_darwin='1'
39
+ export NIX_BINTOOLS_WRAPPER_TARGET_HOST_arm64_apple_darwin
40
+ NIX_BUILD_CORES='15'
41
+ export NIX_BUILD_CORES
42
+ NIX_CC='/nix/store/vl936sd1vj8s008akm3gibkgyqk30qhz-clang-wrapper-21.1.8'
43
+ export NIX_CC
44
+ NIX_CC_WRAPPER_TARGET_HOST_arm64_apple_darwin='1'
45
+ export NIX_CC_WRAPPER_TARGET_HOST_arm64_apple_darwin
46
+ NIX_CFLAGS_COMPILE=' -frandom-seed=zr8cn2wi8i -isystem /nix/store/cx0jd5mwhn7ihryyv0qp9d33f8s1iwb7-nodejs-24.13.0/include -fmacro-prefix-map=/nix/store/cx0jd5mwhn7ihryyv0qp9d33f8s1iwb7-nodejs-24.13.0=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-nodejs-24.13.0 -isystem /nix/store/g0r7lnyajlqwkkshzwcasa1swnqlr6fs-libcxx-20.1.0+apple-sdk-26.0/include -fmacro-prefix-map=/nix/store/g0r7lnyajlqwkkshzwcasa1swnqlr6fs-libcxx-20.1.0+apple-sdk-26.0=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libcxx-20.1.0+apple-sdk-26.0 -isystem /nix/store/2adqlqhmwxglc2f0r7fxa5wdlavjn21r-compiler-rt-libc-21.1.8-dev/include -fmacro-prefix-map=/nix/store/2adqlqhmwxglc2f0r7fxa5wdlavjn21r-compiler-rt-libc-21.1.8-dev=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-compiler-rt-libc-21.1.8-dev -isystem /nix/store/gkyk559bh4zzxh0wfvzqi6zj3rdn0d9q-libiconv-109.100.2-dev/include -fmacro-prefix-map=/nix/store/gkyk559bh4zzxh0wfvzqi6zj3rdn0d9q-libiconv-109.100.2-dev=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libiconv-109.100.2-dev -isystem /nix/store/y02fcdl0bx02pkmbsbxks8nmy7yxvanf-libresolv-91-dev/include -fmacro-prefix-map=/nix/store/y02fcdl0bx02pkmbsbxks8nmy7yxvanf-libresolv-91-dev=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libresolv-91-dev -isystem /nix/store/w1q5dsq93j18clmn9pzqgl88n7v5j2v9-libsbuf-14.1.0-dev/include -fmacro-prefix-map=/nix/store/w1q5dsq93j18clmn9pzqgl88n7v5j2v9-libsbuf-14.1.0-dev=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libsbuf-14.1.0-dev -isystem /nix/store/cx0jd5mwhn7ihryyv0qp9d33f8s1iwb7-nodejs-24.13.0/include -fmacro-prefix-map=/nix/store/cx0jd5mwhn7ihryyv0qp9d33f8s1iwb7-nodejs-24.13.0=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-nodejs-24.13.0 -isystem /nix/store/g0r7lnyajlqwkkshzwcasa1swnqlr6fs-libcxx-20.1.0+apple-sdk-26.0/include -fmacro-prefix-map=/nix/store/g0r7lnyajlqwkkshzwcasa1swnqlr6fs-libcxx-20.1.0+apple-sdk-26.0=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libcxx-20.1.0+apple-sdk-26.0 -isystem /nix/store/2adqlqhmwxglc2f0r7fxa5wdlavjn21r-compiler-rt-libc-21.1.8-dev/include -fmacro-prefix-map=/nix/store/2adqlqhmwxglc2f0r7fxa5wdlavjn21r-compiler-rt-libc-21.1.8-dev=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-compiler-rt-libc-21.1.8-dev -isystem /nix/store/gkyk559bh4zzxh0wfvzqi6zj3rdn0d9q-libiconv-109.100.2-dev/include -fmacro-prefix-map=/nix/store/gkyk559bh4zzxh0wfvzqi6zj3rdn0d9q-libiconv-109.100.2-dev=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libiconv-109.100.2-dev -isystem /nix/store/y02fcdl0bx02pkmbsbxks8nmy7yxvanf-libresolv-91-dev/include -fmacro-prefix-map=/nix/store/y02fcdl0bx02pkmbsbxks8nmy7yxvanf-libresolv-91-dev=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libresolv-91-dev -isystem /nix/store/w1q5dsq93j18clmn9pzqgl88n7v5j2v9-libsbuf-14.1.0-dev/include -fmacro-prefix-map=/nix/store/w1q5dsq93j18clmn9pzqgl88n7v5j2v9-libsbuf-14.1.0-dev=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libsbuf-14.1.0-dev'
47
+ export NIX_CFLAGS_COMPILE
48
+ NIX_DONT_SET_RPATH='1'
49
+ export NIX_DONT_SET_RPATH
50
+ NIX_DONT_SET_RPATH_FOR_BUILD='1'
51
+ export NIX_DONT_SET_RPATH_FOR_BUILD
52
+ NIX_ENFORCE_NO_NATIVE='1'
53
+ export NIX_ENFORCE_NO_NATIVE
54
+ NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningextensive libcxxhardeningfast pic relro stackclashprotection stackprotector strictoverflow zerocallusedregs'
55
+ export NIX_HARDENING_ENABLE
56
+ NIX_IGNORE_LD_THROUGH_GCC='1'
57
+ export NIX_IGNORE_LD_THROUGH_GCC
58
+ NIX_LDFLAGS=' -L/nix/store/g0r7lnyajlqwkkshzwcasa1swnqlr6fs-libcxx-20.1.0+apple-sdk-26.0/lib -L/nix/store/16j7rnr03s8ssn0q9nwf3ncj7aj2pqd3-compiler-rt-libc-21.1.8/lib -L/nix/store/ik1b3z19bgk8lagf461zq222kxrpdynb-libiconv-109.100.2/lib -L/nix/store/r0vyrwqczqhfa64ybmz1ag57ssvbxakh-libresolv-91/lib -L/nix/store/q0l5wfnkkhynp14mpl1pk33xhzsaif38-libsbuf-14.1.0/lib -L/nix/store/0zwkfp018d8qpx2lyppvn07rbgvblps4-libutil-72/lib -L/nix/store/g0r7lnyajlqwkkshzwcasa1swnqlr6fs-libcxx-20.1.0+apple-sdk-26.0/lib -L/nix/store/16j7rnr03s8ssn0q9nwf3ncj7aj2pqd3-compiler-rt-libc-21.1.8/lib -L/nix/store/ik1b3z19bgk8lagf461zq222kxrpdynb-libiconv-109.100.2/lib -L/nix/store/r0vyrwqczqhfa64ybmz1ag57ssvbxakh-libresolv-91/lib -L/nix/store/q0l5wfnkkhynp14mpl1pk33xhzsaif38-libsbuf-14.1.0/lib -L/nix/store/0zwkfp018d8qpx2lyppvn07rbgvblps4-libutil-72/lib'
59
+ export NIX_LDFLAGS
60
+ NIX_NO_SELF_RPATH='1'
61
+ export NIX_NO_SELF_RPATH
62
+ NIX_STORE='/nix/store'
63
+ export NIX_STORE
64
+ NM='nm'
65
+ export NM
66
+ OBJCOPY='objcopy'
67
+ export OBJCOPY
68
+ OBJDUMP='objdump'
69
+ export OBJDUMP
70
+ OLDPWD=''
71
+ export OLDPWD
72
+ OPTERR='1'
73
+ OSTYPE='darwin25.2.0'
74
+ PATH='/nix/store/cx0jd5mwhn7ihryyv0qp9d33f8s1iwb7-nodejs-24.13.0/bin:/nix/store/vl936sd1vj8s008akm3gibkgyqk30qhz-clang-wrapper-21.1.8/bin:/nix/store/rr64nnycczvx7s1b110qmvqrlfcb6lsm-clang-21.1.8/bin:/nix/store/chdj76m79c3lbwdn6bflwlqa2n2igx02-coreutils-9.10/bin:/nix/store/qkqww6ccw4n4px5jzs1fkcg9yh1jnbxl-cctools-binutils-darwin-wrapper-1010.6/bin:/nix/store/020z53qny5xbgxi1r5j3l27r135zmrjy-cctools-binutils-darwin-1010.6/bin:/nix/store/4wy2b9dipk7h7c6i444ipys9kq00f4qc-xcbuild-0.1.1-unstable-2019-11-20-xcrun/bin:/nix/store/ik1b3z19bgk8lagf461zq222kxrpdynb-libiconv-109.100.2/bin:/nix/store/chdj76m79c3lbwdn6bflwlqa2n2igx02-coreutils-9.10/bin:/nix/store/laagkkm7lnm746374c4cii932b77pmaw-findutils-4.10.0/bin:/nix/store/0xkxjb418kdssdxx3c8filikjqhzxwcx-diffutils-3.12/bin:/nix/store/xzsihjm86aqgqarrzifrzr4sfchw4225-gnused-4.9/bin:/nix/store/5f96fidrw1fhyv8kxmx1d31m7qymlqdd-gnugrep-3.12/bin:/nix/store/i45ysli6zxj414lyyyhrl19ir3jkfdna-gawk-5.3.2/bin:/nix/store/2q9piicbr4dws7xi4xggb1nqs08k541h-gnutar-1.35/bin:/nix/store/ayfjrsaf6firgmr4h0a2v3g61yl07a6n-gzip-1.14/bin:/nix/store/7bp4xz524b106ay6hxp27k83p50ziv4w-bzip2-1.0.8-bin/bin:/nix/store/l8jkq4dnsknlxz436w6gw5rcm09mvq6p-gnumake-4.4.1/bin:/nix/store/3zrx6av2d1141igkcn8477cvbfqpcmcf-bash-5.3p9/bin:/nix/store/67a37s907bmcms143slallmjnsh2s7w8-patch-2.8/bin:/nix/store/61cj6q1qv2dibpmryaccn4drwc55ysv8-xz-5.8.2-bin/bin:/nix/store/z4nj80nfcllba9n6drf4axylzb24s15k-file-5.45/bin'
75
+ export PATH
76
+ PATH_LOCALE='/nix/store/njmig5gp6llav5ds1yhvi7r0l38ihds3-locale-118/share/locale'
77
+ export PATH_LOCALE
78
+ PS4='+ '
79
+ RANLIB='ranlib'
80
+ export RANLIB
81
+ SDKROOT='/nix/store/49rnbvkp4nywgr2pqcmii0dr4sbj9zs7-apple-sdk-14.4/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk'
82
+ export SDKROOT
83
+ SHELL='/nix/store/3zrx6av2d1141igkcn8477cvbfqpcmcf-bash-5.3p9/bin/bash'
84
+ export SHELL
85
+ SIZE='size'
86
+ export SIZE
87
+ SOURCE_DATE_EPOCH='315532800'
88
+ export SOURCE_DATE_EPOCH
89
+ STRINGS='strings'
90
+ export STRINGS
91
+ STRIP='strip'
92
+ export STRIP
93
+ XDG_DATA_DIRS='/nix/store/cx0jd5mwhn7ihryyv0qp9d33f8s1iwb7-nodejs-24.13.0/share'
94
+ export XDG_DATA_DIRS
95
+ ZERO_AR_DATE='1'
96
+ export ZERO_AR_DATE
97
+ __darwinAllowLocalNetworking=''
98
+ export __darwinAllowLocalNetworking
99
+ __impureHostDeps='/bin/sh /usr/lib/libSystem.B.dylib /usr/lib/system/libunc.dylib /dev/zero /dev/random /dev/urandom /bin/sh'
100
+ export __impureHostDeps
101
+ __propagatedImpureHostDeps=''
102
+ export __propagatedImpureHostDeps
103
+ __propagatedSandboxProfile=''
104
+ export __propagatedSandboxProfile
105
+ __sandboxProfile=''
106
+ export __sandboxProfile
107
+ __structuredAttrs=''
108
+ export __structuredAttrs
109
+ _substituteStream_has_warned_replace_deprecation='false'
110
+ buildInputs=''
111
+ export buildInputs
112
+ buildPhase='{ echo "------------------------------------------------------------";
113
+ echo " WARNING: the existence of this path is not guaranteed.";
114
+ echo " It is an internal implementation detail for pkgs.mkShell.";
115
+ echo "------------------------------------------------------------";
116
+ echo;
117
+ # Record all build inputs as runtime dependencies
118
+ export;
119
+ } >> "$out"
120
+ '
121
+ export buildPhase
122
+ builder='/nix/store/3zrx6av2d1141igkcn8477cvbfqpcmcf-bash-5.3p9/bin/bash'
123
+ export builder
124
+ cmakeFlags=''
125
+ export cmakeFlags
126
+ configureFlags=''
127
+ export configureFlags
128
+ defaultBuildInputs='/nix/store/49rnbvkp4nywgr2pqcmii0dr4sbj9zs7-apple-sdk-14.4'
129
+ defaultNativeBuildInputs='/nix/store/23c6sxdfaa5r38ihc7y575vv7j4qs4sk-update-autotools-gnu-config-scripts-hook /nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh /nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh /nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh /nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh /nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh /nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh /nix/store/vl936sd1vj8s008akm3gibkgyqk30qhz-clang-wrapper-21.1.8'
130
+ depsBuildBuild=''
131
+ export depsBuildBuild
132
+ depsBuildBuildPropagated=''
133
+ export depsBuildBuildPropagated
134
+ depsBuildTarget=''
135
+ export depsBuildTarget
136
+ depsBuildTargetPropagated=''
137
+ export depsBuildTargetPropagated
138
+ depsHostHost=''
139
+ export depsHostHost
140
+ depsHostHostPropagated=''
141
+ export depsHostHostPropagated
142
+ depsTargetTarget=''
143
+ export depsTargetTarget
144
+ depsTargetTargetPropagated=''
145
+ export depsTargetTargetPropagated
146
+ doCheck=''
147
+ export doCheck
148
+ doInstallCheck=''
149
+ export doInstallCheck
150
+ dontAddDisableDepTrack='1'
151
+ export dontAddDisableDepTrack
152
+ declare -a envBuildBuildHooks=()
153
+ declare -a envBuildHostHooks=()
154
+ declare -a envBuildTargetHooks=()
155
+ declare -a envHostHostHooks=('ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' )
156
+ declare -a envHostTargetHooks=('ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' )
157
+ declare -a envTargetTargetHooks=()
158
+ declare -a fixupOutputHooks=('if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' )
159
+ initialPath='/nix/store/chdj76m79c3lbwdn6bflwlqa2n2igx02-coreutils-9.10 /nix/store/laagkkm7lnm746374c4cii932b77pmaw-findutils-4.10.0 /nix/store/0xkxjb418kdssdxx3c8filikjqhzxwcx-diffutils-3.12 /nix/store/xzsihjm86aqgqarrzifrzr4sfchw4225-gnused-4.9 /nix/store/5f96fidrw1fhyv8kxmx1d31m7qymlqdd-gnugrep-3.12 /nix/store/i45ysli6zxj414lyyyhrl19ir3jkfdna-gawk-5.3.2 /nix/store/2q9piicbr4dws7xi4xggb1nqs08k541h-gnutar-1.35 /nix/store/ayfjrsaf6firgmr4h0a2v3g61yl07a6n-gzip-1.14 /nix/store/7bp4xz524b106ay6hxp27k83p50ziv4w-bzip2-1.0.8-bin /nix/store/l8jkq4dnsknlxz436w6gw5rcm09mvq6p-gnumake-4.4.1 /nix/store/3zrx6av2d1141igkcn8477cvbfqpcmcf-bash-5.3p9 /nix/store/67a37s907bmcms143slallmjnsh2s7w8-patch-2.8 /nix/store/61cj6q1qv2dibpmryaccn4drwc55ysv8-xz-5.8.2-bin /nix/store/z4nj80nfcllba9n6drf4axylzb24s15k-file-5.45'
160
+ mesonFlags=''
161
+ export mesonFlags
162
+ name='nix-shell-env'
163
+ export name
164
+ nativeBuildInputs='/nix/store/cx0jd5mwhn7ihryyv0qp9d33f8s1iwb7-nodejs-24.13.0'
165
+ export nativeBuildInputs
166
+ out='/Users/mbarney/dev/personal/aws-iam-ls/outputs/out'
167
+ export out
168
+ outputBin='out'
169
+ outputDev='out'
170
+ outputDevdoc='REMOVE'
171
+ outputDevman='out'
172
+ outputDoc='out'
173
+ outputInclude='out'
174
+ outputInfo='out'
175
+ outputLib='out'
176
+ outputMan='out'
177
+ outputs='out'
178
+ export outputs
179
+ patches=''
180
+ export patches
181
+ phases='buildPhase'
182
+ export phases
183
+ pkg='/nix/store/49rnbvkp4nywgr2pqcmii0dr4sbj9zs7-apple-sdk-14.4'
184
+ declare -a pkgsBuildBuild=()
185
+ declare -a pkgsBuildHost=('/nix/store/cx0jd5mwhn7ihryyv0qp9d33f8s1iwb7-nodejs-24.13.0' '/nix/store/23c6sxdfaa5r38ihc7y575vv7j4qs4sk-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/vl936sd1vj8s008akm3gibkgyqk30qhz-clang-wrapper-21.1.8' '/nix/store/qkqww6ccw4n4px5jzs1fkcg9yh1jnbxl-cctools-binutils-darwin-wrapper-1010.6' '/nix/store/4wy2b9dipk7h7c6i444ipys9kq00f4qc-xcbuild-0.1.1-unstable-2019-11-20-xcrun' )
186
+ declare -a pkgsBuildTarget=()
187
+ declare -a pkgsHostHost=('/nix/store/g0r7lnyajlqwkkshzwcasa1swnqlr6fs-libcxx-20.1.0+apple-sdk-26.0' '/nix/store/2adqlqhmwxglc2f0r7fxa5wdlavjn21r-compiler-rt-libc-21.1.8-dev' '/nix/store/16j7rnr03s8ssn0q9nwf3ncj7aj2pqd3-compiler-rt-libc-21.1.8' )
188
+ declare -a pkgsHostTarget=('/nix/store/49rnbvkp4nywgr2pqcmii0dr4sbj9zs7-apple-sdk-14.4' '/nix/store/gkyk559bh4zzxh0wfvzqi6zj3rdn0d9q-libiconv-109.100.2-dev' '/nix/store/ik1b3z19bgk8lagf461zq222kxrpdynb-libiconv-109.100.2' '/nix/store/y02fcdl0bx02pkmbsbxks8nmy7yxvanf-libresolv-91-dev' '/nix/store/r0vyrwqczqhfa64ybmz1ag57ssvbxakh-libresolv-91' '/nix/store/w1q5dsq93j18clmn9pzqgl88n7v5j2v9-libsbuf-14.1.0-dev' '/nix/store/q0l5wfnkkhynp14mpl1pk33xhzsaif38-libsbuf-14.1.0' '/nix/store/0zwkfp018d8qpx2lyppvn07rbgvblps4-libutil-72' )
189
+ declare -a pkgsTargetTarget=()
190
+ declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' )
191
+ declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' )
192
+ declare -a preConfigureHooks=('_multioutConfig' )
193
+ preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase'
194
+ declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' )
195
+ preferLocalBuild='1'
196
+ export preferLocalBuild
197
+ prefix='/Users/mbarney/dev/personal/aws-iam-ls/outputs/out'
198
+ declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' )
199
+ propagatedBuildInputs=''
200
+ export propagatedBuildInputs
201
+ declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' )
202
+ propagatedNativeBuildInputs=''
203
+ export propagatedNativeBuildInputs
204
+ declare -a propagatedTargetDepFiles=('propagated-target-target-deps' )
205
+ shell='/nix/store/3zrx6av2d1141igkcn8477cvbfqpcmcf-bash-5.3p9/bin/bash'
206
+ export shell
207
+ shellHook=''
208
+ export shellHook
209
+ stdenv='/nix/store/nssnpv7ghq4f1fdm41q304dmak5aanjv-stdenv-darwin'
210
+ export stdenv
211
+ strictDeps=''
212
+ export strictDeps
213
+ stripDebugFlags='-S'
214
+ system='aarch64-darwin'
215
+ export system
216
+ declare -a unpackCmdHooks=('_defaultUnpack' )
217
+ _activatePkgs ()
218
+ {
219
+
220
+ local hostOffset targetOffset;
221
+ local pkg;
222
+ for hostOffset in "${allPlatOffsets[@]}";
223
+ do
224
+ local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}";
225
+ for targetOffset in "${allPlatOffsets[@]}";
226
+ do
227
+ (( hostOffset <= targetOffset )) || continue;
228
+ local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]";
229
+ local pkgsSlice="${!pkgsRef}[@]";
230
+ for pkg in ${!pkgsSlice+"${!pkgsSlice}"};
231
+ do
232
+ activatePackage "$pkg" "$hostOffset" "$targetOffset";
233
+ done;
234
+ done;
235
+ done
236
+ }
237
+ _addRpathPrefix ()
238
+ {
239
+
240
+ if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then
241
+ export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}";
242
+ fi
243
+ }
244
+ _addToEnv ()
245
+ {
246
+
247
+ local depHostOffset depTargetOffset;
248
+ local pkg;
249
+ for depHostOffset in "${allPlatOffsets[@]}";
250
+ do
251
+ local hookVar="${pkgHookVarVars[depHostOffset + 1]}";
252
+ local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}";
253
+ for depTargetOffset in "${allPlatOffsets[@]}";
254
+ do
255
+ (( depHostOffset <= depTargetOffset )) || continue;
256
+ local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]";
257
+ if [[ -z "${strictDeps-}" ]]; then
258
+ local visitedPkgs="";
259
+ for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}";
260
+ do
261
+ if [[ "$visitedPkgs" = *"$pkg"* ]]; then
262
+ continue;
263
+ fi;
264
+ runHook "${!hookRef}" "$pkg";
265
+ visitedPkgs+=" $pkg";
266
+ done;
267
+ else
268
+ local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]";
269
+ local pkgsSlice="${!pkgsRef}[@]";
270
+ for pkg in ${!pkgsSlice+"${!pkgsSlice}"};
271
+ do
272
+ runHook "${!hookRef}" "$pkg";
273
+ done;
274
+ fi;
275
+ done;
276
+ done
277
+ }
278
+ _allFlags ()
279
+ {
280
+
281
+ export system pname name version;
282
+ while IFS='' read -r varName; do
283
+ nixTalkativeLog "@${varName}@ -> ${!varName}";
284
+ args+=("--subst-var" "$varName");
285
+ done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }')
286
+ }
287
+ _assignFirst ()
288
+ {
289
+
290
+ local varName="$1";
291
+ local _var;
292
+ local REMOVE=REMOVE;
293
+ shift;
294
+ for _var in "$@";
295
+ do
296
+ if [ -n "${!_var-}" ]; then
297
+ eval "${varName}"="${_var}";
298
+ return;
299
+ fi;
300
+ done;
301
+ echo;
302
+ echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}.";
303
+ echo " The following variables were all unset or empty:";
304
+ echo " $*";
305
+ if [ -z "${out:-}" ]; then
306
+ echo ' If you do not want an "out" output in your derivation, make sure to define';
307
+ echo ' the other specific required outputs. This can be achieved by picking one';
308
+ echo " of the above as an output.";
309
+ echo ' You do not have to remove "out" if you want to have a different default';
310
+ echo ' output, because the first output is taken as a default.';
311
+ echo;
312
+ fi;
313
+ return 1
314
+ }
315
+ _callImplicitHook ()
316
+ {
317
+
318
+ local def="$1";
319
+ local hookName="$2";
320
+ if declare -F "$hookName" > /dev/null; then
321
+ nixTalkativeLog "calling implicit '$hookName' function hook";
322
+ "$hookName";
323
+ else
324
+ if type -p "$hookName" > /dev/null; then
325
+ nixTalkativeLog "sourcing implicit '$hookName' script hook";
326
+ source "$hookName";
327
+ else
328
+ if [ -n "${!hookName:-}" ]; then
329
+ nixTalkativeLog "evaling implicit '$hookName' string hook";
330
+ eval "${!hookName}";
331
+ else
332
+ return "$def";
333
+ fi;
334
+ fi;
335
+ fi
336
+ }
337
+ _defaultUnpack ()
338
+ {
339
+
340
+ local fn="$1";
341
+ local destination;
342
+ if [ -d "$fn" ]; then
343
+ destination="$(stripHash "$fn")";
344
+ if [ -e "$destination" ]; then
345
+ echo "Cannot copy $fn to $destination: destination already exists!";
346
+ echo "Did you specify two \"srcs\" with the same \"name\"?";
347
+ return 1;
348
+ fi;
349
+ cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination";
350
+ else
351
+ case "$fn" in
352
+ *.tar.xz | *.tar.lzma | *.txz)
353
+ ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn";
354
+ true ) | tar xf - --mode=+w --warning=no-timestamp
355
+ ;;
356
+ *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz)
357
+ tar xf "$fn" --mode=+w --warning=no-timestamp
358
+ ;;
359
+ *)
360
+ return 1
361
+ ;;
362
+ esac;
363
+ fi
364
+ }
365
+ _doStrip ()
366
+ {
367
+
368
+ local -ra flags=(dontStripHost dontStripTarget);
369
+ local -ra debugDirs=(stripDebugList stripDebugListTarget);
370
+ local -ra allDirs=(stripAllList stripAllListTarget);
371
+ local -ra stripCmds=(STRIP STRIP_FOR_TARGET);
372
+ local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET);
373
+ stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks};
374
+ stripDebugListTarget=${stripDebugListTarget[*]:-};
375
+ stripAllList=${stripAllList[*]:-};
376
+ stripAllListTarget=${stripAllListTarget[*]:-};
377
+ local i;
378
+ for i in ${!stripCmds[@]};
379
+ do
380
+ local -n flag="${flags[$i]}";
381
+ local -n debugDirList="${debugDirs[$i]}";
382
+ local -n allDirList="${allDirs[$i]}";
383
+ local -n stripCmd="${stripCmds[$i]}";
384
+ local -n ranlibCmd="${ranlibCmds[$i]}";
385
+ if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then
386
+ continue;
387
+ fi;
388
+ stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}";
389
+ stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}";
390
+ done
391
+ }
392
+ _eval ()
393
+ {
394
+
395
+ if declare -F "$1" > /dev/null 2>&1; then
396
+ "$@";
397
+ else
398
+ eval "$1";
399
+ fi
400
+ }
401
+ _logHook ()
402
+ {
403
+
404
+ if [[ -z ${NIX_LOG_FD-} ]]; then
405
+ return;
406
+ fi;
407
+ local hookKind="$1";
408
+ local hookExpr="$2";
409
+ shift 2;
410
+ if declare -F "$hookExpr" > /dev/null 2>&1; then
411
+ nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@";
412
+ else
413
+ if type -p "$hookExpr" > /dev/null; then
414
+ nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'";
415
+ else
416
+ if [[ "$hookExpr" != "_callImplicitHook"* ]]; then
417
+ local exprToOutput;
418
+ if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then
419
+ exprToOutput="$hookExpr";
420
+ else
421
+ local hookExprLine;
422
+ while IFS= read -r hookExprLine; do
423
+ hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}";
424
+ if [[ -n "$hookExprLine" ]]; then
425
+ exprToOutput+="$hookExprLine\\n ";
426
+ fi;
427
+ done <<< "$hookExpr";
428
+ exprToOutput="${exprToOutput%%\\n }";
429
+ fi;
430
+ nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'";
431
+ fi;
432
+ fi;
433
+ fi
434
+ }
435
+ _makeSymlinksRelative ()
436
+ {
437
+
438
+ local prefixes;
439
+ prefixes=();
440
+ for output in $(getAllOutputNames);
441
+ do
442
+ [ ! -e "${!output}" ] && continue;
443
+ prefixes+=("${!output}");
444
+ done;
445
+ find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c '
446
+ output="$1"
447
+ link="$2"
448
+
449
+ linkTarget=$(readlink "$link")
450
+
451
+ # only touch links that point inside the same output tree
452
+ [[ $linkTarget == "$output"/* ]] || exit 0
453
+
454
+ if [ ! -e "$linkTarget" ]; then
455
+ echo "the symlink $link is broken, it points to $linkTarget (which is missing)"
456
+ fi
457
+
458
+ echo "making symlink relative: $link"
459
+ ln -snrf "$linkTarget" "$link"
460
+ ' _
461
+ }
462
+ _moveLib64 ()
463
+ {
464
+
465
+ if [ "${dontMoveLib64-}" = 1 ]; then
466
+ return;
467
+ fi;
468
+ if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then
469
+ return;
470
+ fi;
471
+ echo "moving $prefix/lib64/* to $prefix/lib";
472
+ mkdir -p $prefix/lib;
473
+ shopt -s dotglob;
474
+ for i in $prefix/lib64/*;
475
+ do
476
+ mv --no-clobber "$i" $prefix/lib;
477
+ done;
478
+ shopt -u dotglob;
479
+ rmdir $prefix/lib64;
480
+ ln -s lib $prefix/lib64
481
+ }
482
+ _moveSbin ()
483
+ {
484
+
485
+ if [ "${dontMoveSbin-}" = 1 ]; then
486
+ return;
487
+ fi;
488
+ if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then
489
+ return;
490
+ fi;
491
+ echo "moving $prefix/sbin/* to $prefix/bin";
492
+ mkdir -p $prefix/bin;
493
+ shopt -s dotglob;
494
+ for i in $prefix/sbin/*;
495
+ do
496
+ mv "$i" $prefix/bin;
497
+ done;
498
+ shopt -u dotglob;
499
+ rmdir $prefix/sbin;
500
+ ln -s bin $prefix/sbin
501
+ }
502
+ _moveSystemdUserUnits ()
503
+ {
504
+
505
+ if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then
506
+ return;
507
+ fi;
508
+ if [ ! -e "${prefix:?}/lib/systemd/user" ]; then
509
+ return;
510
+ fi;
511
+ local source="$prefix/lib/systemd/user";
512
+ local target="$prefix/share/systemd/user";
513
+ echo "moving $source/* to $target";
514
+ mkdir -p "$target";
515
+ ( shopt -s dotglob;
516
+ for i in "$source"/*;
517
+ do
518
+ mv "$i" "$target";
519
+ done );
520
+ rmdir "$source";
521
+ ln -s "$target" "$source"
522
+ }
523
+ _moveToShare ()
524
+ {
525
+
526
+ if [ -n "$__structuredAttrs" ]; then
527
+ if [ -z "${forceShare-}" ]; then
528
+ forceShare=(man doc info);
529
+ fi;
530
+ else
531
+ forceShare=(${forceShare:-man doc info});
532
+ fi;
533
+ if [[ -z "$out" ]]; then
534
+ return;
535
+ fi;
536
+ for d in "${forceShare[@]}";
537
+ do
538
+ if [ -d "$out/$d" ]; then
539
+ if [ -d "$out/share/$d" ]; then
540
+ echo "both $d/ and share/$d/ exist!";
541
+ else
542
+ echo "moving $out/$d to $out/share/$d";
543
+ mkdir -p $out/share;
544
+ mv $out/$d $out/share/;
545
+ fi;
546
+ fi;
547
+ done
548
+ }
549
+ _multioutConfig ()
550
+ {
551
+
552
+ if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then
553
+ return;
554
+ fi;
555
+ if [ -z "${shareDocName:-}" ]; then
556
+ local confScript="${configureScript:-}";
557
+ if [ -z "$confScript" ] && [ -x ./configure ]; then
558
+ confScript=./configure;
559
+ fi;
560
+ if [ -f "$confScript" ]; then
561
+ local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")";
562
+ fi;
563
+ if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then
564
+ shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')";
565
+ fi;
566
+ fi;
567
+ prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale;
568
+ prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal
569
+ }
570
+ _multioutDevs ()
571
+ {
572
+
573
+ if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then
574
+ return;
575
+ fi;
576
+ moveToOutput include "${!outputInclude}";
577
+ moveToOutput lib/pkgconfig "${!outputDev}";
578
+ moveToOutput share/pkgconfig "${!outputDev}";
579
+ moveToOutput lib/cmake "${!outputDev}";
580
+ moveToOutput share/aclocal "${!outputDev}";
581
+ for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc;
582
+ do
583
+ echo "Patching '$f' includedir to output ${!outputInclude}";
584
+ sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f";
585
+ done
586
+ }
587
+ _multioutDocs ()
588
+ {
589
+
590
+ local REMOVE=REMOVE;
591
+ moveToOutput share/info "${!outputInfo}";
592
+ moveToOutput share/doc "${!outputDoc}";
593
+ moveToOutput share/gtk-doc "${!outputDevdoc}";
594
+ moveToOutput share/devhelp/books "${!outputDevdoc}";
595
+ moveToOutput share/man "${!outputMan}";
596
+ moveToOutput share/man/man3 "${!outputDevman}"
597
+ }
598
+ _multioutPropagateDev ()
599
+ {
600
+
601
+ if [ "$(getAllOutputNames)" = "out" ]; then
602
+ return;
603
+ fi;
604
+ local outputFirst;
605
+ for outputFirst in $(getAllOutputNames);
606
+ do
607
+ break;
608
+ done;
609
+ local propagaterOutput="$outputDev";
610
+ if [ -z "$propagaterOutput" ]; then
611
+ propagaterOutput="$outputFirst";
612
+ fi;
613
+ if [ -z "${propagatedBuildOutputs+1}" ]; then
614
+ local po_dirty="$outputBin $outputInclude $outputLib";
615
+ set +o pipefail;
616
+ propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `;
617
+ set -o pipefail;
618
+ fi;
619
+ if [ -z "$propagatedBuildOutputs" ]; then
620
+ return;
621
+ fi;
622
+ mkdir -p "${!propagaterOutput}"/nix-support;
623
+ for output in $propagatedBuildOutputs;
624
+ do
625
+ echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs;
626
+ done
627
+ }
628
+ _nixLogWithLevel ()
629
+ {
630
+
631
+ [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0;
632
+ local logLevel;
633
+ case "${1:?}" in
634
+ 0)
635
+ logLevel=ERROR
636
+ ;;
637
+ 1)
638
+ logLevel=WARN
639
+ ;;
640
+ 2)
641
+ logLevel=NOTICE
642
+ ;;
643
+ 3)
644
+ logLevel=INFO
645
+ ;;
646
+ 4)
647
+ logLevel=TALKATIVE
648
+ ;;
649
+ 5)
650
+ logLevel=CHATTY
651
+ ;;
652
+ 6)
653
+ logLevel=DEBUG
654
+ ;;
655
+ 7)
656
+ logLevel=VOMIT
657
+ ;;
658
+ *)
659
+ echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD";
660
+ return 1
661
+ ;;
662
+ esac;
663
+ local callerName="${FUNCNAME[2]}";
664
+ if [[ $callerName == "_callImplicitHook" ]]; then
665
+ callerName="${hookName:?}";
666
+ fi;
667
+ printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD"
668
+ }
669
+ _overrideFirst ()
670
+ {
671
+
672
+ if [ -z "${!1-}" ]; then
673
+ _assignFirst "$@";
674
+ fi
675
+ }
676
+ _pruneLibtoolFiles ()
677
+ {
678
+
679
+ if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then
680
+ return;
681
+ fi;
682
+ find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \;
683
+ }
684
+ _updateSourceDateEpochFromSourceRoot ()
685
+ {
686
+
687
+ if [ -n "$sourceRoot" ]; then
688
+ updateSourceDateEpoch "$sourceRoot";
689
+ fi
690
+ }
691
+ activatePackage ()
692
+ {
693
+
694
+ local pkg="$1";
695
+ local -r hostOffset="$2";
696
+ local -r targetOffset="$3";
697
+ (( hostOffset <= targetOffset )) || exit 1;
698
+ if [ -f "$pkg" ]; then
699
+ nixTalkativeLog "sourcing setup hook '$pkg'";
700
+ source "$pkg";
701
+ fi;
702
+ if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then
703
+ addToSearchPath _PATH "$pkg/bin";
704
+ fi;
705
+ if (( hostOffset <= -1 )); then
706
+ addToSearchPath _XDG_DATA_DIRS "$pkg/share";
707
+ fi;
708
+ if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then
709
+ addToSearchPath _HOST_PATH "$pkg/bin";
710
+ fi;
711
+ if [[ -f "$pkg/nix-support/setup-hook" ]]; then
712
+ nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'";
713
+ source "$pkg/nix-support/setup-hook";
714
+ fi
715
+ }
716
+ addEnvHooks ()
717
+ {
718
+
719
+ local depHostOffset="$1";
720
+ shift;
721
+ local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]";
722
+ local pkgHookVar;
723
+ for pkgHookVar in "${!pkgHookVarsSlice}";
724
+ do
725
+ eval "${pkgHookVar}s"'+=("$@")';
726
+ done
727
+ }
728
+ addToSearchPath ()
729
+ {
730
+
731
+ addToSearchPathWithCustomDelimiter ":" "$@"
732
+ }
733
+ addToSearchPathWithCustomDelimiter ()
734
+ {
735
+
736
+ local delimiter="$1";
737
+ local varName="$2";
738
+ local dir="$3";
739
+ if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then
740
+ export "${varName}=${!varName:+${!varName}${delimiter}}${dir}";
741
+ fi
742
+ }
743
+ appendToVar ()
744
+ {
745
+
746
+ local -n nameref="$1";
747
+ local useArray type;
748
+ if [ -n "$__structuredAttrs" ]; then
749
+ useArray=true;
750
+ else
751
+ useArray=false;
752
+ fi;
753
+ if type=$(declare -p "$1" 2> /dev/null); then
754
+ case "${type#* }" in
755
+ -A*)
756
+ echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2;
757
+ return 1
758
+ ;;
759
+ -a*)
760
+ useArray=true
761
+ ;;
762
+ *)
763
+ useArray=false
764
+ ;;
765
+ esac;
766
+ fi;
767
+ shift;
768
+ if $useArray; then
769
+ nameref=(${nameref+"${nameref[@]}"} "$@");
770
+ else
771
+ nameref="${nameref-} $*";
772
+ fi
773
+ }
774
+ auditTmpdir ()
775
+ {
776
+
777
+ local dir="$1";
778
+ [ -e "$dir" ] || return 0;
779
+ echo "checking for references to $TMPDIR/ in $dir...";
780
+ local tmpdir elf_fifo script_fifo;
781
+ tmpdir="$(mktemp -d)";
782
+ elf_fifo="$tmpdir/elf";
783
+ script_fifo="$tmpdir/script";
784
+ mkfifo "$elf_fifo" "$script_fifo";
785
+ ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do
786
+ if isELF "$file"; then
787
+ printf '%s\0' "$file" 1>&3;
788
+ else
789
+ if isScript "$file"; then
790
+ filename=${file##*/};
791
+ dir=${file%/*};
792
+ if [ -e "$dir/.$filename-wrapped" ]; then
793
+ printf '%s\0' "$file" 1>&4;
794
+ fi;
795
+ fi;
796
+ fi;
797
+ done;
798
+ exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c '
799
+ if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then
800
+ echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/"
801
+ exit 1
802
+ fi
803
+ ' _ < "$elf_fifo" ) & local pid_elf=$!;
804
+ local pid_script;
805
+ ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c '
806
+ if grep -q -F "$TMPDIR/" "$1"; then
807
+ echo "wrapper script $1 contains a forbidden reference to $TMPDIR/"
808
+ exit 1
809
+ fi
810
+ ' _ < "$script_fifo" ) & local pid_script=$!;
811
+ wait "$pid_elf" || {
812
+ echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!";
813
+ exit 1
814
+ };
815
+ wait "$pid_script" || {
816
+ echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!";
817
+ exit 1
818
+ };
819
+ rm -r "$tmpdir"
820
+ }
821
+ bintoolsWrapper_addLDVars ()
822
+ {
823
+
824
+ local role_post;
825
+ getHostRoleEnvHook;
826
+ if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then
827
+ export NIX_LDFLAGS${role_post}+=" -L$1/lib64";
828
+ fi;
829
+ if [[ -d "$1/lib" ]]; then
830
+ local -a glob=($1/lib/lib*);
831
+ if [ "${#glob[*]}" -gt 0 ]; then
832
+ export NIX_LDFLAGS${role_post}+=" -L$1/lib";
833
+ fi;
834
+ fi
835
+ }
836
+ buildPhase ()
837
+ {
838
+
839
+ runHook preBuild;
840
+ if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then
841
+ echo "no Makefile or custom buildPhase, doing nothing";
842
+ else
843
+ foundMakefile=1;
844
+ local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
845
+ concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray;
846
+ echoCmd 'build flags' "${flagsArray[@]}";
847
+ make ${makefile:+-f $makefile} "${flagsArray[@]}";
848
+ unset flagsArray;
849
+ fi;
850
+ runHook postBuild
851
+ }
852
+ ccWrapper_addCVars ()
853
+ {
854
+
855
+ local role_post;
856
+ getHostRoleEnvHook;
857
+ local found=;
858
+ if [ -d "$1/include" ]; then
859
+ export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include";
860
+ found=1;
861
+ fi;
862
+ if [ -d "$1/Library/Frameworks" ]; then
863
+ export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks";
864
+ found=1;
865
+ fi;
866
+ if [[ -n "1" && -n ${NIX_STORE:-} && -n $found ]]; then
867
+ local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}";
868
+ export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed";
869
+ fi
870
+ }
871
+ checkPhase ()
872
+ {
873
+
874
+ runHook preCheck;
875
+ if [[ -z "${foundMakefile:-}" ]]; then
876
+ echo "no Makefile or custom checkPhase, doing nothing";
877
+ runHook postCheck;
878
+ return;
879
+ fi;
880
+ if [[ -z "${checkTarget:-}" ]]; then
881
+ if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then
882
+ checkTarget="check";
883
+ else
884
+ if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then
885
+ checkTarget="test";
886
+ fi;
887
+ fi;
888
+ fi;
889
+ if [[ -z "${checkTarget:-}" ]]; then
890
+ echo "no check/test target in ${makefile:-Makefile}, doing nothing";
891
+ else
892
+ local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
893
+ concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget;
894
+ echoCmd 'check flags' "${flagsArray[@]}";
895
+ make ${makefile:+-f $makefile} "${flagsArray[@]}";
896
+ unset flagsArray;
897
+ fi;
898
+ runHook postCheck
899
+ }
900
+ compressManPages ()
901
+ {
902
+
903
+ local dir="$1";
904
+ if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then
905
+ return;
906
+ fi;
907
+ echo "gzipping man pages under $dir/share/man/";
908
+ find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f;
909
+ find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do
910
+ local target;
911
+ target="$(readlink -f "$f")";
912
+ if [ -f "$target".gz ]; then
913
+ ln -sf "$target".gz "$f".gz && rm "$f";
914
+ fi;
915
+ done
916
+ }
917
+ concatStringsSep ()
918
+ {
919
+
920
+ local sep="$1";
921
+ local name="$2";
922
+ local type oldifs;
923
+ if type=$(declare -p "$name" 2> /dev/null); then
924
+ local -n nameref="$name";
925
+ case "${type#* }" in
926
+ -A*)
927
+ echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2;
928
+ return 1
929
+ ;;
930
+ -a*)
931
+ local IFS="$(printf '\036')"
932
+ ;;
933
+ *)
934
+ local IFS=" "
935
+ ;;
936
+ esac;
937
+ local ifs_separated="${nameref[*]}";
938
+ echo -n "${ifs_separated//"$IFS"/"$sep"}";
939
+ fi
940
+ }
941
+ concatTo ()
942
+ {
943
+
944
+ local -;
945
+ set -o noglob;
946
+ local -n targetref="$1";
947
+ shift;
948
+ local arg default name type;
949
+ for arg in "$@";
950
+ do
951
+ IFS="=" read -r name default <<< "$arg";
952
+ local -n nameref="$name";
953
+ if [[ -z "${nameref[*]}" && -n "$default" ]]; then
954
+ targetref+=("$default");
955
+ else
956
+ if type=$(declare -p "$name" 2> /dev/null); then
957
+ case "${type#* }" in
958
+ -A*)
959
+ echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2;
960
+ return 1
961
+ ;;
962
+ -a*)
963
+ targetref+=("${nameref[@]}")
964
+ ;;
965
+ *)
966
+ if [[ "$name" = *"Array" ]]; then
967
+ nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future";
968
+ targetref+=(${nameref+"${nameref[@]}"});
969
+ else
970
+ targetref+=(${nameref-});
971
+ fi
972
+ ;;
973
+ esac;
974
+ fi;
975
+ fi;
976
+ done
977
+ }
978
+ configurePhase ()
979
+ {
980
+
981
+ runHook preConfigure;
982
+ : "${configureScript=}";
983
+ if [[ -z "$configureScript" && -x ./configure ]]; then
984
+ configureScript=./configure;
985
+ fi;
986
+ if [ -z "${dontFixLibtool:-}" ]; then
987
+ export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}";
988
+ local i;
989
+ find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do
990
+ echo "fixing libtool script $i";
991
+ fixLibtool "$i";
992
+ done;
993
+ CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX);
994
+ find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;;
995
+ rm -f "$CONFIGURE_MTIME_REFERENCE";
996
+ fi;
997
+ if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then
998
+ local -r prefixKeyOrDefault="${prefixKey:---prefix=}";
999
+ if [ "${prefixKeyOrDefault: -1}" = " " ]; then
1000
+ prependToVar configureFlags "$prefix";
1001
+ prependToVar configureFlags "${prefixKeyOrDefault::-1}";
1002
+ else
1003
+ prependToVar configureFlags "$prefixKeyOrDefault$prefix";
1004
+ fi;
1005
+ fi;
1006
+ if [[ -f "$configureScript" ]]; then
1007
+ if [ -z "${dontAddDisableDepTrack:-}" ]; then
1008
+ if grep -q dependency-tracking "$configureScript"; then
1009
+ prependToVar configureFlags --disable-dependency-tracking;
1010
+ fi;
1011
+ fi;
1012
+ if [ -z "${dontDisableStatic:-}" ]; then
1013
+ if grep -q enable-static "$configureScript"; then
1014
+ prependToVar configureFlags --disable-static;
1015
+ fi;
1016
+ fi;
1017
+ if [ -z "${dontPatchShebangsInConfigure:-}" ]; then
1018
+ patchShebangs --build "$configureScript";
1019
+ fi;
1020
+ fi;
1021
+ if [ -n "$configureScript" ]; then
1022
+ local -a flagsArray;
1023
+ concatTo flagsArray configureFlags configureFlagsArray;
1024
+ echoCmd 'configure flags' "${flagsArray[@]}";
1025
+ $configureScript "${flagsArray[@]}";
1026
+ unset flagsArray;
1027
+ else
1028
+ echo "no configure script, doing nothing";
1029
+ fi;
1030
+ runHook postConfigure
1031
+ }
1032
+ consumeEntire ()
1033
+ {
1034
+
1035
+ if IFS='' read -r -d '' "$1"; then
1036
+ echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2;
1037
+ return 1;
1038
+ fi
1039
+ }
1040
+ definePhases ()
1041
+ {
1042
+
1043
+ if [ -z "${phases[*]:-}" ]; then
1044
+ phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}";
1045
+ fi
1046
+ }
1047
+ distPhase ()
1048
+ {
1049
+
1050
+ runHook preDist;
1051
+ local flagsArray=();
1052
+ concatTo flagsArray distFlags distFlagsArray distTarget=dist;
1053
+ echo 'dist flags: %q' "${flagsArray[@]}";
1054
+ make ${makefile:+-f $makefile} "${flagsArray[@]}";
1055
+ if [ "${dontCopyDist:-0}" != 1 ]; then
1056
+ mkdir -p "$out/tarballs";
1057
+ cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs";
1058
+ fi;
1059
+ runHook postDist
1060
+ }
1061
+ dumpVars ()
1062
+ {
1063
+
1064
+ if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then
1065
+ local old_umask;
1066
+ old_umask=$(umask);
1067
+ umask 0077;
1068
+ export 2> /dev/null > "$NIX_BUILD_TOP/env-vars";
1069
+ umask "$old_umask";
1070
+ fi
1071
+ }
1072
+ echoCmd ()
1073
+ {
1074
+
1075
+ printf "%s:" "$1";
1076
+ shift;
1077
+ printf ' %q' "$@";
1078
+ echo
1079
+ }
1080
+ exitHandler ()
1081
+ {
1082
+
1083
+ exitCode="$?";
1084
+ set +e;
1085
+ if [ -n "${showBuildStats:-}" ]; then
1086
+ read -r -d '' -a buildTimes < <(times);
1087
+ echo "build times:";
1088
+ echo "user time for the shell ${buildTimes[0]}";
1089
+ echo "system time for the shell ${buildTimes[1]}";
1090
+ echo "user time for all child processes ${buildTimes[2]}";
1091
+ echo "system time for all child processes ${buildTimes[3]}";
1092
+ fi;
1093
+ if (( "$exitCode" != 0 )); then
1094
+ runHook failureHook;
1095
+ if [ -n "${succeedOnFailure:-}" ]; then
1096
+ echo "build failed with exit code $exitCode (ignored)";
1097
+ mkdir -p "$out/nix-support";
1098
+ printf "%s" "$exitCode" > "$out/nix-support/failed";
1099
+ exit 0;
1100
+ fi;
1101
+ else
1102
+ runHook exitHook;
1103
+ fi;
1104
+ return "$exitCode"
1105
+ }
1106
+ findInputs ()
1107
+ {
1108
+
1109
+ local -r pkg="$1";
1110
+ local -r hostOffset="$2";
1111
+ local -r targetOffset="$3";
1112
+ (( hostOffset <= targetOffset )) || exit 1;
1113
+ local varVar="${pkgAccumVarVars[hostOffset + 1]}";
1114
+ local varRef="$varVar[$((targetOffset - hostOffset))]";
1115
+ local var="${!varRef}";
1116
+ unset -v varVar varRef;
1117
+ local varSlice="$var[*]";
1118
+ case " ${!varSlice-} " in
1119
+ *" $pkg "*)
1120
+ return 0
1121
+ ;;
1122
+ esac;
1123
+ unset -v varSlice;
1124
+ eval "$var"'+=("$pkg")';
1125
+ if ! [ -e "$pkg" ]; then
1126
+ echo "build input $pkg does not exist" 1>&2;
1127
+ exit 1;
1128
+ fi;
1129
+ function mapOffset ()
1130
+ {
1131
+ local -r inputOffset="$1";
1132
+ local -n outputOffset="$2";
1133
+ if (( inputOffset <= 0 )); then
1134
+ outputOffset=$((inputOffset + hostOffset));
1135
+ else
1136
+ outputOffset=$((inputOffset - 1 + targetOffset));
1137
+ fi
1138
+ };
1139
+ local relHostOffset;
1140
+ for relHostOffset in "${allPlatOffsets[@]}";
1141
+ do
1142
+ local files="${propagatedDepFilesVars[relHostOffset + 1]}";
1143
+ local hostOffsetNext;
1144
+ mapOffset "$relHostOffset" hostOffsetNext;
1145
+ (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue;
1146
+ local relTargetOffset;
1147
+ for relTargetOffset in "${allPlatOffsets[@]}";
1148
+ do
1149
+ (( "$relHostOffset" <= "$relTargetOffset" )) || continue;
1150
+ local fileRef="${files}[$relTargetOffset - $relHostOffset]";
1151
+ local file="${!fileRef}";
1152
+ unset -v fileRef;
1153
+ local targetOffsetNext;
1154
+ mapOffset "$relTargetOffset" targetOffsetNext;
1155
+ (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue;
1156
+ [[ -f "$pkg/nix-support/$file" ]] || continue;
1157
+ local pkgNext;
1158
+ read -r -d '' pkgNext < "$pkg/nix-support/$file" || true;
1159
+ for pkgNext in $pkgNext;
1160
+ do
1161
+ findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext";
1162
+ done;
1163
+ done;
1164
+ done
1165
+ }
1166
+ fixLibtool ()
1167
+ {
1168
+
1169
+ local search_path;
1170
+ for flag in $NIX_LDFLAGS;
1171
+ do
1172
+ case $flag in
1173
+ -L*)
1174
+ search_path+=" ${flag#-L}"
1175
+ ;;
1176
+ esac;
1177
+ done;
1178
+ sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^'
1179
+ }
1180
+ fixupPhase ()
1181
+ {
1182
+
1183
+ local output;
1184
+ for output in $(getAllOutputNames);
1185
+ do
1186
+ if [ -e "${!output}" ]; then
1187
+ chmod -R u+w,u-s,g-s "${!output}";
1188
+ fi;
1189
+ done;
1190
+ runHook preFixup;
1191
+ local output;
1192
+ for output in $(getAllOutputNames);
1193
+ do
1194
+ prefix="${!output}" runHook fixupOutput;
1195
+ done;
1196
+ recordPropagatedDependencies;
1197
+ if [ -n "${setupHook:-}" ]; then
1198
+ mkdir -p "${!outputDev}/nix-support";
1199
+ substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook";
1200
+ fi;
1201
+ if [ -n "${setupHooks:-}" ]; then
1202
+ mkdir -p "${!outputDev}/nix-support";
1203
+ local hook;
1204
+ for hook in ${setupHooks[@]};
1205
+ do
1206
+ local content;
1207
+ consumeEntire content < "$hook";
1208
+ substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook";
1209
+ unset -v content;
1210
+ done;
1211
+ unset -v hook;
1212
+ fi;
1213
+ if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then
1214
+ mkdir -p "${!outputBin}/nix-support";
1215
+ printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages";
1216
+ fi;
1217
+ runHook postFixup
1218
+ }
1219
+ genericBuild ()
1220
+ {
1221
+
1222
+ export GZIP_NO_TIMESTAMPS=1;
1223
+ if [ -f "${buildCommandPath:-}" ]; then
1224
+ source "$buildCommandPath";
1225
+ return;
1226
+ fi;
1227
+ if [ -n "${buildCommand:-}" ]; then
1228
+ eval "$buildCommand";
1229
+ return;
1230
+ fi;
1231
+ definePhases;
1232
+ for curPhase in ${phases[*]};
1233
+ do
1234
+ runPhase "$curPhase";
1235
+ done
1236
+ }
1237
+ getAllOutputNames ()
1238
+ {
1239
+
1240
+ if [ -n "$__structuredAttrs" ]; then
1241
+ echo "${!outputs[*]}";
1242
+ else
1243
+ echo "$outputs";
1244
+ fi
1245
+ }
1246
+ getHostRole ()
1247
+ {
1248
+
1249
+ getRole "$hostOffset"
1250
+ }
1251
+ getHostRoleEnvHook ()
1252
+ {
1253
+
1254
+ getRole "$depHostOffset"
1255
+ }
1256
+ getRole ()
1257
+ {
1258
+
1259
+ case $1 in
1260
+ -1)
1261
+ role_post='_FOR_BUILD'
1262
+ ;;
1263
+ 0)
1264
+ role_post=''
1265
+ ;;
1266
+ 1)
1267
+ role_post='_FOR_TARGET'
1268
+ ;;
1269
+ *)
1270
+ echo "apple-sdk-14.4: used as improper sort of dependency" 1>&2;
1271
+ return 1
1272
+ ;;
1273
+ esac
1274
+ }
1275
+ getTargetRole ()
1276
+ {
1277
+
1278
+ getRole "$targetOffset"
1279
+ }
1280
+ getTargetRoleEnvHook ()
1281
+ {
1282
+
1283
+ getRole "$depTargetOffset"
1284
+ }
1285
+ getTargetRoleWrapper ()
1286
+ {
1287
+
1288
+ case $targetOffset in
1289
+ -1)
1290
+ export NIX_@wrapperName@_TARGET_BUILD_@suffixSalt@=1
1291
+ ;;
1292
+ 0)
1293
+ export NIX_@wrapperName@_TARGET_HOST_@suffixSalt@=1
1294
+ ;;
1295
+ 1)
1296
+ export NIX_@wrapperName@_TARGET_TARGET_@suffixSalt@=1
1297
+ ;;
1298
+ *)
1299
+ echo "apple-sdk-14.4: used as improper sort of dependency" 1>&2;
1300
+ return 1
1301
+ ;;
1302
+ esac
1303
+ }
1304
+ installCheckPhase ()
1305
+ {
1306
+
1307
+ runHook preInstallCheck;
1308
+ if [[ -z "${foundMakefile:-}" ]]; then
1309
+ echo "no Makefile or custom installCheckPhase, doing nothing";
1310
+ else
1311
+ if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then
1312
+ echo "no installcheck target in ${makefile:-Makefile}, doing nothing";
1313
+ else
1314
+ local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
1315
+ concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck;
1316
+ echoCmd 'installcheck flags' "${flagsArray[@]}";
1317
+ make ${makefile:+-f $makefile} "${flagsArray[@]}";
1318
+ unset flagsArray;
1319
+ fi;
1320
+ fi;
1321
+ runHook postInstallCheck
1322
+ }
1323
+ installPhase ()
1324
+ {
1325
+
1326
+ runHook preInstall;
1327
+ if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then
1328
+ echo "no Makefile or custom installPhase, doing nothing";
1329
+ runHook postInstall;
1330
+ return;
1331
+ else
1332
+ foundMakefile=1;
1333
+ fi;
1334
+ if [ -n "$prefix" ]; then
1335
+ mkdir -p "$prefix";
1336
+ fi;
1337
+ local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
1338
+ concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install;
1339
+ echoCmd 'install flags' "${flagsArray[@]}";
1340
+ make ${makefile:+-f $makefile} "${flagsArray[@]}";
1341
+ unset flagsArray;
1342
+ runHook postInstall
1343
+ }
1344
+ isELF ()
1345
+ {
1346
+
1347
+ local fn="$1";
1348
+ local fd;
1349
+ local magic;
1350
+ exec {fd}< "$fn";
1351
+ LANG=C read -r -n 4 -u "$fd" magic;
1352
+ exec {fd}>&-;
1353
+ if [ "$magic" = 'ELF' ]; then
1354
+ return 0;
1355
+ else
1356
+ return 1;
1357
+ fi
1358
+ }
1359
+ isMachO ()
1360
+ {
1361
+
1362
+ local fn="$1";
1363
+ local fd;
1364
+ local magic;
1365
+ exec {fd}< "$fn";
1366
+ LANG=C read -r -n 4 -u "$fd" magic;
1367
+ exec {fd}>&-;
1368
+ if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then
1369
+ return 0;
1370
+ else
1371
+ if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then
1372
+ return 0;
1373
+ else
1374
+ if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then
1375
+ return 0;
1376
+ else
1377
+ return 1;
1378
+ fi;
1379
+ fi;
1380
+ fi
1381
+ }
1382
+ isScript ()
1383
+ {
1384
+
1385
+ local fn="$1";
1386
+ local fd;
1387
+ local magic;
1388
+ exec {fd}< "$fn";
1389
+ LANG=C read -r -n 2 -u "$fd" magic;
1390
+ exec {fd}>&-;
1391
+ if [[ "$magic" =~ \#! ]]; then
1392
+ return 0;
1393
+ else
1394
+ return 1;
1395
+ fi
1396
+ }
1397
+ mapOffset ()
1398
+ {
1399
+
1400
+ local -r inputOffset="$1";
1401
+ local -n outputOffset="$2";
1402
+ if (( inputOffset <= 0 )); then
1403
+ outputOffset=$((inputOffset + hostOffset));
1404
+ else
1405
+ outputOffset=$((inputOffset - 1 + targetOffset));
1406
+ fi
1407
+ }
1408
+ moveToOutput ()
1409
+ {
1410
+
1411
+ local patt="$1";
1412
+ local dstOut="$2";
1413
+ local output;
1414
+ for output in $(getAllOutputNames);
1415
+ do
1416
+ if [ "${!output}" = "$dstOut" ]; then
1417
+ continue;
1418
+ fi;
1419
+ local srcPath;
1420
+ for srcPath in "${!output}"/$patt;
1421
+ do
1422
+ if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then
1423
+ continue;
1424
+ fi;
1425
+ if [ "$dstOut" = REMOVE ]; then
1426
+ echo "Removing $srcPath";
1427
+ rm -r "$srcPath";
1428
+ else
1429
+ local dstPath="$dstOut${srcPath#${!output}}";
1430
+ echo "Moving $srcPath to $dstPath";
1431
+ if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then
1432
+ rmdir "$srcPath" --ignore-fail-on-non-empty;
1433
+ if [ -d "$srcPath" ]; then
1434
+ mv -t "$dstPath" "$srcPath"/*;
1435
+ rmdir "$srcPath";
1436
+ fi;
1437
+ else
1438
+ mkdir -p "$(readlink -m "$dstPath/..")";
1439
+ mv "$srcPath" "$dstPath";
1440
+ fi;
1441
+ fi;
1442
+ local srcParent="$(readlink -m "$srcPath/..")";
1443
+ if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then
1444
+ echo "Removing empty $srcParent/ and (possibly) its parents";
1445
+ rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true;
1446
+ fi;
1447
+ done;
1448
+ done
1449
+ }
1450
+ nixChattyLog ()
1451
+ {
1452
+
1453
+ _nixLogWithLevel 5 "$*"
1454
+ }
1455
+ nixDebugLog ()
1456
+ {
1457
+
1458
+ _nixLogWithLevel 6 "$*"
1459
+ }
1460
+ nixErrorLog ()
1461
+ {
1462
+
1463
+ _nixLogWithLevel 0 "$*"
1464
+ }
1465
+ nixInfoLog ()
1466
+ {
1467
+
1468
+ _nixLogWithLevel 3 "$*"
1469
+ }
1470
+ nixLog ()
1471
+ {
1472
+
1473
+ [[ -z ${NIX_LOG_FD-} ]] && return 0;
1474
+ local callerName="${FUNCNAME[1]}";
1475
+ if [[ $callerName == "_callImplicitHook" ]]; then
1476
+ callerName="${hookName:?}";
1477
+ fi;
1478
+ printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD"
1479
+ }
1480
+ nixNoticeLog ()
1481
+ {
1482
+
1483
+ _nixLogWithLevel 2 "$*"
1484
+ }
1485
+ nixTalkativeLog ()
1486
+ {
1487
+
1488
+ _nixLogWithLevel 4 "$*"
1489
+ }
1490
+ nixVomitLog ()
1491
+ {
1492
+
1493
+ _nixLogWithLevel 7 "$*"
1494
+ }
1495
+ nixWarnLog ()
1496
+ {
1497
+
1498
+ _nixLogWithLevel 1 "$*"
1499
+ }
1500
+ noBrokenSymlinks ()
1501
+ {
1502
+
1503
+ local -r output="${1:?}";
1504
+ local path;
1505
+ local pathParent;
1506
+ local symlinkTarget;
1507
+ local -i numDanglingSymlinks=0;
1508
+ local -i numReflexiveSymlinks=0;
1509
+ local -i numUnreadableSymlinks=0;
1510
+ if [[ ! -e $output ]]; then
1511
+ nixWarnLog "skipping non-existent output $output";
1512
+ return 0;
1513
+ fi;
1514
+ nixInfoLog "running on $output";
1515
+ while IFS= read -r -d '' path; do
1516
+ pathParent="$(dirname "$path")";
1517
+ if ! symlinkTarget="$(readlink "$path")"; then
1518
+ nixErrorLog "the symlink $path is unreadable";
1519
+ numUnreadableSymlinks+=1;
1520
+ continue;
1521
+ fi;
1522
+ if [[ $symlinkTarget == /* ]]; then
1523
+ nixInfoLog "symlink $path points to absolute target $symlinkTarget";
1524
+ else
1525
+ nixInfoLog "symlink $path points to relative target $symlinkTarget";
1526
+ symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")";
1527
+ fi;
1528
+ if [[ $symlinkTarget = "$TMPDIR"/* ]]; then
1529
+ nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget";
1530
+ numDanglingSymlinks+=1;
1531
+ continue;
1532
+ fi;
1533
+ if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then
1534
+ nixInfoLog "symlink $path points outside the Nix store; ignoring";
1535
+ continue;
1536
+ fi;
1537
+ if [[ $path == "$symlinkTarget" ]]; then
1538
+ nixErrorLog "the symlink $path is reflexive";
1539
+ numReflexiveSymlinks+=1;
1540
+ else
1541
+ if [[ ! -e $symlinkTarget ]]; then
1542
+ nixErrorLog "the symlink $path points to a missing target: $symlinkTarget";
1543
+ numDanglingSymlinks+=1;
1544
+ else
1545
+ nixDebugLog "the symlink $path is irreflexive and points to a target which exists";
1546
+ fi;
1547
+ fi;
1548
+ done < <(find "$output" -type l -print0);
1549
+ if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then
1550
+ nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks";
1551
+ exit 1;
1552
+ fi;
1553
+ return 0
1554
+ }
1555
+ noBrokenSymlinksInAllOutputs ()
1556
+ {
1557
+
1558
+ if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then
1559
+ for output in $(getAllOutputNames);
1560
+ do
1561
+ noBrokenSymlinks "${!output}";
1562
+ done;
1563
+ fi
1564
+ }
1565
+ patchPhase ()
1566
+ {
1567
+
1568
+ runHook prePatch;
1569
+ local -a patchesArray;
1570
+ concatTo patchesArray patches;
1571
+ local -a flagsArray;
1572
+ concatTo flagsArray patchFlags=-p1;
1573
+ for i in "${patchesArray[@]}";
1574
+ do
1575
+ echo "applying patch $i";
1576
+ local uncompress=cat;
1577
+ case "$i" in
1578
+ *.gz)
1579
+ uncompress="gzip -d"
1580
+ ;;
1581
+ *.bz2)
1582
+ uncompress="bzip2 -d"
1583
+ ;;
1584
+ *.xz)
1585
+ uncompress="xz -d"
1586
+ ;;
1587
+ *.lzma)
1588
+ uncompress="lzma -d"
1589
+ ;;
1590
+ esac;
1591
+ $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}";
1592
+ done;
1593
+ runHook postPatch
1594
+ }
1595
+ patchShebangs ()
1596
+ {
1597
+
1598
+ local pathName;
1599
+ local update=false;
1600
+ while [[ $# -gt 0 ]]; do
1601
+ case "$1" in
1602
+ --host)
1603
+ pathName=HOST_PATH;
1604
+ shift
1605
+ ;;
1606
+ --build)
1607
+ pathName=PATH;
1608
+ shift
1609
+ ;;
1610
+ --update)
1611
+ update=true;
1612
+ shift
1613
+ ;;
1614
+ --)
1615
+ shift;
1616
+ break
1617
+ ;;
1618
+ -* | --*)
1619
+ echo "Unknown option $1 supplied to patchShebangs" 1>&2;
1620
+ return 1
1621
+ ;;
1622
+ *)
1623
+ break
1624
+ ;;
1625
+ esac;
1626
+ done;
1627
+ echo "patching script interpreter paths in $@";
1628
+ local f;
1629
+ local oldPath;
1630
+ local newPath;
1631
+ local arg0;
1632
+ local args;
1633
+ local oldInterpreterLine;
1634
+ local newInterpreterLine;
1635
+ if [[ $# -eq 0 ]]; then
1636
+ echo "No arguments supplied to patchShebangs" 1>&2;
1637
+ return 0;
1638
+ fi;
1639
+ local f;
1640
+ while IFS= read -r -d '' f; do
1641
+ isScript "$f" || continue;
1642
+ read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ];
1643
+ read -r oldPath arg0 args <<< "${oldInterpreterLine:2}";
1644
+ if [[ -z "${pathName:-}" ]]; then
1645
+ if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then
1646
+ pathName=HOST_PATH;
1647
+ else
1648
+ pathName=PATH;
1649
+ fi;
1650
+ fi;
1651
+ if [[ "$oldPath" == *"/bin/env" ]]; then
1652
+ if [[ $arg0 == "-S" ]]; then
1653
+ arg0=${args%% *};
1654
+ [[ "$args" == *" "* ]] && args=${args#* } || args=;
1655
+ newPath="$(PATH="${!pathName}" type -P "env" || true)";
1656
+ args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args";
1657
+ else
1658
+ if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then
1659
+ echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2;
1660
+ exit 1;
1661
+ else
1662
+ newPath="$(PATH="${!pathName}" type -P "$arg0" || true)";
1663
+ fi;
1664
+ fi;
1665
+ else
1666
+ if [[ -z $oldPath ]]; then
1667
+ oldPath="/bin/sh";
1668
+ fi;
1669
+ newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)";
1670
+ args="$arg0 $args";
1671
+ fi;
1672
+ newInterpreterLine="$newPath $args";
1673
+ newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}};
1674
+ if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then
1675
+ if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then
1676
+ echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\"";
1677
+ escapedInterpreterLine=${newInterpreterLine//\\/\\\\};
1678
+ timestamp=$(stat --printf "%y" "$f");
1679
+ tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX);
1680
+ sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile";
1681
+ local restoreReadOnly;
1682
+ if [[ ! -w "$f" ]]; then
1683
+ chmod +w "$f";
1684
+ restoreReadOnly=true;
1685
+ fi;
1686
+ cat "$tmpFile" > "$f";
1687
+ rm "$tmpFile";
1688
+ if [[ -n "${restoreReadOnly:-}" ]]; then
1689
+ chmod -w "$f";
1690
+ fi;
1691
+ touch --date "$timestamp" "$f";
1692
+ fi;
1693
+ fi;
1694
+ done < <(find "$@" -type f -perm -0100 -print0)
1695
+ }
1696
+ patchShebangsAuto ()
1697
+ {
1698
+
1699
+ if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then
1700
+ if [[ "$output" != out && "$output" = "$outputDev" ]]; then
1701
+ patchShebangs --build "$prefix";
1702
+ else
1703
+ patchShebangs --host "$prefix";
1704
+ fi;
1705
+ fi
1706
+ }
1707
+ prependToVar ()
1708
+ {
1709
+
1710
+ local -n nameref="$1";
1711
+ local useArray type;
1712
+ if [ -n "$__structuredAttrs" ]; then
1713
+ useArray=true;
1714
+ else
1715
+ useArray=false;
1716
+ fi;
1717
+ if type=$(declare -p "$1" 2> /dev/null); then
1718
+ case "${type#* }" in
1719
+ -A*)
1720
+ echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2;
1721
+ return 1
1722
+ ;;
1723
+ -a*)
1724
+ useArray=true
1725
+ ;;
1726
+ *)
1727
+ useArray=false
1728
+ ;;
1729
+ esac;
1730
+ fi;
1731
+ shift;
1732
+ if $useArray; then
1733
+ nameref=("$@" ${nameref+"${nameref[@]}"});
1734
+ else
1735
+ nameref="$* ${nameref-}";
1736
+ fi
1737
+ }
1738
+ printLines ()
1739
+ {
1740
+
1741
+ (( "$#" > 0 )) || return 0;
1742
+ printf '%s\n' "$@"
1743
+ }
1744
+ printPhases ()
1745
+ {
1746
+
1747
+ definePhases;
1748
+ local phase;
1749
+ for phase in ${phases[*]};
1750
+ do
1751
+ printf '%s\n' "$phase";
1752
+ done
1753
+ }
1754
+ printWords ()
1755
+ {
1756
+
1757
+ (( "$#" > 0 )) || return 0;
1758
+ printf '%s ' "$@"
1759
+ }
1760
+ recordPropagatedDependencies ()
1761
+ {
1762
+
1763
+ declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated);
1764
+ declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}");
1765
+ local propagatedInputsIndex;
1766
+ for propagatedInputsIndex in "${!flatVars[@]}";
1767
+ do
1768
+ local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]";
1769
+ local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}";
1770
+ [[ -n "${!propagatedInputsSlice}" ]] || continue;
1771
+ mkdir -p "${!outputDev}/nix-support";
1772
+ printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile";
1773
+ done
1774
+ }
1775
+ runHook ()
1776
+ {
1777
+
1778
+ local hookName="$1";
1779
+ shift;
1780
+ local hooksSlice="${hookName%Hook}Hooks[@]";
1781
+ local hook;
1782
+ for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"};
1783
+ do
1784
+ _logHook "$hookName" "$hook" "$@";
1785
+ _eval "$hook" "$@";
1786
+ done;
1787
+ return 0
1788
+ }
1789
+ runOneHook ()
1790
+ {
1791
+
1792
+ local hookName="$1";
1793
+ shift;
1794
+ local hooksSlice="${hookName%Hook}Hooks[@]";
1795
+ local hook ret=1;
1796
+ for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"};
1797
+ do
1798
+ _logHook "$hookName" "$hook" "$@";
1799
+ if _eval "$hook" "$@"; then
1800
+ ret=0;
1801
+ break;
1802
+ fi;
1803
+ done;
1804
+ return "$ret"
1805
+ }
1806
+ runPhase ()
1807
+ {
1808
+
1809
+ local curPhase="$*";
1810
+ if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then
1811
+ return;
1812
+ fi;
1813
+ if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then
1814
+ return;
1815
+ fi;
1816
+ if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then
1817
+ return;
1818
+ fi;
1819
+ if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then
1820
+ return;
1821
+ fi;
1822
+ if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then
1823
+ return;
1824
+ fi;
1825
+ if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then
1826
+ return;
1827
+ fi;
1828
+ if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then
1829
+ return;
1830
+ fi;
1831
+ if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then
1832
+ return;
1833
+ fi;
1834
+ if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then
1835
+ return;
1836
+ fi;
1837
+ showPhaseHeader "$curPhase";
1838
+ dumpVars;
1839
+ local startTime endTime;
1840
+ startTime=$(date +"%s");
1841
+ eval "${!curPhase:-$curPhase}";
1842
+ endTime=$(date +"%s");
1843
+ showPhaseFooter "$curPhase" "$startTime" "$endTime";
1844
+ if [ "$curPhase" = unpackPhase ]; then
1845
+ [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}";
1846
+ cd -- "${sourceRoot:-.}";
1847
+ fi
1848
+ }
1849
+ showPhaseFooter ()
1850
+ {
1851
+
1852
+ local phase="$1";
1853
+ local startTime="$2";
1854
+ local endTime="$3";
1855
+ local delta=$(( endTime - startTime ));
1856
+ (( delta < 30 )) && return;
1857
+ local H=$((delta/3600));
1858
+ local M=$((delta%3600/60));
1859
+ local S=$((delta%60));
1860
+ echo -n "$phase completed in ";
1861
+ (( H > 0 )) && echo -n "$H hours ";
1862
+ (( M > 0 )) && echo -n "$M minutes ";
1863
+ echo "$S seconds"
1864
+ }
1865
+ showPhaseHeader ()
1866
+ {
1867
+
1868
+ local phase="$1";
1869
+ echo "Running phase: $phase";
1870
+ if [[ -z ${NIX_LOG_FD-} ]]; then
1871
+ return;
1872
+ fi;
1873
+ printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD"
1874
+ }
1875
+ stripDirs ()
1876
+ {
1877
+
1878
+ local cmd="$1";
1879
+ local ranlibCmd="$2";
1880
+ local paths="$3";
1881
+ local stripFlags="$4";
1882
+ local excludeFlags=();
1883
+ local pathsNew=;
1884
+ [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1;
1885
+ [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1;
1886
+ local pattern;
1887
+ if [ -n "${stripExclude:-}" ]; then
1888
+ for pattern in "${stripExclude[@]}";
1889
+ do
1890
+ excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')');
1891
+ done;
1892
+ fi;
1893
+ local p;
1894
+ for p in ${paths};
1895
+ do
1896
+ if [ -e "$prefix/$p" ]; then
1897
+ pathsNew="${pathsNew} $prefix/$p";
1898
+ fi;
1899
+ done;
1900
+ paths=${pathsNew};
1901
+ if [ -n "${paths}" ]; then
1902
+ echo "stripping (with command $cmd and flags $stripFlags) in $paths";
1903
+ local striperr;
1904
+ striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')";
1905
+ find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -printf '%D-%i,%p\0' | sort -t, -k1,1 -u -z | cut -d, -f2- -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?;
1906
+ [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 );
1907
+ rm "$striperr";
1908
+ find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null;
1909
+ fi
1910
+ }
1911
+ stripHash ()
1912
+ {
1913
+
1914
+ local strippedName casematchOpt=0;
1915
+ strippedName="$(basename -- "$1")";
1916
+ shopt -q nocasematch && casematchOpt=1;
1917
+ shopt -u nocasematch;
1918
+ if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then
1919
+ echo "${strippedName:33}";
1920
+ else
1921
+ echo "$strippedName";
1922
+ fi;
1923
+ if (( casematchOpt )); then
1924
+ shopt -s nocasematch;
1925
+ fi
1926
+ }
1927
+ substitute ()
1928
+ {
1929
+
1930
+ local input="$1";
1931
+ local output="$2";
1932
+ shift 2;
1933
+ if [ ! -f "$input" ]; then
1934
+ echo "substitute(): ERROR: file '$input' does not exist" 1>&2;
1935
+ return 1;
1936
+ fi;
1937
+ local content;
1938
+ consumeEntire content < "$input";
1939
+ if [ -e "$output" ]; then
1940
+ chmod +w "$output";
1941
+ fi;
1942
+ substituteStream content "file '$input'" "$@" > "$output"
1943
+ }
1944
+ substituteAll ()
1945
+ {
1946
+
1947
+ local input="$1";
1948
+ local output="$2";
1949
+ local -a args=();
1950
+ _allFlags;
1951
+ substitute "$input" "$output" "${args[@]}"
1952
+ }
1953
+ substituteAllInPlace ()
1954
+ {
1955
+
1956
+ local fileName="$1";
1957
+ shift;
1958
+ substituteAll "$fileName" "$fileName" "$@"
1959
+ }
1960
+ substituteAllStream ()
1961
+ {
1962
+
1963
+ local -a args=();
1964
+ _allFlags;
1965
+ substituteStream "$1" "$2" "${args[@]}"
1966
+ }
1967
+ substituteInPlace ()
1968
+ {
1969
+
1970
+ local -a fileNames=();
1971
+ for arg in "$@";
1972
+ do
1973
+ if [[ "$arg" = "--"* ]]; then
1974
+ break;
1975
+ fi;
1976
+ fileNames+=("$arg");
1977
+ shift;
1978
+ done;
1979
+ if ! [[ "${#fileNames[@]}" -gt 0 ]]; then
1980
+ echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2;
1981
+ return 1;
1982
+ fi;
1983
+ for file in "${fileNames[@]}";
1984
+ do
1985
+ substitute "$file" "$file" "$@";
1986
+ done
1987
+ }
1988
+ substituteStream ()
1989
+ {
1990
+
1991
+ local var=$1;
1992
+ local description=$2;
1993
+ shift 2;
1994
+ while (( "$#" )); do
1995
+ local replace_mode="$1";
1996
+ case "$1" in
1997
+ --replace)
1998
+ if ! "$_substituteStream_has_warned_replace_deprecation"; then
1999
+ echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2;
2000
+ _substituteStream_has_warned_replace_deprecation=true;
2001
+ fi;
2002
+ replace_mode='--replace-warn'
2003
+ ;&
2004
+ --replace-quiet | --replace-warn | --replace-fail)
2005
+ pattern="$2";
2006
+ replacement="$3";
2007
+ shift 3;
2008
+ if ! [[ "${!var}" == *"$pattern"* ]]; then
2009
+ if [ "$replace_mode" == --replace-warn ]; then
2010
+ printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2;
2011
+ else
2012
+ if [ "$replace_mode" == --replace-fail ]; then
2013
+ printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2;
2014
+ return 1;
2015
+ fi;
2016
+ fi;
2017
+ fi;
2018
+ eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'
2019
+ ;;
2020
+ --subst-var)
2021
+ local varName="$2";
2022
+ shift 2;
2023
+ if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then
2024
+ echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2;
2025
+ return 1;
2026
+ fi;
2027
+ if [ -z ${!varName+x} ]; then
2028
+ echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2;
2029
+ return 1;
2030
+ fi;
2031
+ pattern="@$varName@";
2032
+ replacement="${!varName}";
2033
+ eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'
2034
+ ;;
2035
+ --subst-var-by)
2036
+ pattern="@$2@";
2037
+ replacement="$3";
2038
+ eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}';
2039
+ shift 3
2040
+ ;;
2041
+ *)
2042
+ echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2;
2043
+ return 1
2044
+ ;;
2045
+ esac;
2046
+ done;
2047
+ printf "%s" "${!var}"
2048
+ }
2049
+ unpackFile ()
2050
+ {
2051
+
2052
+ curSrc="$1";
2053
+ echo "unpacking source archive $curSrc";
2054
+ if ! runOneHook unpackCmd "$curSrc"; then
2055
+ echo "do not know how to unpack source archive $curSrc";
2056
+ exit 1;
2057
+ fi
2058
+ }
2059
+ unpackPhase ()
2060
+ {
2061
+
2062
+ runHook preUnpack;
2063
+ if [ -z "${srcs:-}" ]; then
2064
+ if [ -z "${src:-}" ]; then
2065
+ echo 'variable $src or $srcs should point to the source';
2066
+ exit 1;
2067
+ fi;
2068
+ srcs="$src";
2069
+ fi;
2070
+ local -a srcsArray;
2071
+ concatTo srcsArray srcs;
2072
+ local dirsBefore="";
2073
+ for i in *;
2074
+ do
2075
+ if [ -d "$i" ]; then
2076
+ dirsBefore="$dirsBefore $i ";
2077
+ fi;
2078
+ done;
2079
+ for i in "${srcsArray[@]}";
2080
+ do
2081
+ unpackFile "$i";
2082
+ done;
2083
+ : "${sourceRoot=}";
2084
+ if [ -n "${setSourceRoot:-}" ]; then
2085
+ runOneHook setSourceRoot;
2086
+ else
2087
+ if [ -z "$sourceRoot" ]; then
2088
+ for i in *;
2089
+ do
2090
+ if [ -d "$i" ]; then
2091
+ case $dirsBefore in
2092
+ *\ $i\ *)
2093
+
2094
+ ;;
2095
+ *)
2096
+ if [ -n "$sourceRoot" ]; then
2097
+ echo "unpacker produced multiple directories";
2098
+ exit 1;
2099
+ fi;
2100
+ sourceRoot="$i"
2101
+ ;;
2102
+ esac;
2103
+ fi;
2104
+ done;
2105
+ fi;
2106
+ fi;
2107
+ if [ -z "$sourceRoot" ]; then
2108
+ echo "unpacker appears to have produced no directories";
2109
+ exit 1;
2110
+ fi;
2111
+ echo "source root is $sourceRoot";
2112
+ if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then
2113
+ chmod -R u+w -- "$sourceRoot";
2114
+ fi;
2115
+ runHook postUnpack
2116
+ }
2117
+ updateAutotoolsGnuConfigScriptsPhase ()
2118
+ {
2119
+
2120
+ if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then
2121
+ return;
2122
+ fi;
2123
+ for script in config.sub config.guess;
2124
+ do
2125
+ for f in $(find . -type f -name "$script");
2126
+ do
2127
+ echo "Updating Autotools / GNU config script to a newer upstream version: $f";
2128
+ cp -f "/nix/store/xb4f90wzr6nca7a1wy9ry9p2hvlhhsxx-gnu-config-2024-01-01/$script" "$f";
2129
+ done;
2130
+ done
2131
+ }
2132
+ updateSourceDateEpoch ()
2133
+ {
2134
+
2135
+ local path="$1";
2136
+ [[ $path == -* ]] && path="./$path";
2137
+ local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ "%p"\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1));
2138
+ local time="${res[0]//\.[0-9]*/}";
2139
+ local newestFile="${res[1]}";
2140
+ if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then
2141
+ echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile";
2142
+ export SOURCE_DATE_EPOCH="$time";
2143
+ local now="$(date +%s)";
2144
+ if [ "$time" -gt $((now - 60)) ]; then
2145
+ echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic";
2146
+ fi;
2147
+ fi
2148
+ }
2149
+ PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}"
2150
+ XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}"
2151
+ export NIX_BUILD_TOP="$(mktemp -d -t nix-shell.XXXXXX)"
2152
+ export TMP="$NIX_BUILD_TOP"
2153
+ export TMPDIR="$NIX_BUILD_TOP"
2154
+ export TEMP="$NIX_BUILD_TOP"
2155
+ export TEMPDIR="$NIX_BUILD_TOP"
2156
+ eval "${shellHook:-}"