Commit Graph

166 Commits

Author SHA1 Message Date
Robert Hensing
9fb7d91888
Merge pull request #124556 from bergkvist/bergkvist/make-c-wrapper
Generate tiny compiled binary for wrapping executables
2021-12-10 00:45:30 +01:00
Jacek Galowicz
b7e00ed89e make-binary-wrapper: Add -Wall -Werror -Wpedantic 2021-12-09 17:22:55 +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
(cdep)illabout
cfb2fd768e tests.dhall.generateDhallDirectoryPackage: init 2021-12-07 13:36:20 +09:00
Tobias Bergkvist
d8375fbccb Add tests for --inherit-argv0 and --chdir DIR 2021-12-02 04:03:36 +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
Kim Lindberger
0039b0b5a8
Merge pull request #144564 from jtojnar/php-overridable
php: Implement overrideAttrs that composes with buildEnv/withExtensions
2021-11-15 18:12:44 +01:00
Jan Tojnar
968d180452 php: Implement overrideAttrs that composes with buildEnv/withExtensions
Hopefully.

Also add a couple of tests to check that.
2021-11-14 23:05:48 +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
github-actions[bot]
e1766085b3
Merge master into haskell-updates 2021-11-09 00:10:05 +00:00
Dennis Gosnell
4d2b3b4d5a
Merge pull request #142825 from cdepillabout/buildDhallUrl
dhallPackages.buildDhallUrl: add function for easily building dhall remote imports
2021-11-08 13:44:37 +09:00
(cdep)illabout
10c5a4cca5 dhallPackages.buildDhallUrl: change argument from dhall-hash to dhallHash 2021-11-08 13:15:17 +09:00
Ellie Hermaszewska
15ae25f36c
haskell: switch from haskell.lib to haskell.lib.compose 2021-11-07 20:18:45 +08:00
Dennis Gosnell
2e1d84e9fb
dhallPackages.buildDhallUrl: small formatting fixes
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-11-01 13:44:50 +09:00
Robert Hensing
51f7c15df9 test.trivial-builders: Add test cases, fix test runner, rename
The writeStringReferencesToFile didn't handle non-unique references
to the same path correctly.
2021-11-01 00:06:03 +01:00
(cdep)illabout
9be3d05d7c tests.dhall.buildDhallUrl: add test 2021-10-25 15:04:50 +09: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
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
Samuel Ainsworth
0981d9473f cudatoolkit_11_{3,4}: init at 11.{3,4}.1 2021-09-21 07:03:01 +00:00
Robert Hensing
fbafeb7ad5 treewide: runCommandNoCC -> runCommand
This has been synonymous for ~5y.
2021-08-15 17:36:41 +02:00
Ben Siraphob
1e2484a27c treewide: remove unnecessary enableParallelBuilding when using cmake 2021-07-20 10:32:58 +07:00
Dmitry Kalinkin
8ff78e6a14
Merge pull request #130041 from xworld21/texlive-generate-fmtutilcnf
texlive: generate fmtutil.cnf
2021-07-17 08:21:12 -04:00
sternenseemann
3e19234f34 tests.haskell: set meta.platforms
This allows packagePlatforms to pick up on the overall supported
platforms and schedule builds on Hydra for more than the evaluation
platform (usually x86_64-linux).
2021-07-13 15:37:22 +02:00
sternenseemann
6bd0c16f89 tests.writers: also expose path via passthru 2021-07-13 15:22:34 +02:00
sternenseemann
52acca72bf top-level/release-haskell.nix: test writers on all platforms
Since the rust writer doesn't seem to get fixed on darwin, we'll just
wrap the haskell writer test in our own derivation (which is possible
since tests.writers exposes a bunch of internals via passthru) and
expose it via tests.haskell which are already in mergeable.

