Commit graph

292345 commits

Author SHA1 Message Date
Tobias Bergkvist df13841609
Merge branch 'bergkvist/make-c-wrapper' into make-c-wrapper 2021-12-09 13:00:24 +01:00
Jacek Galowicz 177f0a6eed make makeWrapper and makeBinaryWrapper drop-in-replaceable 2021-12-09 11:32:29 +00:00
Jacek Galowicz e7c70ce5c8 Inject gcc path into makewrapper script 2021-12-09 11:32:29 +00:00
Jacek Galowicz 2bc7345064 Add golden effects test 2021-12-09 11:32:28 +00:00
Doron Behar 32d566e1b9 wrapProgramBinary -> binaryWrapProgram 2021-12-08 18:59:38 +02:00
Jacek Galowicz f3b16a6b5d Fix typo in make-binary-wrapper 2021-12-08 10:26:17 +00:00
Tobias Bergkvist 7cf1aa102a Separate out indentation responsibility to indent4 in makeCWrapper using awk.
Generated code no longer needs to worry about its own indent level in the output.
2021-12-07 17:42:54 +01:00
Tobias Bergkvist 2b5a2d4a8e Switch to embedding input arguments instead of generated C code in binary. 2021-12-07 01:50:38 +01:00
Doron Behar 2b103ab8a1 Remove TODO in documentation 2021-12-02 10:43:47 +02:00
Tobias Bergkvist d8375fbccb Add tests for --inherit-argv0 and --chdir DIR 2021-12-02 04:03:36 +01:00
Tobias Bergkvist 64da82731d Add new argument: --chdir DIR (alternative to --run "cd DIR" in makeWrapper) 2021-12-02 03:39:25 +01:00
Tobias Bergkvist a47286f0a0 Add argument --inherit-argv0 to replace use case --argv0 '$0'. Fix wrapProgramBinary by using this new argument 2021-12-02 02:29:00 +01:00
Tobias Bergkvist e3c94f3d6b Use cc instead of gcc in makeBinaryWrapper 2021-12-02 02:07:17 +01:00
Tobias Bergkvist a1e62262bc Replace concat3 with asprintf in set_env_prefix and set_env_suffix. 2021-12-01 23:27:26 +01:00
Tobias Bergkvist 3997e9de67 Switch from malloc to calloc in addFlags 2021-12-01 23:07:30 +01:00
Tobias Bergkvist 97d62a90f5 Switch from exit(1) to abort() in assert_success 2021-12-01 22:56:18 +01:00
Tobias Bergkvist 4e55d34535 Add assertValidEnvName and check that variable name is valid during code generation. Add assert_success, and assert that setenv/unsetenv succeeds to crash if they don't 2021-12-01 22:49:20 +01:00
Tobias Bergkvist 3a014be2f2 Assert that malloc does not return a NULL pointer for better error messages + to satisfy static analysis tools. 2021-11-09 02:56:32 +01:00
Doron Behar eb048d8fe2 Rephrase makeWrapper setup-hook 2021-10-20 08:59:29 +03:00
Tobias Bergkvist a95a7a22be Switch from buildInputs to nativeBuildInpuits in makeGoldenTest 2021-10-19 18:35:42 +02:00
Tobias Bergkvist 7cca19a46a
Set strictDeps = true in makeGoldenTest
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2021-10-19 09:25:24 -07:00
Doron Behar 6517e5b10f Improve explenations for wrap*Program 2021-10-19 17:33:02 +03:00
Tobias Bergkvist 1218b82bce Move assertExecutable from makeCWrapper to makeBinaryWrapper to ensure that makeCWrapper is a pure function 2021-10-19 14:37:05 +02:00
Doron Behar ba86a1916b makeBinaryWrapper: Document 2021-10-19 05:30:42 -07:00
Doron Behar c310cb0d94 makeBinaryWrapper: add wrapProgramBinary (like wrapProgram) 2021-10-19 05:30:42 -07:00
Doron Behar a45c5db391 makeBinaryWrapper: Assert $1 is executable 2021-10-19 05:30:42 -07:00
Tobias Bergkvist 4b833cc141 EditorConfig: Switch from tabs to spaces 2021-10-04 22:38:14 +02:00
Tobias Bergkvist b7d36b8d59 Add golden tests for make-binary-wrapper.
To run tests after cloning on linux, use the following:
nix-build pkgs/top-level/release.nix -A tests.make-binary-wrapper.x86_64-linux
2021-10-04 22:35:09 +02:00
Tobias Bergkvist adef70ce7c Specify uses_prefix, uses_suffix and uses_concat3 as local vars. Make sure errors in makeCWrapper are located next to the line with the issue. 2021-10-04 14:29:22 +02:00
Tobias Bergkvist 3df841bb99 Make error messages more consistent 2021-10-01 18:57:26 +02:00
Tobias Bergkvist d930fecc3c Return an #error macro if the wrong number of arguments are supplied 2021-10-01 18:51:19 +02:00
Tobias Bergkvist ac99a6ff98 Add makeBinaryWrapper to pkgs/top-level/all-packages.nix 2021-10-01 18:19:53 +02:00
Tobias Bergkvist b62216a211 Fix shellcheck warnings. Use single quotes for printf format strings. Switch to strncpy in concat3. Use multiline strings to print C functions. Switch from if/elif to case. 2021-10-01 17:43:23 +02:00
Tobias Bergkvist b58c857bfb Switch to using strlen in concat3Fn. Make sure uses-variables are local to improve purity of makeCWrapper. Refactor 2021-08-26 14:36:30 +02:00
Tobias Bergkvist dcba4171d4 Add support for --add-flags, --prefix and --suffix 2021-08-23 23:44:57 +02:00
Tobias Bergkvist 1d64281401 Remove line at the bottom of make-binary-wrapper that executes makeBinaryWrapper "$@" 2021-06-01 01:25:22 +02:00
Tobias Bergkvist 8d2964a8e6 Rename make-c-wrapper.sh to make-binary-wrapper.sh. Refactor to match style of other setup-hooks. Add compilation step with gcc. Embed the entire generated source code into the binary for troubleshooting. 2021-06-01 01:02:08 +02:00
Tobias Bergkvist e8cedf3819 make-c-wrapper: Fix typo in generated documentation 2021-05-27 02:04:12 +02:00
Tobias Bergkvist 131ed20b2f make-c-wrapper: Remove trailing whitespace (editorconfig) 2021-05-27 01:56:23 +02:00
Tobias Bergkvist eef4fa82c1 make-c-wrapper: Fix typo in generated code documentation 2021-05-27 01:47:40 +02:00
Tobias Bergkvist de1f53b84d Add make-c-wrapper.sh for creating binary executable wrappers 2021-05-27 01:11:06 +02:00
Tobias Bergkvist 5edd17c4c2 Add bergkvist to maintainer list 2021-05-27 00:57:31 +02:00
austinbutler 2a6db4c056
stellar-core: 0.5.1 -> 17.0.0 (#123294) 2021-05-26 17:35:46 -04:00
Jörg Thalheim 7c0dacb0bd
Merge pull request #124546 from Mic92/containerd
containerd: fix checksum
2021-05-26 22:33:48 +01:00
Jörg Thalheim a635c12d1f
containerd: fix checksum 2021-05-26 23:26:12 +02:00
Ryan Mulligan 83820adde4
Merge pull request #124532 from r-ryantm/auto-update/hitori
gnome.hitori: 3.38.1 -> 3.38.2
2021-05-26 13:40:53 -07:00
Fabian Affolter 40ab718862
Merge pull request #124201 from fabaff/tests-pyppeteer
python3Packages.pyppeteer: enable tests
2021-05-26 22:24:44 +02:00
Sandro 991825eea7
Merge pull request #124530 from Ma27/fix-openldap-mig-docs
nixos/release-notes: fix `slaptest` command for openldap section
2021-05-26 22:22:33 +02:00
Trolli Schmittlauch 84aa23742f
poppler: build with nss by default for signature support (#124294)
Since 21.01, poppler supports PDF signing. As applications like okular
start to make use of that feature, nss support for poppler is enabled by
default to avoid unnecessary package duplication.
When building a `minimal` version of poppler, nss is disabled as well.

closes #120928
2021-05-26 15:57:38 -04:00
Vladimír Čunát ce2e9f9124
Merge #124110: luajit updates 2021-05-26 21:49:38 +02:00