@ifunny/ifunny-api-types 1.0.3 → 1.2.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 (215) hide show
  1. package/.devenv/bootstrap/bootstrapLib.nix +630 -0
  2. package/.devenv/bootstrap/default.nix +22 -0
  3. package/.devenv/bootstrap/resolve-lock.nix +190 -0
  4. package/.devenv/changelog-cache.json +9 -0
  5. package/.devenv/devenv.fish +252 -0
  6. package/.devenv/imports.txt +0 -0
  7. package/.devenv/input-paths.txt +10 -0
  8. package/.devenv/load-exports +1 -0
  9. package/.devenv/nix-eval-cache.db +0 -0
  10. package/.devenv/nix-eval-cache.db-shm +0 -0
  11. package/.devenv/nix-eval-cache.db-wal +0 -0
  12. package/.devenv/nix-eval-cache.db.init.lock +0 -0
  13. package/.devenv/nixpkgs-config-99f33fda17d41bc9.nix +17 -0
  14. package/.devenv/nixpkgs-config-c46eff8321b73149.nix +29 -0
  15. package/.devenv/profiles/nix/bootstrap/bootstrapLib.nix +571 -0
  16. package/.devenv/profiles/nix/bootstrap/default.nix +19 -0
  17. package/.devenv/profiles/nix/bootstrap/resolve-lock.nix +157 -0
  18. package/.devenv/profiles/nix/imports.txt +0 -0
  19. package/.devenv/profiles/nix/input-paths.txt +4 -0
  20. package/.devenv/profiles/nix/load-exports +1 -0
  21. package/.devenv/profiles/nix/nix-eval-cache.db +0 -0
  22. package/.devenv/profiles/nix/nix-eval-cache.db-shm +0 -0
  23. package/.devenv/profiles/nix/nix-eval-cache.db-wal +0 -0
  24. package/.devenv/profiles/nix/nixpkgs-config-99f33fda17d41bc9.nix +17 -0
  25. package/.devenv/profiles/nix/shell-0d722b4fe4724c8e.sh +2270 -0
  26. package/.devenv/profiles/nix/shell-314b72302fb2c916.sh +2270 -0
  27. package/.devenv/profiles/nix/shell-6a4b00b5ca837a3b.sh +2270 -0
  28. package/.devenv/profiles/nix/shell-956adc1e664f64c3.sh +2270 -0
  29. package/.devenv/profiles/nix/shell-9dbff87fad44e8d9.sh +2270 -0
  30. package/.devenv/profiles/nix/shell-b1e9e1f82076662f.sh +2270 -0
  31. package/.devenv/profiles/nix/shell-b4f4bbfa36797bee.sh +2270 -0
  32. package/.devenv/profiles/nix/shell-c4b190d331c48d67.sh +2270 -0
  33. package/.devenv/profiles/nix/state/files.json +1 -0
  34. package/.devenv/profiles/nix/state/tasks.db +0 -0
  35. package/.devenv/profiles/nix/state/tasks.db-shm +0 -0
  36. package/.devenv/profiles/nix/state/tasks.db-wal +0 -0
  37. package/.devenv/profiles/nix/task-names.txt +5 -0
  38. package/.devenv/shell-086ca2c39799e6a6.sh +2270 -0
  39. package/.devenv/shell-2c06a35dd99be3d1.sh +2270 -0
  40. package/.devenv/shell-36f1fe0faec08873.sh +2270 -0
  41. package/.devenv/shell-676361065bda5b43.sh +2270 -0
  42. package/.devenv/shell-9f6cb513d1721fef.sh +2270 -0
  43. package/.devenv/shell-c0e4459b4f5922d7.sh +2270 -0
  44. package/.devenv/shell-c862a0db6e9ad5f4.sh +2270 -0
  45. package/.devenv/shell-d71ade933a43e837.sh +2270 -0
  46. package/.devenv/shell-dd73aac05b182946.sh +2270 -0
  47. package/.devenv/shell-e39d0b30a7e0eb13.sh +2270 -0
  48. package/.devenv/shell-env.sh +2263 -0
  49. package/.devenv/shell-f924d749ff8c17ee.sh +2270 -0
  50. package/.devenv/shell-rcfile.sh +152 -0
  51. package/.devenv/state/files.json +1 -0
  52. package/.devenv/state/tasks.db +0 -0
  53. package/.devenv/state/tasks.db-shm +0 -0
  54. package/.devenv/state/tasks.db-wal +0 -0
  55. package/.devenv/state/tasks.db.init.lock +0 -0
  56. package/.devenv/task-names.txt +5 -0
  57. package/.github/workflows/codeql.yml +72 -72
  58. package/.github/workflows/test.yml +31 -31
  59. package/CHANGELOG.md +8405 -417
  60. package/LICENSE +121 -121
  61. package/README.md +2 -2
  62. package/devenv.lock +65 -0
  63. package/devenv.nix +38 -0
  64. package/devenv.yaml +18 -0
  65. package/eslint.config.mjs +18 -0
  66. package/package.json +59 -50
  67. package/prettier.config.js +15 -0
  68. package/dist/errors/bad_request.js +0 -8
  69. package/dist/errors/bad_request.js.map +0 -1
  70. package/dist/errors/captcha_required.js +0 -19
  71. package/dist/errors/captcha_required.js.map +0 -1
  72. package/dist/errors/email_exists.js +0 -8
  73. package/dist/errors/email_exists.js.map +0 -1
  74. package/dist/errors/error.js +0 -3
  75. package/dist/errors/error.js.map +0 -1
  76. package/dist/errors/error_base.js +0 -43
  77. package/dist/errors/error_base.js.map +0 -1
  78. package/dist/errors/index.js +0 -29
  79. package/dist/errors/index.js.map +0 -1
  80. package/dist/errors/invalid_client.js +0 -8
  81. package/dist/errors/invalid_client.js.map +0 -1
  82. package/dist/errors/invalid_email.js +0 -8
  83. package/dist/errors/invalid_email.js.map +0 -1
  84. package/dist/errors/invalid_grant.js +0 -8
  85. package/dist/errors/invalid_grant.js.map +0 -1
  86. package/dist/errors/not_found.js +0 -3
  87. package/dist/errors/not_found.js.map +0 -1
  88. package/dist/errors/permission_denied.js +0 -8
  89. package/dist/errors/permission_denied.js.map +0 -1
  90. package/dist/errors/unauthorized.js +0 -8
  91. package/dist/errors/unauthorized.js.map +0 -1
  92. package/dist/errors/wrong_params.js +0 -8
  93. package/dist/errors/wrong_params.js.map +0 -1
  94. package/dist/index.js +0 -21
  95. package/dist/index.js.map +0 -1
  96. package/dist/payloads/activity.js +0 -50
  97. package/dist/payloads/activity.js.map +0 -1
  98. package/dist/payloads/app.js +0 -3
  99. package/dist/payloads/app.js.map +0 -1
  100. package/dist/payloads/appeal.js +0 -14
  101. package/dist/payloads/appeal.js.map +0 -1
  102. package/dist/payloads/ban.js +0 -36
  103. package/dist/payloads/ban.js.map +0 -1
  104. package/dist/payloads/base.js +0 -3
  105. package/dist/payloads/base.js.map +0 -1
  106. package/dist/payloads/client.js +0 -13
  107. package/dist/payloads/client.js.map +0 -1
  108. package/dist/payloads/comment.js +0 -42
  109. package/dist/payloads/comment.js.map +0 -1
  110. package/dist/payloads/content.js +0 -176
  111. package/dist/payloads/content.js.map +0 -1
  112. package/dist/payloads/index.js +0 -27
  113. package/dist/payloads/index.js.map +0 -1
  114. package/dist/payloads/strike.js +0 -3
  115. package/dist/payloads/strike.js.map +0 -1
  116. package/dist/payloads/user.js +0 -214
  117. package/dist/payloads/user.js.map +0 -1
  118. package/dist/rest/account.js +0 -3
  119. package/dist/rest/account.js.map +0 -1
  120. package/dist/rest/content.js +0 -54
  121. package/dist/rest/content.js.map +0 -1
  122. package/dist/rest/counters.js +0 -3
  123. package/dist/rest/counters.js.map +0 -1
  124. package/dist/rest/endpoints.js +0 -199
  125. package/dist/rest/endpoints.js.map +0 -1
  126. package/dist/rest/explore.js +0 -82
  127. package/dist/rest/explore.js.map +0 -1
  128. package/dist/rest/feeds.js +0 -3
  129. package/dist/rest/feeds.js.map +0 -1
  130. package/dist/rest/index.js +0 -25
  131. package/dist/rest/index.js.map +0 -1
  132. package/dist/rest/issues.js +0 -3
  133. package/dist/rest/issues.js.map +0 -1
  134. package/dist/rest/oauth2.js +0 -9
  135. package/dist/rest/oauth2.js.map +0 -1
  136. package/dist/utils/index.js +0 -19
  137. package/dist/utils/index.js.map +0 -1
  138. package/dist/utils/rest.js +0 -3
  139. package/dist/utils/rest.js.map +0 -1
  140. package/dist/utils/util.js +0 -3
  141. package/dist/utils/util.js.map +0 -1
  142. package/types/errors/bad_request.d.ts +0 -12
  143. package/types/errors/bad_request.d.ts.map +0 -1
  144. package/types/errors/captcha_required.d.ts +0 -33
  145. package/types/errors/captcha_required.d.ts.map +0 -1
  146. package/types/errors/email_exists.d.ts +0 -15
  147. package/types/errors/email_exists.d.ts.map +0 -1
  148. package/types/errors/error.d.ts +0 -29
  149. package/types/errors/error.d.ts.map +0 -1
  150. package/types/errors/error_base.d.ts +0 -61
  151. package/types/errors/error_base.d.ts.map +0 -1
  152. package/types/errors/index.d.ts +0 -13
  153. package/types/errors/index.d.ts.map +0 -1
  154. package/types/errors/invalid_client.d.ts +0 -15
  155. package/types/errors/invalid_client.d.ts.map +0 -1
  156. package/types/errors/invalid_email.d.ts +0 -15
  157. package/types/errors/invalid_email.d.ts.map +0 -1
  158. package/types/errors/invalid_grant.d.ts +0 -12
  159. package/types/errors/invalid_grant.d.ts.map +0 -1
  160. package/types/errors/not_found.d.ts +0 -8
  161. package/types/errors/not_found.d.ts.map +0 -1
  162. package/types/errors/permission_denied.d.ts +0 -12
  163. package/types/errors/permission_denied.d.ts.map +0 -1
  164. package/types/errors/unauthorized.d.ts +0 -12
  165. package/types/errors/unauthorized.d.ts.map +0 -1
  166. package/types/errors/wrong_params.d.ts +0 -11
  167. package/types/errors/wrong_params.d.ts.map +0 -1
  168. package/types/index.d.ts +0 -5
  169. package/types/index.d.ts.map +0 -1
  170. package/types/payloads/activity.d.ts +0 -114
  171. package/types/payloads/activity.d.ts.map +0 -1
  172. package/types/payloads/app.d.ts +0 -266
  173. package/types/payloads/app.d.ts.map +0 -1
  174. package/types/payloads/appeal.d.ts +0 -22
  175. package/types/payloads/appeal.d.ts.map +0 -1
  176. package/types/payloads/ban.d.ts +0 -85
  177. package/types/payloads/ban.d.ts.map +0 -1
  178. package/types/payloads/base.d.ts +0 -5
  179. package/types/payloads/base.d.ts.map +0 -1
  180. package/types/payloads/client.d.ts +0 -106
  181. package/types/payloads/client.d.ts.map +0 -1
  182. package/types/payloads/comment.d.ts +0 -124
  183. package/types/payloads/comment.d.ts.map +0 -1
  184. package/types/payloads/content.d.ts +0 -676
  185. package/types/payloads/content.d.ts.map +0 -1
  186. package/types/payloads/index.d.ts +0 -11
  187. package/types/payloads/index.d.ts.map +0 -1
  188. package/types/payloads/strike.d.ts +0 -15
  189. package/types/payloads/strike.d.ts.map +0 -1
  190. package/types/payloads/user.d.ts +0 -515
  191. package/types/payloads/user.d.ts.map +0 -1
  192. package/types/rest/account.d.ts +0 -4
  193. package/types/rest/account.d.ts.map +0 -1
  194. package/types/rest/content.d.ts +0 -96
  195. package/types/rest/content.d.ts.map +0 -1
  196. package/types/rest/counters.d.ts +0 -10
  197. package/types/rest/counters.d.ts.map +0 -1
  198. package/types/rest/endpoints.d.ts +0 -153
  199. package/types/rest/endpoints.d.ts.map +0 -1
  200. package/types/rest/explore.d.ts +0 -113
  201. package/types/rest/explore.d.ts.map +0 -1
  202. package/types/rest/feeds.d.ts +0 -17
  203. package/types/rest/feeds.d.ts.map +0 -1
  204. package/types/rest/index.d.ts +0 -9
  205. package/types/rest/index.d.ts.map +0 -1
  206. package/types/rest/issues.d.ts +0 -16
  207. package/types/rest/issues.d.ts.map +0 -1
  208. package/types/rest/oauth2.d.ts +0 -37
  209. package/types/rest/oauth2.d.ts.map +0 -1
  210. package/types/utils/index.d.ts +0 -3
  211. package/types/utils/index.d.ts.map +0 -1
  212. package/types/utils/rest.d.ts +0 -50
  213. package/types/utils/rest.d.ts.map +0 -1
  214. package/types/utils/util.d.ts +0 -80
  215. package/types/utils/util.d.ts.map +0 -1