Finally a way to test the (hopefully) working haskell writer on darwin
again!
2021-07-13 15:19:36 +02:00
Vincenzo Mantova
e40614da00 tests.texlive.fmtutilCnf: init 2021-07-12 20:37:51 +01:00
Dmitry Kalinkin
7db19e75e6
Merge pull request #127489 from xworld21/texlive-drop-hyphens-sed
texlive.combine: improve creation of language files
2021-07-11 19:10:08 -04:00
Vincenzo Mantova
d26a4266e2 tests.texlive.hyphen-base: init 2021-07-04 11:47:33 +01:00
github-actions[bot]
947012b992
Merge staging-next into staging 2021-06-26 00:09:11 +00:00
Robert Schütz
d6234c2165 Merge branch 'master' into staging-next 2021-06-26 00:33:58 +02:00
Dmitry Kalinkin
53d6abc682
tests.texlive.texdoc: init 2021-06-23 22:18:54 -04:00
deliciouslytyped
a71e906e3a trivial-builders: refactor writeTextFile to be overridable
This fixes #126344, specifically with the goal of enabling overriding the
checkPhase argument. See `design notes` at the end for details.

This allows among other things, enabling bash extension for the `checkPhase`.
Previously using such bash extensions was prohibited by the `writeShellScript`
code because there was no way to enable the extension in the checker.

As an example:

```nix
(writeShellScript "foo" ''
  shopt -s extglob
  echo @(foo|bar)
'').overrideAttrs (old: {
  checkPhase = ''
    # use subshell to preserve outer environment
    (
      export BASHOPTS
      shopt -s extglob
      ${old.checkPhase}
    )
  '';
})
```

This commit also adds tests for this feature to `pkgs/tests/default.nix`,
under `trivial-overriding`. The test code is located at
`pkgs/build-support/trivial-builders/test-overriding.nix`.

Design notes:
-------------

Per discussion with @sternenseemann, the original approach of just wrapping
`writeTextFile` in `makeOverridable` had the issue that combined with `callPackage`
in the following form, would shadow the `.override` attribute of the `writeTextFile`:

```nix
with import <nixpkgs>;
callPackage ({writeShellScript}: writeShellScript "foo" "echo foo")
```

A better approach can be seen in this commit, where `checkPhase` is moved
from an argument of `writeTextFile`, which is substituted into `buildCommand`,
into an `mkDerivation` argument, which is substituted from the environment
and `eval`-ed. (see the source)

This way we can simple use `.overideAttrs` as usual, and this also makes
`checkPhase` a bit more conformant to `mkDerivation` naming, with respect to
phases generally being overridable attrs.

Co-authored-by: sterni <sternenseemann@systemli.org>
Co-authored-by: Naïm Favier <n@monade.li>
2021-06-18 01:39:59 +02:00
github-actions[bot]
f8b7190a42
Merge staging-next into staging 2021-06-10 00:06:44 +00:00
Matthieu Coudron
83f6711464 neovim.tests: added more tests
to check for creation of vi/vim aliases.
These tests also now follow the coding conventions of having tests in
passthru.test .
2021-06-09 21:45:25 +02:00
github-actions[bot]
5b7fbb07b8
Merge staging-next into staging 2021-06-07 18:48:37 +00:00
Matthieu Coudron
4a2cbcfbb4 neovim: add some tests
To test the generated RC is included in the file and that we have the
option not to wrap the RC.

run:
nix-build -A tests.vim
2021-06-07 18:21:21 +02:00
github-actions[bot]
0d024626ff
Merge staging-next into staging 2021-05-29 19:17:41 +00:00
Matthieu Coudron
c73371e04b
neovim: fix neovim.override (#124785)
* neovim: temporary revert to unbreak user configs

Newly introduced "plugins" parameter is disabled until we get a better
testing infrastructure to minimize breaking changes.
2021-05-29 16:36:39 +02:00
github-actions[bot]
5c859b2875
Merge staging-next into staging 2021-05-28 12:48:43 +00:00
Daniël de Kok
1da0b1dbc9
Merge pull request #122158 from danieldk/import-cargo-lock
rustPlatform.buildRustPackage: support direct use of Cargo.lock
2021-05-28 12:07:25 +02:00
Daniël de Kok
d3769e43c3 rustPlatform.importCargoLock: add test cases for importCargoLock 2021-05-28 08:01:28 +02:00
github-actions[bot]
7525d5acd3
Merge staging-next into staging 2021-05-26 18:54:44 +00:00
Matthieu Coudron
4a860879ea wrapNeovimUnstable: accept a wrapRc boolean
additional argument not generated by makeNeovimConfig
If true (the default), appends "-u <customRc>" to the wrapped arguments.
Set to false if you want to control where to save the generated config
(e.g., in ~/.config/init.vim or project/.nvimrc)
2021-05-25 22:41:08 +02:00