@@ -0,0 +1,2270 @@
1
+ if [ -n "$PS1" ] && [ -e $HOME/.bashrc ]; then
2
+ source $HOME/.bashrc;
3
+ fi
4
+
5
+ shopt -u expand_aliases
6
+ PATH=${PATH:-}
7
+ nix_saved_PATH="$PATH"
8
+ XDG_DATA_DIRS=${XDG_DATA_DIRS:-}
9
+ nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS"
10
+ initialPath='/nix/store/hlxw2q9qansq7bn52xvlb5badw3z1v8s-coreutils-9.10 /nix/store/b3rx5wac9hhfxn9120xkcvdwj51mc9z2-findutils-4.10.0 /nix/store/icrrz26xbyp293kagrlkab1bhc6gra0r-diffutils-3.12 /nix/store/wv7qq5yb8plyhxji9x3r5gpkyfm2kf29-gnused-4.9 /nix/store/8laf6k81j9ckylrigj3xsk76j69knhvl-gnugrep-3.12 /nix/store/gf7b4yz4vhd0y2hnnrimhh875ghwzzzj-gawk-5.3.2 /nix/store/isva9q9zx3frx6hh6cnpihh1kd2bx6bk-gnutar-1.35 /nix/store/w1n7yp2vnldr395hbwbcaw9sflh413bm-gzip-1.14 /nix/store/x8l7qzpab2gpdrp89g48mxlrsiz4f0gm-bzip2-1.0.8-bin /nix/store/0xw6y53ijaqwfd9c99wyaqiinychzv1f-gnumake-4.4.1 /nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9 /nix/store/8y5jm97n4lyw80gh71yihghbhqc11fdz-patch-2.8 /nix/store/27fx8p4k6098wan3zahdbyj79ndcn03z-xz-5.8.2-bin /nix/store/p3j7lphwlci13f9w2v4rav6rbvpi80li-file-5.45'
11
+ NIX_CFLAGS_COMPILE=' -frandom-seed=fncwiw8x7v -isystem /nix/store/pg04l21ca5xaif9hplyi09lhqxbipkcx-bash-interactive-5.3p9-dev/include -isystem /nix/store/b3pq4ppjwbm34cq8mgfmkcbjp8xyqdxa-nodejs-slim-24.13.0-dev/include -isystem /nix/store/h4apbnz8p5fmjwcmzlaxcjm5vr70d97x-nodejs-slim-24.13.0/include -isystem /nix/store/pg04l21ca5xaif9hplyi09lhqxbipkcx-bash-interactive-5.3p9-dev/include -isystem /nix/store/b3pq4ppjwbm34cq8mgfmkcbjp8xyqdxa-nodejs-slim-24.13.0-dev/include -isystem /nix/store/h4apbnz8p5fmjwcmzlaxcjm5vr70d97x-nodejs-slim-24.13.0/include'
12
+ export NIX_CFLAGS_COMPILE
13
+ STRINGS='strings'
14
+ export STRINGS
15
+ declare -a envTargetTargetHooks=()
16
+ patches=''
17
+ export patches
18
+ cmakeFlags=''
19
+ export cmakeFlags
20
+ depsTargetTarget=''
21
+ export depsTargetTarget
22
+ OBJDUMP='objdump'
23
+ export OBJDUMP
24
+ depsBuildTarget=''
25
+ export depsBuildTarget
26
+ declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' )
27
+ depsBuildBuildPropagated=''
28
+ export depsBuildBuildPropagated
29
+ declare -a pkgsHostTarget=()
30
+ declare -a pkgsTargetTarget=()
31
+ CONFIG_SHELL='/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash'
32
+ export CONFIG_SHELL
33
+ doInstallCheck=''
34
+ export doInstallCheck
35
+ DEVENV_ROOT='/media/Code/@Open-iFunny/ifunny-api-types'
36
+ export DEVENV_ROOT
37
+ DEVENV_TASKS=''
38
+ export DEVENV_TASKS
39
+ NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1'
40
+ export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
41
+ configureFlags=''
42
+ export configureFlags
43
+ NIX_BUILD_CORES='4'
44
+ export NIX_BUILD_CORES
45
+ mesonFlags=''
46
+ export mesonFlags
47
+ stdenv='/nix/store/zkiy4zv8wz3v95bj6fdmkqwql8x1vnhb-stdenv-linux'
48
+ export stdenv
49
+ outputInfo='out'
50
+ declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' )
51
+ declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' )
52
+ BASH='/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash'
53
+ READELF='readelf'
54
+ export READELF
55
+ SOURCE_DATE_EPOCH='315532800'
56
+ export SOURCE_DATE_EPOCH
57
+ NIX_LDFLAGS='-rpath /nix/store/fncwiw8x7v34xsdjzglc3kna17hjwvqp-devenv-shell-env/lib '
58
+ export NIX_LDFLAGS
59
+ LD='ld'
60
+ export LD
61
+ prefix='/nix/store/fncwiw8x7v34xsdjzglc3kna17hjwvqp-devenv-shell-env'
62
+ CXX='g++'
63
+ export CXX
64
+ PKG_CONFIG='pkg-config'
65
+ export PKG_CONFIG
66
+ depsHostHostPropagated=''
67
+ export depsHostHostPropagated
68
+ NIX_NO_SELF_RPATH='1'
69
+ outputDevman='out'
70
+ PATH='/nix/store/0550j0i8bmzxbcnzrg1g51zigj7y12ih-bash-interactive-5.3p9/bin:/nix/store/b3pq4ppjwbm34cq8mgfmkcbjp8xyqdxa-nodejs-slim-24.13.0-dev/bin:/nix/store/h4apbnz8p5fmjwcmzlaxcjm5vr70d97x-nodejs-slim-24.13.0/bin:/nix/store/jn9wngbhqmijdw4m2czilnhl4pw4jcdp-typescript-language-server-5.1.3/bin:/nix/store/8x49w8i0vafv34rlc6h4a0f7z0z2qpb5-git-2.53.0/bin:/nix/store/1nv3i8mpypy3d516f4pd95m0w72r73jy-pkg-config-wrapper-0.29.2/bin:/nix/store/590yx3aynyhs48jyk8ip37fk1mjqfhkb-patchelf-0.15.2/bin:/nix/store/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0/bin:/nix/store/sca0pf46jmxva40qahkcwys5c1lvk6n2-gcc-15.2.0/bin:/nix/store/2c48s343k15i0cmwb9cp1vi6randmzcw-glibc-2.42-51-bin/bin:/nix/store/hlxw2q9qansq7bn52xvlb5badw3z1v8s-coreutils-9.10/bin:/nix/store/4yi6jj75bb5hhdzpzlxfyf69d35wsf2x-binutils-wrapper-2.44/bin:/nix/store/9nmzd62x45ayp4vmswvn6z45h6bzrsla-binutils-2.44/bin:/nix/store/hlxw2q9qansq7bn52xvlb5badw3z1v8s-coreutils-9.10/bin:/nix/store/b3rx5wac9hhfxn9120xkcvdwj51mc9z2-findutils-4.10.0/bin:/nix/store/icrrz26xbyp293kagrlkab1bhc6gra0r-diffutils-3.12/bin:/nix/store/wv7qq5yb8plyhxji9x3r5gpkyfm2kf29-gnused-4.9/bin:/nix/store/8laf6k81j9ckylrigj3xsk76j69knhvl-gnugrep-3.12/bin:/nix/store/gf7b4yz4vhd0y2hnnrimhh875ghwzzzj-gawk-5.3.2/bin:/nix/store/isva9q9zx3frx6hh6cnpihh1kd2bx6bk-gnutar-1.35/bin:/nix/store/w1n7yp2vnldr395hbwbcaw9sflh413bm-gzip-1.14/bin:/nix/store/x8l7qzpab2gpdrp89g48mxlrsiz4f0gm-bzip2-1.0.8-bin/bin:/nix/store/0xw6y53ijaqwfd9c99wyaqiinychzv1f-gnumake-4.4.1/bin:/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin:/nix/store/8y5jm97n4lyw80gh71yihghbhqc11fdz-patch-2.8/bin:/nix/store/27fx8p4k6098wan3zahdbyj79ndcn03z-xz-5.8.2-bin/bin:/nix/store/p3j7lphwlci13f9w2v4rav6rbvpi80li-file-5.45/bin'
71
+ export PATH
72
+ declare -a preConfigureHooks=('_multioutConfig' )
73
+ XDG_DATA_DIRS='/nix/store/0550j0i8bmzxbcnzrg1g51zigj7y12ih-bash-interactive-5.3p9/share:/nix/store/h4apbnz8p5fmjwcmzlaxcjm5vr70d97x-nodejs-slim-24.13.0/share:/nix/store/8x49w8i0vafv34rlc6h4a0f7z0z2qpb5-git-2.53.0/share:/nix/store/1nv3i8mpypy3d516f4pd95m0w72r73jy-pkg-config-wrapper-0.29.2/share:/nix/store/590yx3aynyhs48jyk8ip37fk1mjqfhkb-patchelf-0.15.2/share'
74
+ export XDG_DATA_DIRS
75
+ CC='gcc'
76
+ export CC
77
+ PKG_CONFIG_PATH='/nix/store/pg04l21ca5xaif9hplyi09lhqxbipkcx-bash-interactive-5.3p9-dev/lib/pkgconfig'
78
+ export PKG_CONFIG_PATH
79
+ defaultNativeBuildInputs='/nix/store/590yx3aynyhs48jyk8ip37fk1mjqfhkb-patchelf-0.15.2 /nix/store/gz3rknshr1ywis4mjaqrgj3z2shp3n3v-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/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0'
80
+ NIX_STORE='/nix/store'
81
+ export NIX_STORE
82
+ defaultBuildInputs=''
83
+ out='/nix/store/fncwiw8x7v34xsdjzglc3kna17hjwvqp-devenv-shell-env'
84
+ export out
85
+ declare -a unpackCmdHooks=('_defaultUnpack' )
86
+ SHELL='/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash'
87
+ export SHELL
88
+ declare -a pkgsBuildHost=('/nix/store/pg04l21ca5xaif9hplyi09lhqxbipkcx-bash-interactive-5.3p9-dev' '/nix/store/0550j0i8bmzxbcnzrg1g51zigj7y12ih-bash-interactive-5.3p9' '/nix/store/b3pq4ppjwbm34cq8mgfmkcbjp8xyqdxa-nodejs-slim-24.13.0-dev' '/nix/store/h4apbnz8p5fmjwcmzlaxcjm5vr70d97x-nodejs-slim-24.13.0' '/nix/store/jn9wngbhqmijdw4m2czilnhl4pw4jcdp-typescript-language-server-5.1.3' '/nix/store/8x49w8i0vafv34rlc6h4a0f7z0z2qpb5-git-2.53.0' '/nix/store/1nv3i8mpypy3d516f4pd95m0w72r73jy-pkg-config-wrapper-0.29.2' '/nix/store/590yx3aynyhs48jyk8ip37fk1mjqfhkb-patchelf-0.15.2' '/nix/store/gz3rknshr1ywis4mjaqrgj3z2shp3n3v-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/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0' '/nix/store/4yi6jj75bb5hhdzpzlxfyf69d35wsf2x-binutils-wrapper-2.44' )
89
+ dontAddDisableDepTrack='1'
90
+ export dontAddDisableDepTrack
91
+ NIX_CC='/nix/store/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0'
92
+ export NIX_CC
93
+ declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' )
94
+ strictDeps=''
95
+ export strictDeps
96
+ shell='/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash'
97
+ export shell
98
+ declare -a propagatedTargetDepFiles=('propagated-target-target-deps' )
99
+ outputMan='out'
100
+ name='devenv-shell-env'
101
+ export name
102
+ declare -a pkgsBuildTarget=()
103
+ MACHTYPE='x86_64-pc-linux-gnu'
104
+ preferLocalBuild='1'
105
+ export preferLocalBuild
106
+ OBJCOPY='objcopy'
107
+ export OBJCOPY
108
+ outputs='out'
109
+ export outputs
110
+ nativeBuildInputs='/nix/store/pg04l21ca5xaif9hplyi09lhqxbipkcx-bash-interactive-5.3p9-dev /nix/store/b3pq4ppjwbm34cq8mgfmkcbjp8xyqdxa-nodejs-slim-24.13.0-dev /nix/store/jn9wngbhqmijdw4m2czilnhl4pw4jcdp-typescript-language-server-5.1.3 /nix/store/8x49w8i0vafv34rlc6h4a0f7z0z2qpb5-git-2.53.0 /nix/store/1nv3i8mpypy3d516f4pd95m0w72r73jy-pkg-config-wrapper-0.29.2'
111
+ export nativeBuildInputs
112
+ DEVENV_PROFILE='/nix/store/npbcw7r3h388y1c69h1y6xl14bwff2mq-devenv-profile'
113
+ export DEVENV_PROFILE
114
+ outputDoc='out'
115
+ DEVENV_RUNTIME='/run/user/1000/devenv-02bb315'
116
+ export DEVENV_RUNTIME
117
+ SIZE='size'
118
+ export SIZE
119
+ declare -a pkgsBuildBuild=()
120
+ outputLib='out'
121
+ _substituteStream_has_warned_replace_deprecation='false'
122
+ doCheck=''
123
+ export doCheck
124
+ PS4='+ '
125
+ RANLIB='ranlib'
126
+ export RANLIB
127
+ outputDev='out'
128
+ propagatedNativeBuildInputs=''
129
+ export propagatedNativeBuildInputs
130
+ declare -a envBuildTargetHooks=('addNodePath' )
131
+ shellHook='
132
+ export PS1="\[\e[0;34m\](devenv)\[\e[0m\] ${PS1-}"
133
+
134
+ # Override temp directories that stdenv set to NIX_BUILD_TOP.
135
+ # Only reset those that still point to the Nix build dir; leave
136
+ # any user/CI-supplied value intact so child processes (e.g.
137
+ # `devenv processes wait`) compute the same runtime directory.
138
+ for var in TMP TMPDIR TEMP TEMPDIR; do
139
+ if [ -n "${!var-}" ] && [ "${!var}" = "${NIX_BUILD_TOP-}" ]; then
140
+ export "$var"=/tmp
141
+ fi
142
+ done
143
+ if [ -n "${NIX_BUILD_TOP-}" ]; then
144
+ unset NIX_BUILD_TOP
145
+ fi
146
+
147
+ # set path to locales on non-NixOS Linux hosts
148
+ if [ -z "${LOCALE_ARCHIVE-}" ]; then
149
+ export LOCALE_ARCHIVE=/nix/store/q6y3frkqaq8v7va2rmgaq6jvhy1vb9q3-glibc-locales-2.42-51/lib/locale/locale-archive
150
+ fi
151
+
152
+
153
+ # direnv helper
154
+ if [ ! type -p direnv &>/dev/null && -f .envrc ]; then
155
+ echo "An .envrc file was detected, but the direnv command is not installed."
156
+ echo "To use this configuration, please install direnv: https://direnv.net/docs/installation.html"
157
+ fi
158
+
159
+ mkdir -p "$DEVENV_STATE"
160
+ if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/hlxw2q9qansq7bn52xvlb5badw3z1v8s-coreutils-9.10/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/npbcw7r3h388y1c69h1y6xl14bwff2mq-devenv-profile" ]
161
+ then
162
+ ln -snf /nix/store/npbcw7r3h388y1c69h1y6xl14bwff2mq-devenv-profile "$DEVENV_DOTFILE/profile"
163
+ fi
164
+ unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps
165
+
166
+ mkdir -p /run/user/1000/devenv-02bb315
167
+ ln -snf /run/user/1000/devenv-02bb315 /media/Code/@Open-iFunny/ifunny-api-types/.devenv/run
168
+
169
+
170
+ export PATH="node_modules/.bin:$PATH"
171
+
172
+
173
+
174
+ # Check whether the direnv integration is out of date.
175
+ {
176
+ if [[ ":${DIRENV_ACTIVE-}:" == *":/media/Code/@Open-iFunny/ifunny-api-types:"* ]]; then
177
+ if [[ ! "${DEVENV_NO_DIRENVRC_OUTDATED_WARNING-}" == 1 && ! "${DEVENV_DIRENVRC_ROLLING_UPGRADE-}" == 1 ]]; then
178
+ if [[ ${DEVENV_DIRENVRC_VERSION:-0} -lt 2 ]]; then
179
+ direnv_line=$(grep --color=never -E "source_url.*cachix/devenv" .envrc || echo "")
180
+
181
+ echo "✨ The direnv integration in your .envrc is out of date."
182
+ echo ""
183
+ echo -n "RECOMMENDED: devenv can now auto-upgrade the direnv integration. "
184
+ if [[ -n "$direnv_line" ]]; then
185
+ echo "To enable this feature, replace the following line in your .envrc:"
186
+ echo ""
187
+ echo " $direnv_line"
188
+ echo ""
189
+ echo "with:"
190
+ echo ""
191
+ echo " eval \"\$(devenv direnvrc)\""
192
+ else
193
+ echo "To enable this feature, replace the \`source_url\` line that fetches the direnvrc integration in your .envrc with:"
194
+ echo ""
195
+ echo " eval \"$(devenv direnvrc)\""
196
+ fi
197
+ echo ""
198
+ echo "If you prefer to continue managing the integration manually, follow the upgrade instructions at https://devenv.sh/integrations/direnv/."
199
+ echo ""
200
+ echo "To disable this message:"
201
+ echo ""
202
+ echo " Add the following environment to your .envrc before \`use devenv\`:"
203
+ echo ""
204
+ echo " export DEVENV_NO_DIRENVRC_OUTDATED_WARNING=1"
205
+ echo ""
206
+ echo " Or set the following option in your devenv configuration:"
207
+ echo ""
208
+ echo " devenv.warnOnNewVersion = false;"
209
+ echo ""
210
+ fi
211
+ fi
212
+ fi
213
+ } >&2
214
+
215
+ git --version # Use packages
216
+
217
+ '
218
+ export shellHook
219
+ depsBuildTargetPropagated=''
220
+ export depsBuildTargetPropagated
221
+ HOSTTYPE='x86_64'
222
+ propagatedBuildInputs=''
223
+ export propagatedBuildInputs
224
+ buildInputs=''
225
+ export buildInputs
226
+ __structuredAttrs=''
227
+ export __structuredAttrs
228
+ IFS='
229
+ '
230
+ declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' )
231
+ DEVENV_DOTFILE='/media/Code/@Open-iFunny/ifunny-api-types/.devenv'
232
+ export DEVENV_DOTFILE
233
+ OLDPWD=''
234
+ export OLDPWD
235
+ declare -a postFixupHooks=('noBrokenSymlinksInAllOutputs' '_makeSymlinksRelative' '_multioutPropagateDev' )
236
+ DEVENV_TASK_FILE='/nix/store/nhydk1vfz2iflsibb9a71r86wcyflz49-tasks.json'
237
+ export DEVENV_TASK_FILE
238
+ NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningextensive libcxxhardeningfast pic relro stackclashprotection stackprotector strictoverflow zerocallusedregs'
239
+ export NIX_HARDENING_ENABLE
240
+ depsBuildBuild=''
241
+ export depsBuildBuild
242
+ NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1'
243
+ export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
244
+ NIX_ENFORCE_NO_NATIVE='1'
245
+ export NIX_ENFORCE_NO_NATIVE
246
+ NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1'
247
+ export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
248
+ OSTYPE='linux-gnu'
249
+ depsHostHost=''
250
+ export depsHostHost
251
+ declare -a envBuildHostHooks=('addNodePath' )
252
+ NIX_BINTOOLS='/nix/store/4yi6jj75bb5hhdzpzlxfyf69d35wsf2x-binutils-wrapper-2.44'
253
+ export NIX_BINTOOLS
254
+ preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase'
255
+ AR='ar'
256
+ export AR
257
+ NODE_PATH='/nix/store/jn9wngbhqmijdw4m2czilnhl4pw4jcdp-typescript-language-server-5.1.3/lib/node_modules'
258
+ export NODE_PATH
259
+ outputBin='out'
260
+ declare -a envBuildBuildHooks=('addNodePath' )
261
+ declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' )
262
+ AS='as'
263
+ export AS
264
+ LINENO='79'
265
+ NM='nm'
266
+ export NM
267
+ OPTERR='1'
268
+ depsTargetTargetPropagated=''
269
+ export depsTargetTargetPropagated
270
+ IN_NIX_SHELL='impure'
271
+ export IN_NIX_SHELL
272
+ outputDevdoc='REMOVE'
273
+ phases='buildPhase'
274
+ export phases
275
+ buildPhase='{ echo "------------------------------------------------------------";
276
+ echo " WARNING: the existence of this path is not guaranteed.";
277
+ echo " It is an internal implementation detail for pkgs.mkShell.";
278
+ echo "------------------------------------------------------------";
279
+ echo;
280
+ # Record all build inputs as runtime dependencies
281
+ export;
282
+ } >> "$out"
283
+ '
284
+ export buildPhase
285
+ system='x86_64-linux'
286
+ export system
287
+ builder='/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin/bash'
288
+ export builder
289
+ STRIP='strip'
290
+ export STRIP
291
+ HOST_PATH='/nix/store/hlxw2q9qansq7bn52xvlb5badw3z1v8s-coreutils-9.10/bin:/nix/store/b3rx5wac9hhfxn9120xkcvdwj51mc9z2-findutils-4.10.0/bin:/nix/store/icrrz26xbyp293kagrlkab1bhc6gra0r-diffutils-3.12/bin:/nix/store/wv7qq5yb8plyhxji9x3r5gpkyfm2kf29-gnused-4.9/bin:/nix/store/8laf6k81j9ckylrigj3xsk76j69knhvl-gnugrep-3.12/bin:/nix/store/gf7b4yz4vhd0y2hnnrimhh875ghwzzzj-gawk-5.3.2/bin:/nix/store/isva9q9zx3frx6hh6cnpihh1kd2bx6bk-gnutar-1.35/bin:/nix/store/w1n7yp2vnldr395hbwbcaw9sflh413bm-gzip-1.14/bin:/nix/store/x8l7qzpab2gpdrp89g48mxlrsiz4f0gm-bzip2-1.0.8-bin/bin:/nix/store/0xw6y53ijaqwfd9c99wyaqiinychzv1f-gnumake-4.4.1/bin:/nix/store/2hjsch59amjs3nbgh7ahcfzm2bfwl8zi-bash-5.3p9/bin:/nix/store/8y5jm97n4lyw80gh71yihghbhqc11fdz-patch-2.8/bin:/nix/store/27fx8p4k6098wan3zahdbyj79ndcn03z-xz-5.8.2-bin/bin:/nix/store/p3j7lphwlci13f9w2v4rav6rbvpi80li-file-5.45/bin'
292
+ export HOST_PATH
293
+ hardeningDisable=''
294
+ export hardeningDisable
295
+ declare -a pkgsHostHost=()
296
+ declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' )
297
+ DEVENV_STATE='/media/Code/@Open-iFunny/ifunny-api-types/.devenv/state'
298
+ export DEVENV_STATE
299
+ pkg='/nix/store/kbw2j1vag664b3sj3rjwz9v53cqx87sb-gcc-wrapper-15.2.0'
300
+ outputInclude='out'
301
+ unpackFile ()
302
+ {
303
+
304
+ curSrc="$1";
305
+ echo "unpacking source archive $curSrc";
306
+ if ! runOneHook unpackCmd "$curSrc"; then
307
+ echo "do not know how to unpack source archive $curSrc";
308
+ exit 1;
309
+ fi
310
+ }
311
+ substituteAllInPlace ()
312
+ {
313
+
314
+ local fileName="$1";
315
+ shift;
316
+ substituteAll "$fileName" "$fileName" "$@"
317
+ }
318
+ nixVomitLog ()
319
+ {
320
+
321
+ _nixLogWithLevel 7 "$*"
322
+ }
323
+ substitute ()
324
+ {
325
+
326
+ local input="$1";
327
+ local output="$2";
328
+ shift 2;
329
+ if [ ! -f "$input" ]; then
330
+ echo "substitute(): ERROR: file '$input' does not exist" 1>&2;
331
+ return 1;
332
+ fi;
333
+ local content;
334
+ consumeEntire content < "$input";
335
+ if [ -e "$output" ]; then
336
+ chmod +w "$output";
337
+ fi;
338
+ substituteStream content "file '$input'" "$@" > "$output"
339
+ }
340
+ auditTmpdir ()
341
+ {
342
+
343
+ local dir="$1";
344
+ [ -e "$dir" ] || return 0;
345
+ echo "checking for references to $TMPDIR/ in $dir...";
346
+ local tmpdir elf_fifo script_fifo;
347
+ tmpdir="$(mktemp -d)";
348
+ elf_fifo="$tmpdir/elf";
349
+ script_fifo="$tmpdir/script";
350
+ mkfifo "$elf_fifo" "$script_fifo";
351
+ ( find "$dir" -type f -not -path '*/.build-id/*' -print0 | while IFS= read -r -d '' file; do
352
+ if isELF "$file"; then
353
+ printf '%s\0' "$file" 1>&3;
354
+ else
355
+ if isScript "$file"; then
356
+ filename=${file##*/};
357
+ dir=${file%/*};
358
+ if [ -e "$dir/.$filename-wrapped" ]; then
359
+ printf '%s\0' "$file" 1>&4;
360
+ fi;
361
+ fi;
362
+ fi;
363
+ done;
364
+ exec 3>&- 4>&- ) 3> "$elf_fifo" 4> "$script_fifo" & ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c '
365
+ if { printf :; patchelf --print-rpath "$1"; } | grep -q -F ":$TMPDIR/"; then
366
+ echo "RPATH of binary $1 contains a forbidden reference to $TMPDIR/"
367
+ exit 1
368
+ fi
369
+ ' _ < "$elf_fifo" ) & local pid_elf=$!;
370
+ local pid_script;
371
+ ( xargs -0 -r -P "$NIX_BUILD_CORES" -n 1 sh -c '
372
+ if grep -q -F "$TMPDIR/" "$1"; then
373
+ echo "wrapper script $1 contains a forbidden reference to $TMPDIR/"
374
+ exit 1
375
+ fi
376
+ ' _ < "$script_fifo" ) & local pid_script=$!;
377
+ wait "$pid_elf" || {
378
+ echo "Some binaries contain forbidden references to $TMPDIR/. Check the error above!";
379
+ exit 1
380
+ };
381
+ wait "$pid_script" || {
382
+ echo "Some scripts contain forbidden references to $TMPDIR/. Check the error above!";
383
+ exit 1
384
+ };
385
+ rm -r "$tmpdir"
386
+ }
387
+ nixErrorLog ()
388
+ {
389
+
390
+ _nixLogWithLevel 0 "$*"
391
+ }
392
+ exitHandler ()
393
+ {
394
+
395
+ exitCode="$?";
396
+ set +e;
397
+ if [ -n "${showBuildStats:-}" ]; then
398
+ read -r -d '' -a buildTimes < <(times);
399
+ echo "build times:";
400
+ echo "user time for the shell ${buildTimes[0]}";
401
+ echo "system time for the shell ${buildTimes[1]}";
402
+ echo "user time for all child processes ${buildTimes[2]}";
403
+ echo "system time for all child processes ${buildTimes[3]}";
404
+ fi;
405
+ if (( "$exitCode" != 0 )); then
406
+ runHook failureHook;
407
+ if [ -n "${succeedOnFailure:-}" ]; then
408
+ echo "build failed with exit code $exitCode (ignored)";
409
+ mkdir -p "$out/nix-support";
410
+ printf "%s" "$exitCode" > "$out/nix-support/failed";
411
+ exit 0;
412
+ fi;
413
+ else
414
+ runHook exitHook;
415
+ fi;
416
+ return "$exitCode"
417
+ }
418
+ _assignFirst ()
419
+ {
420
+
421
+ local varName="$1";
422
+ local _var;
423
+ local REMOVE=REMOVE;
424
+ shift;
425
+ for _var in "$@";
426
+ do
427
+ if [ -n "${!_var-}" ]; then
428
+ eval "${varName}"="${_var}";
429
+ return;
430
+ fi;
431
+ done;
432
+ echo;
433
+ echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}.";
434
+ echo " The following variables were all unset or empty:";
435
+ echo " $*";
436
+ if [ -z "${out:-}" ]; then
437
+ echo ' If you do not want an "out" output in your derivation, make sure to define';
438
+ echo ' the other specific required outputs. This can be achieved by picking one';
439
+ echo " of the above as an output.";
440
+ echo ' You do not have to remove "out" if you want to have a different default';
441
+ echo ' output, because the first output is taken as a default.';
442
+ echo;
443
+ fi;
444
+ return 1
445
+ }
446
+ _makeSymlinksRelative ()
447
+ {
448
+
449
+ local prefixes;
450
+ prefixes=();
451
+ for output in $(getAllOutputNames);
452
+ do
453
+ [ ! -e "${!output}" ] && continue;
454
+ prefixes+=("${!output}");
455
+ done;
456
+ find "${prefixes[@]}" -type l -printf '%H\0%p\0' | xargs -0 -n2 -r -P "$NIX_BUILD_CORES" sh -c '
457
+ output="$1"
458
+ link="$2"
459
+
460
+ linkTarget=$(readlink "$link")
461
+
462
+ # only touch links that point inside the same output tree
463
+ [[ $linkTarget == "$output"/* ]] || exit 0
464
+
465
+ if [ ! -e "$linkTarget" ]; then
466
+ echo "the symlink $link is broken, it points to $linkTarget (which is missing)"
467
+ fi
468
+
469
+ echo "making symlink relative: $link"
470
+ ln -snrf "$linkTarget" "$link"
471
+ ' _
472
+ }
473
+ getTargetRoleEnvHook ()
474
+ {
475
+
476
+ getRole "$depTargetOffset"
477
+ }
478
+ _moveToShare ()
479
+ {
480
+
481
+ if [ -n "$__structuredAttrs" ]; then
482
+ if [ -z "${forceShare-}" ]; then
483
+ forceShare=(man doc info);
484
+ fi;
485
+ else
486
+ forceShare=(${forceShare:-man doc info});
487
+ fi;
488
+ if [[ -z "$out" ]]; then
489
+ return;
490
+ fi;
491
+ for d in "${forceShare[@]}";
492
+ do
493
+ if [ -d "$out/$d" ]; then
494
+ if [ -d "$out/share/$d" ]; then
495
+ echo "both $d/ and share/$d/ exist!";
496
+ else
497
+ echo "moving $out/$d to $out/share/$d";
498
+ mkdir -p $out/share;
499
+ mv $out/$d $out/share/;
500
+ fi;
501
+ fi;
502
+ done
503
+ }
504
+ activatePackage ()
505
+ {
506
+
507
+ local pkg="$1";
508
+ local -r hostOffset="$2";
509
+ local -r targetOffset="$3";
510
+ (( hostOffset <= targetOffset )) || exit 1;
511
+ if [ -f "$pkg" ]; then
512
+ nixTalkativeLog "sourcing setup hook '$pkg'";
513
+ source "$pkg";
514
+ fi;
515
+ if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then
516
+ addToSearchPath _PATH "$pkg/bin";
517
+ fi;
518
+ if (( hostOffset <= -1 )); then
519
+ addToSearchPath _XDG_DATA_DIRS "$pkg/share";
520
+ fi;
521
+ if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then
522
+ addToSearchPath _HOST_PATH "$pkg/bin";
523
+ fi;
524
+ if [[ -f "$pkg/nix-support/setup-hook" ]]; then
525
+ nixTalkativeLog "sourcing setup hook '$pkg/nix-support/setup-hook'";
526
+ source "$pkg/nix-support/setup-hook";
527
+ fi
528
+ }
529
+ fixupPhase ()
530
+ {
531
+
532
+ local output;
533
+ for output in $(getAllOutputNames);
534
+ do
535
+ if [ -e "${!output}" ]; then
536
+ chmod -R u+w,u-s,g-s "${!output}";
537
+ fi;
538
+ done;
539
+ runHook preFixup;
540
+ local output;
541
+ for output in $(getAllOutputNames);
542
+ do
543
+ prefix="${!output}" runHook fixupOutput;
544
+ done;
545
+ recordPropagatedDependencies;
546
+ if [ -n "${setupHook:-}" ]; then
547
+ mkdir -p "${!outputDev}/nix-support";
548
+ substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook";
549
+ fi;
550
+ if [ -n "${setupHooks:-}" ]; then
551
+ mkdir -p "${!outputDev}/nix-support";
552
+ local hook;
553
+ for hook in ${setupHooks[@]};
554
+ do
555
+ local content;
556
+ consumeEntire content < "$hook";
557
+ substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook";
558
+ unset -v content;
559
+ done;
560
+ unset -v hook;
561
+ fi;
562
+ if [ -n "${propagatedUserEnvPkgs[*]:-}" ]; then
563
+ mkdir -p "${!outputBin}/nix-support";
564
+ printWords "${propagatedUserEnvPkgs[@]}" > "${!outputBin}/nix-support/propagated-user-env-packages";
565
+ fi;
566
+ runHook postFixup
567
+ }
568
+ nixDebugLog ()
569
+ {
570
+
571
+ _nixLogWithLevel 6 "$*"
572
+ }
573
+ patchPhase ()
574
+ {
575
+
576
+ runHook prePatch;
577
+ local -a patchesArray;
578
+ concatTo patchesArray patches;
579
+ local -a flagsArray;
580
+ concatTo flagsArray patchFlags=-p1;
581
+ for i in "${patchesArray[@]}";
582
+ do
583
+ echo "applying patch $i";
584
+ local uncompress=cat;
585
+ case "$i" in
586
+ *.gz)
587
+ uncompress="gzip -d"
588
+ ;;
589
+ *.bz2)
590
+ uncompress="bzip2 -d"
591
+ ;;
592
+ *.xz)
593
+ uncompress="xz -d"
594
+ ;;
595
+ *.lzma)
596
+ uncompress="lzma -d"
597
+ ;;
598
+ esac;
599
+ $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}";
600
+ done;
601
+ runHook postPatch
602
+ }
603
+ pkgConfigWrapper_addPkgConfigPath ()
604
+ {
605
+
606
+ local role_post;
607
+ getHostRoleEnvHook;
608
+ addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig";
609
+ addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig"
610
+ }
611
+ substituteAllStream ()
612
+ {
613
+
614
+ local -a args=();
615
+ _allFlags;
616
+ substituteStream "$1" "$2" "${args[@]}"
617
+ }
618
+ concatStringsSep ()
619
+ {
620
+
621
+ local sep="$1";
622
+ local name="$2";
623
+ local type oldifs;
624
+ if type=$(declare -p "$name" 2> /dev/null); then
625
+ local -n nameref="$name";
626
+ case "${type#* }" in
627
+ -A*)
628
+ echo "concatStringsSep(): ERROR: trying to use concatStringsSep on an associative array." 1>&2;
629
+ return 1
630
+ ;;
631
+ -a*)
632
+ local IFS="$(printf '\036')"
633
+ ;;
634
+ *)
635
+ local IFS=" "
636
+ ;;
637
+ esac;
638
+ local ifs_separated="${nameref[*]}";
639
+ echo -n "${ifs_separated//"$IFS"/"$sep"}";
640
+ fi
641
+ }
642
+ noBrokenSymlinksInAllOutputs ()
643
+ {
644
+
645
+ if [[ -z ${dontCheckForBrokenSymlinks-} ]]; then
646
+ for output in $(getAllOutputNames);
647
+ do
648
+ noBrokenSymlinks "${!output}";
649
+ done;
650
+ fi
651
+ }
652
+ nixChattyLog ()
653
+ {
654
+
655
+ _nixLogWithLevel 5 "$*"
656
+ }
657
+ _nixLogWithLevel ()
658
+ {
659
+
660
+ [[ -z ${NIX_LOG_FD-} || ${NIX_DEBUG:-0} -lt ${1:?} ]] && return 0;
661
+ local logLevel;
662
+ case "${1:?}" in
663
+ 0)
664
+ logLevel=ERROR
665
+ ;;
666
+ 1)
667
+ logLevel=WARN
668
+ ;;
669
+ 2)
670
+ logLevel=NOTICE
671
+ ;;
672
+ 3)
673
+ logLevel=INFO
674
+ ;;
675
+ 4)
676
+ logLevel=TALKATIVE
677
+ ;;
678
+ 5)
679
+ logLevel=CHATTY
680
+ ;;
681
+ 6)
682
+ logLevel=DEBUG
683
+ ;;
684
+ 7)
685
+ logLevel=VOMIT
686
+ ;;
687
+ *)
688
+ echo "_nixLogWithLevel: called with invalid log level: ${1:?}" >&"$NIX_LOG_FD";
689
+ return 1
690
+ ;;
691
+ esac;
692
+ local callerName="${FUNCNAME[2]}";
693
+ if [[ $callerName == "_callImplicitHook" ]]; then
694
+ callerName="${hookName:?}";
695
+ fi;
696
+ printf "%s: %s: %s\n" "$logLevel" "$callerName" "${2:?}" >&"$NIX_LOG_FD"
697
+ }
698
+ nixNoticeLog ()
699
+ {
700
+
701
+ _nixLogWithLevel 2 "$*"
702
+ }
703
+ checkPhase ()
704
+ {
705
+
706
+ runHook preCheck;
707
+ if [[ -z "${foundMakefile:-}" ]]; then
708
+ echo "no Makefile or custom checkPhase, doing nothing";
709
+ runHook postCheck;
710
+ return;
711
+ fi;
712
+ if [[ -z "${checkTarget:-}" ]]; then
713
+ if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then
714
+ checkTarget="check";
715
+ else
716
+ if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then
717
+ checkTarget="test";
718
+ fi;
719
+ fi;
720
+ fi;
721
+ if [[ -z "${checkTarget:-}" ]]; then
722
+ echo "no check/test target in ${makefile:-Makefile}, doing nothing";
723
+ else
724
+ local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
725
+ concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget;
726
+ echoCmd 'check flags' "${flagsArray[@]}";
727
+ make ${makefile:+-f $makefile} "${flagsArray[@]}";
728
+ unset flagsArray;
729
+ fi;
730
+ runHook postCheck
731
+ }
732
+ getHostRoleEnvHook ()
733
+ {
734
+
735
+ getRole "$depHostOffset"
736
+ }
737
+ echoCmd ()
738
+ {
739
+
740
+ printf "%s:" "$1";
741
+ shift;
742
+ printf ' %q' "$@";
743
+ echo
744
+ }
745
+ noBrokenSymlinks ()
746
+ {
747
+
748
+ local -r output="${1:?}";
749
+ local path;
750
+ local pathParent;
751
+ local symlinkTarget;
752
+ local -i numDanglingSymlinks=0;
753
+ local -i numReflexiveSymlinks=0;
754
+ local -i numUnreadableSymlinks=0;
755
+ if [[ ! -e $output ]]; then
756
+ nixWarnLog "skipping non-existent output $output";
757
+ return 0;
758
+ fi;
759
+ nixInfoLog "running on $output";
760
+ while IFS= read -r -d '' path; do
761
+ pathParent="$(dirname "$path")";
762
+ if ! symlinkTarget="$(readlink "$path")"; then
763
+ nixErrorLog "the symlink $path is unreadable";
764
+ numUnreadableSymlinks+=1;
765
+ continue;
766
+ fi;
767
+ if [[ $symlinkTarget == /* ]]; then
768
+ nixInfoLog "symlink $path points to absolute target $symlinkTarget";
769
+ else
770
+ nixInfoLog "symlink $path points to relative target $symlinkTarget";
771
+ symlinkTarget="$(realpath --no-symlinks --canonicalize-missing "$pathParent/$symlinkTarget")";
772
+ fi;
773
+ if [[ $symlinkTarget = "$TMPDIR"/* ]]; then
774
+ nixErrorLog "the symlink $path points to $TMPDIR directory: $symlinkTarget";
775
+ numDanglingSymlinks+=1;
776
+ continue;
777
+ fi;
778
+ if [[ $symlinkTarget != "$NIX_STORE"/* ]]; then
779
+ nixInfoLog "symlink $path points outside the Nix store; ignoring";
780
+ continue;
781
+ fi;
782
+ if [[ $path == "$symlinkTarget" ]]; then
783
+ nixErrorLog "the symlink $path is reflexive";
784
+ numReflexiveSymlinks+=1;
785
+ else
786
+ if [[ ! -e $symlinkTarget ]]; then
787
+ nixErrorLog "the symlink $path points to a missing target: $symlinkTarget";
788
+ numDanglingSymlinks+=1;
789
+ else
790
+ nixDebugLog "the symlink $path is irreflexive and points to a target which exists";
791
+ fi;
792
+ fi;
793
+ done < <(find "$output" -type l -print0);
794
+ if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0 || numUnreadableSymlinks > 0)); then
795
+ nixErrorLog "found $numDanglingSymlinks dangling symlinks, $numReflexiveSymlinks reflexive symlinks and $numUnreadableSymlinks unreadable symlinks";
796
+ exit 1;
797
+ fi;
798
+ return 0
799
+ }
800
+ _updateSourceDateEpochFromSourceRoot ()
801
+ {
802
+
803
+ if [ -n "$sourceRoot" ]; then
804
+ updateSourceDateEpoch "$sourceRoot";
805
+ fi
806
+ }
807
+ patchShebangsAuto ()
808
+ {
809
+
810
+ if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then
811
+ if [[ "$output" != out && "$output" = "$outputDev" ]]; then
812
+ patchShebangs --build "$prefix";
813
+ else
814
+ patchShebangs --host "$prefix";
815
+ fi;
816
+ fi
817
+ }
818
+ printWords ()
819
+ {
820
+
821
+ (( "$#" > 0 )) || return 0;
822
+ printf '%s ' "$@"
823
+ }
824
+ runOneHook ()
825
+ {
826
+
827
+ local hookName="$1";
828
+ shift;
829
+ local hooksSlice="${hookName%Hook}Hooks[@]";
830
+ local hook ret=1;
831
+ for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"};
832
+ do
833
+ _logHook "$hookName" "$hook" "$@";
834
+ if _eval "$hook" "$@"; then
835
+ ret=0;
836
+ break;
837
+ fi;
838
+ done;
839
+ return "$ret"
840
+ }
841
+ _activatePkgs ()
842
+ {
843
+
844
+ local hostOffset targetOffset;
845
+ local pkg;
846
+ for hostOffset in "${allPlatOffsets[@]}";
847
+ do
848
+ local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}";
849
+ for targetOffset in "${allPlatOffsets[@]}";
850
+ do
851
+ (( hostOffset <= targetOffset )) || continue;
852
+ local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]";
853
+ local pkgsSlice="${!pkgsRef}[@]";
854
+ for pkg in ${!pkgsSlice+"${!pkgsSlice}"};
855
+ do
856
+ activatePackage "$pkg" "$hostOffset" "$targetOffset";
857
+ done;
858
+ done;
859
+ done
860
+ }
861
+ addEnvHooks ()
862
+ {
863
+
864
+ local depHostOffset="$1";
865
+ shift;
866
+ local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]";
867
+ local pkgHookVar;
868
+ for pkgHookVar in "${!pkgHookVarsSlice}";
869
+ do
870
+ eval "${pkgHookVar}s"'+=("$@")';
871
+ done
872
+ }
873
+ addToSearchPathWithCustomDelimiter ()
874
+ {
875
+
876
+ local delimiter="$1";
877
+ local varName="$2";
878
+ local dir="$3";
879
+ if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then
880
+ export "${varName}=${!varName:+${!varName}${delimiter}}${dir}";
881
+ fi
882
+ }
883
+ distPhase ()
884
+ {
885
+
886
+ runHook preDist;
887
+ local flagsArray=();
888
+ concatTo flagsArray distFlags distFlagsArray distTarget=dist;
889
+ echo 'dist flags: %q' "${flagsArray[@]}";
890
+ make ${makefile:+-f $makefile} "${flagsArray[@]}";
891
+ if [ "${dontCopyDist:-0}" != 1 ]; then
892
+ mkdir -p "$out/tarballs";
893
+ cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs";
894
+ fi;
895
+ runHook postDist
896
+ }
897
+ isELF ()
898
+ {
899
+
900
+ local fn="$1";
901
+ local fd;
902
+ local magic;
903
+ exec {fd}< "$fn";
904
+ LANG=C read -r -n 4 -u "$fd" magic;
905
+ exec {fd}>&-;
906
+ if [ "$magic" = 'ELF' ]; then
907
+ return 0;
908
+ else
909
+ return 1;
910
+ fi
911
+ }
912
+ printLines ()
913
+ {
914
+
915
+ (( "$#" > 0 )) || return 0;
916
+ printf '%s\n' "$@"
917
+ }
918
+ showPhaseFooter ()
919
+ {
920
+
921
+ local phase="$1";
922
+ local startTime="$2";
923
+ local endTime="$3";
924
+ local delta=$(( endTime - startTime ));
925
+ (( delta < 30 )) && return;
926
+ local H=$((delta/3600));
927
+ local M=$((delta%3600/60));
928
+ local S=$((delta%60));
929
+ echo -n "$phase completed in ";
930
+ (( H > 0 )) && echo -n "$H hours ";
931
+ (( M > 0 )) && echo -n "$M minutes ";
932
+ echo "$S seconds"
933
+ }
934
+ addToSearchPath ()
935
+ {
936
+
937
+ addToSearchPathWithCustomDelimiter ":" "$@"
938
+ }
939
+ ccWrapper_addCVars ()
940
+ {
941
+
942
+ local role_post;
943
+ getHostRoleEnvHook;
944
+ local found=;
945
+ if [ -d "$1/include" ]; then
946
+ export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include";
947
+ found=1;
948
+ fi;
949
+ if [ -d "$1/Library/Frameworks" ]; then
950
+ export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks";
951
+ found=1;
952
+ fi;
953
+ if [[ -n "" && -n ${NIX_STORE:-} && -n $found ]]; then
954
+ local scrubbed="$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${1#"$NIX_STORE"/*-}";
955
+ export NIX_CFLAGS_COMPILE${role_post}+=" -fmacro-prefix-map=$1=$scrubbed";
956
+ fi
957
+ }
958
+ fixLibtool ()
959
+ {
960
+
961
+ local search_path;
962
+ for flag in $NIX_LDFLAGS;
963
+ do
964
+ case $flag in
965
+ -L*)
966
+ search_path+=" ${flag#-L}"
967
+ ;;
968
+ esac;
969
+ done;
970
+ sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^'
971
+ }
972
+ getRole ()
973
+ {
974
+
975
+ case $1 in
976
+ -1)
977
+ role_post='_FOR_BUILD'
978
+ ;;
979
+ 0)
980
+ role_post=''
981
+ ;;
982
+ 1)
983
+ role_post='_FOR_TARGET'
984
+ ;;
985
+ *)
986
+ echo "binutils-wrapper-2.44: used as improper sort of dependency" 1>&2;
987
+ return 1
988
+ ;;
989
+ esac
990
+ }
991
+ nixTalkativeLog ()
992
+ {
993
+
994
+ _nixLogWithLevel 4 "$*"
995
+ }
996
+ nixWarnLog ()
997
+ {
998
+
999
+ _nixLogWithLevel 1 "$*"
1000
+ }
1001
+ _logHook ()
1002
+ {
1003
+
1004
+ if [[ -z ${NIX_LOG_FD-} ]]; then
1005
+ return;
1006
+ fi;
1007
+ local hookKind="$1";
1008
+ local hookExpr="$2";
1009
+ shift 2;
1010
+ if declare -F "$hookExpr" > /dev/null 2>&1; then
1011
+ nixTalkativeLog "calling '$hookKind' function hook '$hookExpr'" "$@";
1012
+ else
1013
+ if type -p "$hookExpr" > /dev/null; then
1014
+ nixTalkativeLog "sourcing '$hookKind' script hook '$hookExpr'";
1015
+ else
1016
+ if [[ "$hookExpr" != "_callImplicitHook"* ]]; then
1017
+ local exprToOutput;
1018
+ if [[ ${NIX_DEBUG:-0} -ge 5 ]]; then
1019
+ exprToOutput="$hookExpr";
1020
+ else
1021
+ local hookExprLine;
1022
+ while IFS= read -r hookExprLine; do
1023
+ hookExprLine="${hookExprLine#"${hookExprLine%%[![:space:]]*}"}";
1024
+ if [[ -n "$hookExprLine" ]]; then
1025
+ exprToOutput+="$hookExprLine\\n ";
1026
+ fi;
1027
+ done <<< "$hookExpr";
1028
+ exprToOutput="${exprToOutput%%\\n }";
1029
+ fi;
1030
+ nixTalkativeLog "evaling '$hookKind' string hook '$exprToOutput'";
1031
+ fi;
1032
+ fi;
1033
+ fi
1034
+ }
1035
+ showPhaseHeader ()
1036
+ {
1037
+
1038
+ local phase="$1";
1039
+ echo "Running phase: $phase";
1040
+ if [[ -z ${NIX_LOG_FD-} ]]; then
1041
+ return;
1042
+ fi;
1043
+ printf "@nix { \"action\": \"setPhase\", \"phase\": \"%s\" }\n" "$phase" >&"$NIX_LOG_FD"
1044
+ }
1045
+ stripDirs ()
1046
+ {
1047
+
1048
+ local cmd="$1";
1049
+ local ranlibCmd="$2";
1050
+ local paths="$3";
1051
+ local stripFlags="$4";
1052
+ local excludeFlags=();
1053
+ local pathsNew=;
1054
+ [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1;
1055
+ [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1;
1056
+ local pattern;
1057
+ if [ -n "${stripExclude:-}" ]; then
1058
+ for pattern in "${stripExclude[@]}";
1059
+ do
1060
+ excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')');
1061
+ done;
1062
+ fi;
1063
+ local p;
1064
+ for p in ${paths};
1065
+ do
1066
+ if [ -e "$prefix/$p" ]; then
1067
+ pathsNew="${pathsNew} $prefix/$p";
1068
+ fi;
1069
+ done;
1070
+ paths=${pathsNew};
1071
+ if [ -n "${paths}" ]; then
1072
+ echo "stripping (with command $cmd and flags $stripFlags) in $paths";
1073
+ local striperr;
1074
+ striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')";
1075
+ 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=$?;
1076
+ [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 );
1077
+ rm "$striperr";
1078
+ find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null;
1079
+ fi
1080
+ }
1081
+ substituteStream ()
1082
+ {
1083
+
1084
+ local var=$1;
1085
+ local description=$2;
1086
+ shift 2;
1087
+ while (( "$#" )); do
1088
+ local replace_mode="$1";
1089
+ case "$1" in
1090
+ --replace)
1091
+ if ! "$_substituteStream_has_warned_replace_deprecation"; then
1092
+ echo "substituteStream() in derivation $name: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2;
1093
+ _substituteStream_has_warned_replace_deprecation=true;
1094
+ fi;
1095
+ replace_mode='--replace-warn'
1096
+ ;&
1097
+ --replace-quiet | --replace-warn | --replace-fail)
1098
+ pattern="$2";
1099
+ replacement="$3";
1100
+ shift 3;
1101
+ if ! [[ "${!var}" == *"$pattern"* ]]; then
1102
+ if [ "$replace_mode" == --replace-warn ]; then
1103
+ printf "substituteStream() in derivation $name: WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2;
1104
+ else
1105
+ if [ "$replace_mode" == --replace-fail ]; then
1106
+ printf "substituteStream() in derivation $name: ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2;
1107
+ return 1;
1108
+ fi;
1109
+ fi;
1110
+ fi;
1111
+ eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'
1112
+ ;;
1113
+ --subst-var)
1114
+ local varName="$2";
1115
+ shift 2;
1116
+ if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then
1117
+ echo "substituteStream() in derivation $name: ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2;
1118
+ return 1;
1119
+ fi;
1120
+ if [ -z ${!varName+x} ]; then
1121
+ echo "substituteStream() in derivation $name: ERROR: variable \$$varName is unset" 1>&2;
1122
+ return 1;
1123
+ fi;
1124
+ pattern="@$varName@";
1125
+ replacement="${!varName}";
1126
+ eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'
1127
+ ;;
1128
+ --subst-var-by)
1129
+ pattern="@$2@";
1130
+ replacement="$3";
1131
+ eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}';
1132
+ shift 3
1133
+ ;;
1134
+ *)
1135
+ echo "substituteStream() in derivation $name: ERROR: Invalid command line argument: $1" 1>&2;
1136
+ return 1
1137
+ ;;
1138
+ esac;
1139
+ done;
1140
+ printf "%s" "${!var}"
1141
+ }
1142
+ patchShebangs ()
1143
+ {
1144
+
1145
+ local pathName;
1146
+ local update=false;
1147
+ while [[ $# -gt 0 ]]; do
1148
+ case "$1" in
1149
+ --host)
1150
+ pathName=HOST_PATH;
1151
+ shift
1152
+ ;;
1153
+ --build)
1154
+ pathName=PATH;
1155
+ shift
1156
+ ;;
1157
+ --update)
1158
+ update=true;
1159
+ shift
1160
+ ;;
1161
+ --)
1162
+ shift;
1163
+ break
1164
+ ;;
1165
+ -* | --*)
1166
+ echo "Unknown option $1 supplied to patchShebangs" 1>&2;
1167
+ return 1
1168
+ ;;
1169
+ *)
1170
+ break
1171
+ ;;
1172
+ esac;
1173
+ done;
1174
+ echo "patching script interpreter paths in $@";
1175
+ local f;
1176
+ local oldPath;
1177
+ local newPath;
1178
+ local arg0;
1179
+ local args;
1180
+ local oldInterpreterLine;
1181
+ local newInterpreterLine;
1182
+ if [[ $# -eq 0 ]]; then
1183
+ echo "No arguments supplied to patchShebangs" 1>&2;
1184
+ return 0;
1185
+ fi;
1186
+ local f;
1187
+ while IFS= read -r -d '' f; do
1188
+ isScript "$f" || continue;
1189
+ read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ];
1190
+ read -r oldPath arg0 args <<< "${oldInterpreterLine:2}";
1191
+ if [[ -z "${pathName:-}" ]]; then
1192
+ if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then
1193
+ pathName=HOST_PATH;
1194
+ else
1195
+ pathName=PATH;
1196
+ fi;
1197
+ fi;
1198
+ if [[ "$oldPath" == *"/bin/env" ]]; then
1199
+ if [[ $arg0 == "-S" ]]; then
1200
+ arg0=${args%% *};
1201
+ [[ "$args" == *" "* ]] && args=${args#* } || args=;
1202
+ newPath="$(PATH="${!pathName}" type -P "env" || true)";
1203
+ args="-S $(PATH="${!pathName}" type -P "$arg0" || true) $args";
1204
+ else
1205
+ if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then
1206
+ echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2;
1207
+ exit 1;
1208
+ else
1209
+ newPath="$(PATH="${!pathName}" type -P "$arg0" || true)";
1210
+ fi;
1211
+ fi;
1212
+ else
1213
+ if [[ -z $oldPath ]]; then
1214
+ oldPath="/bin/sh";
1215
+ fi;
1216
+ newPath="$(PATH="${!pathName}" type -P "$(basename "$oldPath")" || true)";
1217
+ args="$arg0 $args";
1218
+ fi;
1219
+ newInterpreterLine="$newPath $args";
1220
+ newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}};
1221
+ if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then
1222
+ if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then
1223
+ echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\"";
1224
+ escapedInterpreterLine=${newInterpreterLine//\\/\\\\};
1225
+ timestamp=$(stat --printf "%y" "$f");
1226
+ tmpFile=$(mktemp -t patchShebangs.XXXXXXXXXX);
1227
+ sed -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" > "$tmpFile";
1228
+ local restoreReadOnly;
1229
+ if [[ ! -w "$f" ]]; then
1230
+ chmod +w "$f";
1231
+ restoreReadOnly=true;
1232
+ fi;
1233
+ cat "$tmpFile" > "$f";
1234
+ rm "$tmpFile";
1235
+ if [[ -n "${restoreReadOnly:-}" ]]; then
1236
+ chmod -w "$f";
1237
+ fi;
1238
+ touch --date "$timestamp" "$f";
1239
+ fi;
1240
+ fi;
1241
+ done < <(find "$@" -type f -perm -0100 -print0)
1242
+ }
1243
+ appendToVar ()
1244
+ {
1245
+
1246
+ local -n nameref="$1";
1247
+ local useArray type;
1248
+ if [ -n "$__structuredAttrs" ]; then
1249
+ useArray=true;
1250
+ else
1251
+ useArray=false;
1252
+ fi;
1253
+ if type=$(declare -p "$1" 2> /dev/null); then
1254
+ case "${type#* }" in
1255
+ -A*)
1256
+ echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2;
1257
+ return 1
1258
+ ;;
1259
+ -a*)
1260
+ useArray=true
1261
+ ;;
1262
+ *)
1263
+ useArray=false
1264
+ ;;
1265
+ esac;
1266
+ fi;
1267
+ shift;
1268
+ if $useArray; then
1269
+ nameref=(${nameref+"${nameref[@]}"} "$@");
1270
+ else
1271
+ nameref="${nameref-} $*";
1272
+ fi
1273
+ }
1274
+ unpackPhase ()
1275
+ {
1276
+
1277
+ runHook preUnpack;
1278
+ if [ -z "${srcs:-}" ]; then
1279
+ if [ -z "${src:-}" ]; then
1280
+ echo 'variable $src or $srcs should point to the source';
1281
+ exit 1;
1282
+ fi;
1283
+ srcs="$src";
1284
+ fi;
1285
+ local -a srcsArray;
1286
+ concatTo srcsArray srcs;
1287
+ local dirsBefore="";
1288
+ for i in *;
1289
+ do
1290
+ if [ -d "$i" ]; then
1291
+ dirsBefore="$dirsBefore $i ";
1292
+ fi;
1293
+ done;
1294
+ for i in "${srcsArray[@]}";
1295
+ do
1296
+ unpackFile "$i";
1297
+ done;
1298
+ : "${sourceRoot=}";
1299
+ if [ -n "${setSourceRoot:-}" ]; then
1300
+ runOneHook setSourceRoot;
1301
+ else
1302
+ if [ -z "$sourceRoot" ]; then
1303
+ for i in *;
1304
+ do
1305
+ if [ -d "$i" ]; then
1306
+ case $dirsBefore in
1307
+ *\ $i\ *)
1308
+
1309
+ ;;
1310
+ *)
1311
+ if [ -n "$sourceRoot" ]; then
1312
+ echo "unpacker produced multiple directories";
1313
+ exit 1;
1314
+ fi;
1315
+ sourceRoot="$i"
1316
+ ;;
1317
+ esac;
1318
+ fi;
1319
+ done;
1320
+ fi;
1321
+ fi;
1322
+ if [ -z "$sourceRoot" ]; then
1323
+ echo "unpacker appears to have produced no directories";
1324
+ exit 1;
1325
+ fi;
1326
+ echo "source root is $sourceRoot";
1327
+ if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then
1328
+ chmod -R u+w -- "$sourceRoot";
1329
+ fi;
1330
+ runHook postUnpack
1331
+ }
1332
+ updateSourceDateEpoch ()
1333
+ {
1334
+
1335
+ local path="$1";
1336
+ [[ $path == -* ]] && path="./$path";
1337
+ 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));
1338
+ local time="${res[0]//\.[0-9]*/}";
1339
+ local newestFile="${res[1]}";
1340
+ if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then
1341
+ echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile";
1342
+ export SOURCE_DATE_EPOCH="$time";
1343
+ local now="$(date +%s)";
1344
+ if [ "$time" -gt $((now - 60)) ]; then
1345
+ echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic";
1346
+ fi;
1347
+ fi
1348
+ }
1349
+ _addRpathPrefix ()
1350
+ {
1351
+
1352
+ if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then
1353
+ export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}";
1354
+ fi
1355
+ }
1356
+ _multioutConfig ()
1357
+ {
1358
+
1359
+ if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then
1360
+ return;
1361
+ fi;
1362
+ if [ -z "${shareDocName:-}" ]; then
1363
+ local confScript="${configureScript:-}";
1364
+ if [ -z "$confScript" ] && [ -x ./configure ]; then
1365
+ confScript=./configure;
1366
+ fi;
1367
+ if [ -f "$confScript" ]; then
1368
+ local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")";
1369
+ fi;
1370
+ if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then
1371
+ shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')";
1372
+ fi;
1373
+ fi;
1374
+ 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;
1375
+ prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal
1376
+ }
1377
+ findInputs ()
1378
+ {
1379
+
1380
+ local -r pkg="$1";
1381
+ local -r hostOffset="$2";
1382
+ local -r targetOffset="$3";
1383
+ (( hostOffset <= targetOffset )) || exit 1;
1384
+ local varVar="${pkgAccumVarVars[hostOffset + 1]}";
1385
+ local varRef="$varVar[$((targetOffset - hostOffset))]";
1386
+ local var="${!varRef}";
1387
+ unset -v varVar varRef;
1388
+ local varSlice="$var[*]";
1389
+ case " ${!varSlice-} " in
1390
+ *" $pkg "*)
1391
+ return 0
1392
+ ;;
1393
+ esac;
1394
+ unset -v varSlice;
1395
+ eval "$var"'+=("$pkg")';
1396
+ if ! [ -e "$pkg" ]; then
1397
+ echo "build input $pkg does not exist" 1>&2;
1398
+ exit 1;
1399
+ fi;
1400
+ function mapOffset ()
1401
+ {
1402
+ local -r inputOffset="$1";
1403
+ local -n outputOffset="$2";
1404
+ if (( inputOffset <= 0 )); then
1405
+ outputOffset=$((inputOffset + hostOffset));
1406
+ else
1407
+ outputOffset=$((inputOffset - 1 + targetOffset));
1408
+ fi
1409
+ };
1410
+ local relHostOffset;
1411
+ for relHostOffset in "${allPlatOffsets[@]}";
1412
+ do
1413
+ local files="${propagatedDepFilesVars[relHostOffset + 1]}";
1414
+ local hostOffsetNext;
1415
+ mapOffset "$relHostOffset" hostOffsetNext;
1416
+ (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue;
1417
+ local relTargetOffset;
1418
+ for relTargetOffset in "${allPlatOffsets[@]}";
1419
+ do
1420
+ (( "$relHostOffset" <= "$relTargetOffset" )) || continue;
1421
+ local fileRef="${files}[$relTargetOffset - $relHostOffset]";
1422
+ local file="${!fileRef}";
1423
+ unset -v fileRef;
1424
+ local targetOffsetNext;
1425
+ mapOffset "$relTargetOffset" targetOffsetNext;
1426
+ (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue;
1427
+ [[ -f "$pkg/nix-support/$file" ]] || continue;
1428
+ local pkgNext;
1429
+ read -r -d '' pkgNext < "$pkg/nix-support/$file" || true;
1430
+ for pkgNext in $pkgNext;
1431
+ do
1432
+ findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext";
1433
+ done;
1434
+ done;
1435
+ done
1436
+ }
1437
+ stripHash ()
1438
+ {
1439
+
1440
+ local strippedName casematchOpt=0;
1441
+ strippedName="$(basename -- "$1")";
1442
+ shopt -q nocasematch && casematchOpt=1;
1443
+ shopt -u nocasematch;
1444
+ if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then
1445
+ echo "${strippedName:33}";
1446
+ else
1447
+ echo "$strippedName";
1448
+ fi;
1449
+ if (( casematchOpt )); then
1450
+ shopt -s nocasematch;
1451
+ fi
1452
+ }
1453
+ updateAutotoolsGnuConfigScriptsPhase ()
1454
+ {
1455
+
1456
+ if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then
1457
+ return;
1458
+ fi;
1459
+ for script in config.sub config.guess;
1460
+ do
1461
+ for f in $(find . -type f -name "$script");
1462
+ do
1463
+ echo "Updating Autotools / GNU config script to a newer upstream version: $f";
1464
+ cp -f "/nix/store/s0xj50a5awma0jwgsqws61014nxzxy19-gnu-config-2024-01-01/$script" "$f";
1465
+ done;
1466
+ done
1467
+ }
1468
+ _multioutDocs ()
1469
+ {
1470
+
1471
+ local REMOVE=REMOVE;
1472
+ moveToOutput share/info "${!outputInfo}";
1473
+ moveToOutput share/doc "${!outputDoc}";
1474
+ moveToOutput share/gtk-doc "${!outputDevdoc}";
1475
+ moveToOutput share/devhelp/books "${!outputDevdoc}";
1476
+ moveToOutput share/man "${!outputMan}";
1477
+ moveToOutput share/man/man3 "${!outputDevman}"
1478
+ }
1479
+ mapOffset ()
1480
+ {
1481
+
1482
+ local -r inputOffset="$1";
1483
+ local -n outputOffset="$2";
1484
+ if (( inputOffset <= 0 )); then
1485
+ outputOffset=$((inputOffset + hostOffset));
1486
+ else
1487
+ outputOffset=$((inputOffset - 1 + targetOffset));
1488
+ fi
1489
+ }
1490
+ recordPropagatedDependencies ()
1491
+ {
1492
+
1493
+ declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated);
1494
+ declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}");
1495
+ local propagatedInputsIndex;
1496
+ for propagatedInputsIndex in "${!flatVars[@]}";
1497
+ do
1498
+ local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]";
1499
+ local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}";
1500
+ [[ -n "${!propagatedInputsSlice}" ]] || continue;
1501
+ mkdir -p "${!outputDev}/nix-support";
1502
+ printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile";
1503
+ done
1504
+ }
1505
+ _addToEnv ()
1506
+ {
1507
+
1508
+ local depHostOffset depTargetOffset;
1509
+ local pkg;
1510
+ for depHostOffset in "${allPlatOffsets[@]}";
1511
+ do
1512
+ local hookVar="${pkgHookVarVars[depHostOffset + 1]}";
1513
+ local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}";
1514
+ for depTargetOffset in "${allPlatOffsets[@]}";
1515
+ do
1516
+ (( depHostOffset <= depTargetOffset )) || continue;
1517
+ local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]";
1518
+ if [[ -z "${strictDeps-}" ]]; then
1519
+ local visitedPkgs="";
1520
+ for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}";
1521
+ do
1522
+ if [[ "$visitedPkgs" = *"$pkg"* ]]; then
1523
+ continue;
1524
+ fi;
1525
+ runHook "${!hookRef}" "$pkg";
1526
+ visitedPkgs+=" $pkg";
1527
+ done;
1528
+ else
1529
+ local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]";
1530
+ local pkgsSlice="${!pkgsRef}[@]";
1531
+ for pkg in ${!pkgsSlice+"${!pkgsSlice}"};
1532
+ do
1533
+ runHook "${!hookRef}" "$pkg";
1534
+ done;
1535
+ fi;
1536
+ done;
1537
+ done
1538
+ }
1539
+ _moveLib64 ()
1540
+ {
1541
+
1542
+ if [ "${dontMoveLib64-}" = 1 ]; then
1543
+ return;
1544
+ fi;
1545
+ if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then
1546
+ return;
1547
+ fi;
1548
+ echo "moving $prefix/lib64/* to $prefix/lib";
1549
+ mkdir -p $prefix/lib;
1550
+ shopt -s dotglob;
1551
+ for i in $prefix/lib64/*;
1552
+ do
1553
+ mv --no-clobber "$i" $prefix/lib;
1554
+ done;
1555
+ shopt -u dotglob;
1556
+ rmdir $prefix/lib64;
1557
+ ln -s lib $prefix/lib64
1558
+ }
1559
+ printPhases ()
1560
+ {
1561
+
1562
+ definePhases;
1563
+ local phase;
1564
+ for phase in ${phases[*]};
1565
+ do
1566
+ printf '%s\n' "$phase";
1567
+ done
1568
+ }
1569
+ compressManPages ()
1570
+ {
1571
+
1572
+ local dir="$1";
1573
+ if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then
1574
+ return;
1575
+ fi;
1576
+ echo "gzipping man pages under $dir/share/man/";
1577
+ find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f;
1578
+ find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do
1579
+ local target;
1580
+ target="$(readlink -f "$f")";
1581
+ if [ -f "$target".gz ]; then
1582
+ ln -sf "$target".gz "$f".gz && rm "$f";
1583
+ fi;
1584
+ done
1585
+ }
1586
+ _defaultUnpack ()
1587
+ {
1588
+
1589
+ local fn="$1";
1590
+ local destination;
1591
+ if [ -d "$fn" ]; then
1592
+ destination="$(stripHash "$fn")";
1593
+ if [ -e "$destination" ]; then
1594
+ echo "Cannot copy $fn to $destination: destination already exists!";
1595
+ echo "Did you specify two \"srcs\" with the same \"name\"?";
1596
+ return 1;
1597
+ fi;
1598
+ cp -r --preserve=timestamps --reflink=auto -- "$fn" "$destination";
1599
+ else
1600
+ case "$fn" in
1601
+ *.tar.xz | *.tar.lzma | *.txz)
1602
+ ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn";
1603
+ true ) | tar xf - --mode=+w --warning=no-timestamp
1604
+ ;;
1605
+ *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz)
1606
+ tar xf "$fn" --mode=+w --warning=no-timestamp
1607
+ ;;
1608
+ *)
1609
+ return 1
1610
+ ;;
1611
+ esac;
1612
+ fi
1613
+ }
1614
+ getAllOutputNames ()
1615
+ {
1616
+
1617
+ if [ -n "$__structuredAttrs" ]; then
1618
+ echo "${!outputs[*]}";
1619
+ else
1620
+ echo "$outputs";
1621
+ fi
1622
+ }
1623
+ definePhases ()
1624
+ {
1625
+
1626
+ if [ -z "${phases[*]:-}" ]; then
1627
+ phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}";
1628
+ fi
1629
+ }
1630
+ genericBuild ()
1631
+ {
1632
+
1633
+ export GZIP_NO_TIMESTAMPS=1;
1634
+ if [ -f "${buildCommandPath:-}" ]; then
1635
+ source "$buildCommandPath";
1636
+ return;
1637
+ fi;
1638
+ if [ -n "${buildCommand:-}" ]; then
1639
+ eval "$buildCommand";
1640
+ return;
1641
+ fi;
1642
+ definePhases;
1643
+ for curPhase in ${phases[*]};
1644
+ do
1645
+ runPhase "$curPhase";
1646
+ done
1647
+ }
1648
+ installPhase ()
1649
+ {
1650
+
1651
+ runHook preInstall;
1652
+ if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then
1653
+ echo "no Makefile or custom installPhase, doing nothing";
1654
+ runHook postInstall;
1655
+ return;
1656
+ else
1657
+ foundMakefile=1;
1658
+ fi;
1659
+ if [ -n "$prefix" ]; then
1660
+ mkdir -p "$prefix";
1661
+ fi;
1662
+ local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
1663
+ concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install;
1664
+ echoCmd 'install flags' "${flagsArray[@]}";
1665
+ make ${makefile:+-f $makefile} "${flagsArray[@]}";
1666
+ unset flagsArray;
1667
+ runHook postInstall
1668
+ }
1669
+ _pruneLibtoolFiles ()
1670
+ {
1671
+
1672
+ if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then
1673
+ return;
1674
+ fi;
1675
+ 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" \;
1676
+ }
1677
+ bintoolsWrapper_addLDVars ()
1678
+ {
1679
+
1680
+ local role_post;
1681
+ getHostRoleEnvHook;
1682
+ if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then
1683
+ export NIX_LDFLAGS${role_post}+=" -L$1/lib64";
1684
+ fi;
1685
+ if [[ -d "$1/lib" ]]; then
1686
+ local -a glob=($1/lib/lib*);
1687
+ if [ "${#glob[*]}" -gt 0 ]; then
1688
+ export NIX_LDFLAGS${role_post}+=" -L$1/lib";
1689
+ fi;
1690
+ fi
1691
+ }
1692
+ runPhase ()
1693
+ {
1694
+
1695
+ local curPhase="$*";
1696
+ if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then
1697
+ return;
1698
+ fi;
1699
+ if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then
1700
+ return;
1701
+ fi;
1702
+ if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then
1703
+ return;
1704
+ fi;
1705
+ if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then
1706
+ return;
1707
+ fi;
1708
+ if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then
1709
+ return;
1710
+ fi;
1711
+ if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then
1712
+ return;
1713
+ fi;
1714
+ if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then
1715
+ return;
1716
+ fi;
1717
+ if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then
1718
+ return;
1719
+ fi;
1720
+ if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then
1721
+ return;
1722
+ fi;
1723
+ showPhaseHeader "$curPhase";
1724
+ dumpVars;
1725
+ local startTime endTime;
1726
+ startTime=$(date +"%s");
1727
+ eval "${!curPhase:-$curPhase}";
1728
+ endTime=$(date +"%s");
1729
+ showPhaseFooter "$curPhase" "$startTime" "$endTime";
1730
+ if [ "$curPhase" = unpackPhase ]; then
1731
+ [ -n "${sourceRoot:-}" ] && chmod +x -- "${sourceRoot}";
1732
+ cd -- "${sourceRoot:-.}";
1733
+ fi
1734
+ }
1735
+ substituteAll ()
1736
+ {
1737
+
1738
+ local input="$1";
1739
+ local output="$2";
1740
+ local -a args=();
1741
+ _allFlags;
1742
+ substitute "$input" "$output" "${args[@]}"
1743
+ }
1744
+ substituteInPlace ()
1745
+ {
1746
+
1747
+ local -a fileNames=();
1748
+ for arg in "$@";
1749
+ do
1750
+ if [[ "$arg" = "--"* ]]; then
1751
+ break;
1752
+ fi;
1753
+ fileNames+=("$arg");
1754
+ shift;
1755
+ done;
1756
+ if ! [[ "${#fileNames[@]}" -gt 0 ]]; then
1757
+ echo "substituteInPlace called without any files to operate on (files must come before options!)" 1>&2;
1758
+ return 1;
1759
+ fi;
1760
+ for file in "${fileNames[@]}";
1761
+ do
1762
+ substitute "$file" "$file" "$@";
1763
+ done
1764
+ }
1765
+ addNodePath ()
1766
+ {
1767
+
1768
+ addToSearchPath NODE_PATH "$1/lib/node_modules"
1769
+ }
1770
+ _overrideFirst ()
1771
+ {
1772
+
1773
+ if [ -z "${!1-}" ]; then
1774
+ _assignFirst "$@";
1775
+ fi
1776
+ }
1777
+ prependToVar ()
1778
+ {
1779
+
1780
+ local -n nameref="$1";
1781
+ local useArray type;
1782
+ if [ -n "$__structuredAttrs" ]; then
1783
+ useArray=true;
1784
+ else
1785
+ useArray=false;
1786
+ fi;
1787
+ if type=$(declare -p "$1" 2> /dev/null); then
1788
+ case "${type#* }" in
1789
+ -A*)
1790
+ echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2;
1791
+ return 1
1792
+ ;;
1793
+ -a*)
1794
+ useArray=true
1795
+ ;;
1796
+ *)
1797
+ useArray=false
1798
+ ;;
1799
+ esac;
1800
+ fi;
1801
+ shift;
1802
+ if $useArray; then
1803
+ nameref=("$@" ${nameref+"${nameref[@]}"});
1804
+ else
1805
+ nameref="$* ${nameref-}";
1806
+ fi
1807
+ }
1808
+ configurePhase ()
1809
+ {
1810
+
1811
+ runHook preConfigure;
1812
+ : "${configureScript=}";
1813
+ if [[ -z "$configureScript" && -x ./configure ]]; then
1814
+ configureScript=./configure;
1815
+ fi;
1816
+ if [ -z "${dontFixLibtool:-}" ]; then
1817
+ export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}";
1818
+ local i;
1819
+ find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do
1820
+ echo "fixing libtool script $i";
1821
+ fixLibtool "$i";
1822
+ done;
1823
+ CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX);
1824
+ 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" {} \;;
1825
+ rm -f "$CONFIGURE_MTIME_REFERENCE";
1826
+ fi;
1827
+ if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then
1828
+ local -r prefixKeyOrDefault="${prefixKey:---prefix=}";
1829
+ if [ "${prefixKeyOrDefault: -1}" = " " ]; then
1830
+ prependToVar configureFlags "$prefix";
1831
+ prependToVar configureFlags "${prefixKeyOrDefault::-1}";
1832
+ else
1833
+ prependToVar configureFlags "$prefixKeyOrDefault$prefix";
1834
+ fi;
1835
+ fi;
1836
+ if [[ -f "$configureScript" ]]; then
1837
+ if [ -z "${dontAddDisableDepTrack:-}" ]; then
1838
+ if grep -q dependency-tracking "$configureScript"; then
1839
+ prependToVar configureFlags --disable-dependency-tracking;
1840
+ fi;
1841
+ fi;
1842
+ if [ -z "${dontDisableStatic:-}" ]; then
1843
+ if grep -q enable-static "$configureScript"; then
1844
+ prependToVar configureFlags --disable-static;
1845
+ fi;
1846
+ fi;
1847
+ if [ -z "${dontPatchShebangsInConfigure:-}" ]; then
1848
+ patchShebangs --build "$configureScript";
1849
+ fi;
1850
+ fi;
1851
+ if [ -n "$configureScript" ]; then
1852
+ local -a flagsArray;
1853
+ concatTo flagsArray configureFlags configureFlagsArray;
1854
+ echoCmd 'configure flags' "${flagsArray[@]}";
1855
+ $configureScript "${flagsArray[@]}";
1856
+ unset flagsArray;
1857
+ else
1858
+ echo "no configure script, doing nothing";
1859
+ fi;
1860
+ runHook postConfigure
1861
+ }
1862
+ _moveSbin ()
1863
+ {
1864
+
1865
+ if [ "${dontMoveSbin-}" = 1 ]; then
1866
+ return;
1867
+ fi;
1868
+ if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then
1869
+ return;
1870
+ fi;
1871
+ echo "moving $prefix/sbin/* to $prefix/bin";
1872
+ mkdir -p $prefix/bin;
1873
+ shopt -s dotglob;
1874
+ for i in $prefix/sbin/*;
1875
+ do
1876
+ mv "$i" $prefix/bin;
1877
+ done;
1878
+ shopt -u dotglob;
1879
+ rmdir $prefix/sbin;
1880
+ ln -s bin $prefix/sbin
1881
+ }
1882
+ _allFlags ()
1883
+ {
1884
+
1885
+ export system pname name version;
1886
+ while IFS='' read -r varName; do
1887
+ nixTalkativeLog "@${varName}@ -> ${!varName}";
1888
+ args+=("--subst-var" "$varName");
1889
+ done < <(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }')
1890
+ }
1891
+ consumeEntire ()
1892
+ {
1893
+
1894
+ if IFS='' read -r -d '' "$1"; then
1895
+ echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2;
1896
+ return 1;
1897
+ fi
1898
+ }
1899
+ getTargetRole ()
1900
+ {
1901
+
1902
+ getRole "$targetOffset"
1903
+ }
1904
+ getHostRole ()
1905
+ {
1906
+
1907
+ getRole "$hostOffset"
1908
+ }
1909
+ _multioutDevs ()
1910
+ {
1911
+
1912
+ if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then
1913
+ return;
1914
+ fi;
1915
+ moveToOutput include "${!outputInclude}";
1916
+ moveToOutput lib/pkgconfig "${!outputDev}";
1917
+ moveToOutput share/pkgconfig "${!outputDev}";
1918
+ moveToOutput lib/cmake "${!outputDev}";
1919
+ moveToOutput share/aclocal "${!outputDev}";
1920
+ for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc;
1921
+ do
1922
+ echo "Patching '$f' includedir to output ${!outputInclude}";
1923
+ sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f";
1924
+ done
1925
+ }
1926
+ _multioutPropagateDev ()
1927
+ {
1928
+
1929
+ if [ "$(getAllOutputNames)" = "out" ]; then
1930
+ return;
1931
+ fi;
1932
+ local outputFirst;
1933
+ for outputFirst in $(getAllOutputNames);
1934
+ do
1935
+ break;
1936
+ done;
1937
+ local propagaterOutput="$outputDev";
1938
+ if [ -z "$propagaterOutput" ]; then
1939
+ propagaterOutput="$outputFirst";
1940
+ fi;
1941
+ if [ -z "${propagatedBuildOutputs+1}" ]; then
1942
+ local po_dirty="$outputBin $outputInclude $outputLib";
1943
+ set +o pipefail;
1944
+ propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `;
1945
+ set -o pipefail;
1946
+ fi;
1947
+ if [ -z "$propagatedBuildOutputs" ]; then
1948
+ return;
1949
+ fi;
1950
+ mkdir -p "${!propagaterOutput}"/nix-support;
1951
+ for output in $propagatedBuildOutputs;
1952
+ do
1953
+ echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs;
1954
+ done
1955
+ }
1956
+ concatTo ()
1957
+ {
1958
+
1959
+ local -;
1960
+ set -o noglob;
1961
+ local -n targetref="$1";
1962
+ shift;
1963
+ local arg default name type;
1964
+ for arg in "$@";
1965
+ do
1966
+ IFS="=" read -r name default <<< "$arg";
1967
+ local -n nameref="$name";
1968
+ if [[ -z "${nameref[*]}" && -n "$default" ]]; then
1969
+ targetref+=("$default");
1970
+ else
1971
+ if type=$(declare -p "$name" 2> /dev/null); then
1972
+ case "${type#* }" in
1973
+ -A*)
1974
+ echo "concatTo(): ERROR: trying to use concatTo on an associative array." 1>&2;
1975
+ return 1
1976
+ ;;
1977
+ -a*)
1978
+ targetref+=("${nameref[@]}")
1979
+ ;;
1980
+ *)
1981
+ if [[ "$name" = *"Array" ]]; then
1982
+ nixErrorLog "concatTo(): $name is not declared as array, treating as a singleton. This will become an error in future";
1983
+ targetref+=(${nameref+"${nameref[@]}"});
1984
+ else
1985
+ targetref+=(${nameref-});
1986
+ fi
1987
+ ;;
1988
+ esac;
1989
+ fi;
1990
+ fi;
1991
+ done
1992
+ }
1993
+ _eval ()
1994
+ {
1995
+
1996
+ if declare -F "$1" > /dev/null 2>&1; then
1997
+ "$@";
1998
+ else
1999
+ eval "$1";
2000
+ fi
2001
+ }
2002
+ isMachO ()
2003
+ {
2004
+
2005
+ local fn="$1";
2006
+ local fd;
2007
+ local magic;
2008
+ exec {fd}< "$fn";
2009
+ LANG=C read -r -n 4 -u "$fd" magic;
2010
+ exec {fd}>&-;
2011
+ if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then
2012
+ return 0;
2013
+ else
2014
+ if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then
2015
+ return 0;
2016
+ else
2017
+ if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then
2018
+ return 0;
2019
+ else
2020
+ return 1;
2021
+ fi;
2022
+ fi;
2023
+ fi
2024
+ }
2025
+ nixInfoLog ()
2026
+ {
2027
+
2028
+ _nixLogWithLevel 3 "$*"
2029
+ }
2030
+ dumpVars ()
2031
+ {
2032
+
2033
+ if [[ "${noDumpEnvVars:-0}" != 1 && -d "$NIX_BUILD_TOP" ]]; then
2034
+ local old_umask;
2035
+ old_umask=$(umask);
2036
+ umask 0077;
2037
+ export 2> /dev/null > "$NIX_BUILD_TOP/env-vars";
2038
+ umask "$old_umask";
2039
+ fi
2040
+ }
2041
+ isScript ()
2042
+ {
2043
+
2044
+ local fn="$1";
2045
+ local fd;
2046
+ local magic;
2047
+ exec {fd}< "$fn";
2048
+ LANG=C read -r -n 2 -u "$fd" magic;
2049
+ exec {fd}>&-;
2050
+ if [[ "$magic" =~ \#! ]]; then
2051
+ return 0;
2052
+ else
2053
+ return 1;
2054
+ fi
2055
+ }
2056
+ installCheckPhase ()
2057
+ {
2058
+
2059
+ runHook preInstallCheck;
2060
+ if [[ -z "${foundMakefile:-}" ]]; then
2061
+ echo "no Makefile or custom installCheckPhase, doing nothing";
2062
+ else
2063
+ if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then
2064
+ echo "no installcheck target in ${makefile:-Makefile}, doing nothing";
2065
+ else
2066
+ local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
2067
+ concatTo flagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray installCheckTarget=installcheck;
2068
+ echoCmd 'installcheck flags' "${flagsArray[@]}";
2069
+ make ${makefile:+-f $makefile} "${flagsArray[@]}";
2070
+ unset flagsArray;
2071
+ fi;
2072
+ fi;
2073
+ runHook postInstallCheck
2074
+ }
2075
+ moveToOutput ()
2076
+ {
2077
+
2078
+ local patt="$1";
2079
+ local dstOut="$2";
2080
+ local output;
2081
+ for output in $(getAllOutputNames);
2082
+ do
2083
+ if [ "${!output}" = "$dstOut" ]; then
2084
+ continue;
2085
+ fi;
2086
+ local srcPath;
2087
+ for srcPath in "${!output}"/$patt;
2088
+ do
2089
+ if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then
2090
+ continue;
2091
+ fi;
2092
+ if [ "$dstOut" = REMOVE ]; then
2093
+ echo "Removing $srcPath";
2094
+ rm -r "$srcPath";
2095
+ else
2096
+ local dstPath="$dstOut${srcPath#${!output}}";
2097
+ echo "Moving $srcPath to $dstPath";
2098
+ if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then
2099
+ rmdir "$srcPath" --ignore-fail-on-non-empty;
2100
+ if [ -d "$srcPath" ]; then
2101
+ mv -t "$dstPath" "$srcPath"/*;
2102
+ rmdir "$srcPath";
2103
+ fi;
2104
+ else
2105
+ mkdir -p "$(readlink -m "$dstPath/..")";
2106
+ mv "$srcPath" "$dstPath";
2107
+ fi;
2108
+ fi;
2109
+ local srcParent="$(readlink -m "$srcPath/..")";
2110
+ if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then
2111
+ echo "Removing empty $srcParent/ and (possibly) its parents";
2112
+ rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true;
2113
+ fi;
2114
+ done;
2115
+ done
2116
+ }
2117
+ nixLog ()
2118
+ {
2119
+
2120
+ [[ -z ${NIX_LOG_FD-} ]] && return 0;
2121
+ local callerName="${FUNCNAME[1]}";
2122
+ if [[ $callerName == "_callImplicitHook" ]]; then
2123
+ callerName="${hookName:?}";
2124
+ fi;
2125
+ printf "%s: %s\n" "$callerName" "$*" >&"$NIX_LOG_FD"
2126
+ }
2127
+ buildPhase ()
2128
+ {
2129
+
2130
+ runHook preBuild;
2131
+ if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then
2132
+ echo "no Makefile or custom buildPhase, doing nothing";
2133
+ else
2134
+ foundMakefile=1;
2135
+ local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL="$SHELL");
2136
+ concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray;
2137
+ echoCmd 'build flags' "${flagsArray[@]}";
2138
+ make ${makefile:+-f $makefile} "${flagsArray[@]}";
2139
+ unset flagsArray;
2140
+ fi;
2141
+ runHook postBuild
2142
+ }
2143
+ getTargetRoleWrapper ()
2144
+ {
2145
+
2146
+ case $targetOffset in
2147
+ -1)
2148
+ export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1
2149
+ ;;
2150
+ 0)
2151
+ export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1
2152
+ ;;
2153
+ 1)
2154
+ export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1
2155
+ ;;
2156
+ *)
2157
+ echo "binutils-wrapper-2.44: used as improper sort of dependency" 1>&2;
2158
+ return 1
2159
+ ;;
2160
+ esac
2161
+ }
2162
+ patchELF ()
2163
+ {
2164
+
2165
+ local dir="$1";
2166
+ [ -e "$dir" ] || return 0;
2167
+ echo "shrinking RPATHs of ELF executables and libraries in $dir";
2168
+ local i;
2169
+ while IFS= read -r -d '' i; do
2170
+ if [[ "$i" =~ .build-id ]]; then
2171
+ continue;
2172
+ fi;
2173
+ if ! isELF "$i"; then
2174
+ continue;
2175
+ fi;
2176
+ echo "shrinking $i";
2177
+ patchelf --shrink-rpath "$i" || true;
2178
+ done < <(find "$dir" -type f -print0)
2179
+ }
2180
+ runHook ()
2181
+ {
2182
+
2183
+ local hookName="$1";
2184
+ shift;
2185
+ local hooksSlice="${hookName%Hook}Hooks[@]";
2186
+ local hook;
2187
+ for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"};
2188
+ do
2189
+ _logHook "$hookName" "$hook" "$@";
2190
+ _eval "$hook" "$@";
2191
+ done;
2192
+ return 0
2193
+ }
2194
+ _moveSystemdUserUnits ()
2195
+ {
2196
+
2197
+ if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then
2198
+ return;
2199
+ fi;
2200
+ if [ ! -e "${prefix:?}/lib/systemd/user" ]; then
2201
+ return;
2202
+ fi;
2203
+ local source="$prefix/lib/systemd/user";
2204
+ local target="$prefix/share/systemd/user";
2205
+ echo "moving $source/* to $target";
2206
+ mkdir -p "$target";
2207
+ ( shopt -s dotglob;
2208
+ for i in "$source"/*;
2209
+ do
2210
+ mv "$i" "$target";
2211
+ done );
2212
+ rmdir "$source";
2213
+ ln -s "$target" "$source"
2214
+ }
2215
+ _doStrip ()
2216
+ {
2217
+
2218
+ local -ra flags=(dontStripHost dontStripTarget);
2219
+ local -ra debugDirs=(stripDebugList stripDebugListTarget);
2220
+ local -ra allDirs=(stripAllList stripAllListTarget);
2221
+ local -ra stripCmds=(STRIP STRIP_FOR_TARGET);
2222
+ local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET);
2223
+ stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin Applications Library/Frameworks};
2224
+ stripDebugListTarget=${stripDebugListTarget[*]:-};
2225
+ stripAllList=${stripAllList[*]:-};
2226
+ stripAllListTarget=${stripAllListTarget[*]:-};
2227
+ local i;
2228
+ for i in ${!stripCmds[@]};
2229
+ do
2230
+ local -n flag="${flags[$i]}";
2231
+ local -n debugDirList="${debugDirs[$i]}";
2232
+ local -n allDirList="${allDirs[$i]}";
2233
+ local -n stripCmd="${stripCmds[$i]}";
2234
+ local -n ranlibCmd="${ranlibCmds[$i]}";
2235
+ if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then
2236
+ continue;
2237
+ fi;
2238
+ stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}";
2239
+ stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}";
2240
+ done
2241
+ }
2242
+ _callImplicitHook ()
2243
+ {
2244
+
2245
+ local def="$1";
2246
+ local hookName="$2";
2247
+ if declare -F "$hookName" > /dev/null; then
2248
+ nixTalkativeLog "calling implicit '$hookName' function hook";
2249
+ "$hookName";
2250
+ else
2251
+ if type -p "$hookName" > /dev/null; then
2252
+ nixTalkativeLog "sourcing implicit '$hookName' script hook";
2253
+ source "$hookName";
2254
+ else
2255
+ if [ -n "${!hookName:-}" ]; then
2256
+ nixTalkativeLog "evaling implicit '$hookName' string hook";
2257
+ eval "${!hookName}";
2258
+ else
2259
+ return "$def";
2260
+ fi;
2261
+ fi;
2262
+ fi
2263
+ }
2264
+ PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}"
2265
+ XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}"
2266
+
2267
+ eval "${shellHook:-}"
2268
+ shopt -s expand_aliases
2269
+
2270
+ exec /tmp/devenv-envcMmWuN/script