Commit graph

404 commits

Author SHA1 Message Date
Robert Hensing 523eb4a181 pkgs.tests: Add regression test for #175196 2022-05-29 10:23:16 +02:00
Robert Hensing 392fba1132 pkgs.tests.haskell.cabalSdist: Avoid IFD 2022-05-24 13:23:19 +02:00
Robert Hensing cf5e2d5103 haskellPackages: Add buildFromCabalSdist (faster, tested) 2022-05-23 22:28:57 +02:00
Janne Heß 3673f148b3
Merge remote-tracking branch 'origin/staging-next'
* origin/staging-next: (62 commits)
  Re-Revert "lua: fix on darwin by using makeBinaryWrapper (#172749)"
  openldap: fix cross-compilation
  makeBinaryWrapper: fix codesign on aarch64-darwin
  python3Packages.ldap: fix linking with openldap 2.5+
  Revert "lua: fix on darwin by using makeBinaryWrapper (#172749)"
  wine: enable parallel build again
  pkgsi686Linux.gdb: fix formatting for 32-bit systems
  gtk4: Fix incorrect merge
  nixos/openldap: use upstream unit defaults
  openldap: update maintainers
  openldap: 2.4.58 -> 2.6.2
  Revert "Add mingwW64-llvm cross-system."
  lua: fix on darwin by using makeBinaryWrapper (#172749)
  python310Packages.python-mimeparse: execute tests
  pandas: fix darwin build
  gtk3: 3.24.33 -> 3.24.33-2022-03-11
  gtk4: patch fixing g-c-c crashes
  e2fsprogs: patch for CVE-2022-1304
  firefox-unwrapped: fix cross compilation
  rustc: expose correct llvmPackages for cross compile
  ...
2022-05-23 19:56:59 +02:00
Artturin 5a6a31e54d fetchzip: extraPostFetch -> postFetch && tests 2022-05-22 21:18:52 +03:00
Naïm Favier 3e385d9a82
makeBinaryWrapper: add comment 2022-05-12 15:23:38 +02:00
Naïm Favier 0d6bcb513b
makeBinaryWrapper: move into its own folder
The derivation is complex enough to warrant moving out of
all-packages.nix
2022-05-10 22:07:56 +02:00
Robert Hensing ebf0465d09 Merge remote-tracking branch 'upstream/master' into testers 2022-05-09 14:27:13 +02:00
Robert Hensing 93abb7bef7 tests.testers.nixosTest-example: move from tests.nixos-functions.nixosTest-test
And improve the test a bit, to assert correct wiring of `pkgs`.
2022-05-09 14:21:56 +02:00
Robert Hensing ae172a2bb4 treewide: nixosTest -> testers.nixosTest 2022-05-09 14:16:06 +02:00
Naïm Favier 69c7dbb880
makeBinaryWrapper: add overlength-strings test 2022-05-06 17:03:30 +02:00
Janne Heß 0329256fd8
nixos-functions: Set system.stateVersion 2022-05-05 12:51:39 +02:00
Robert Hensing 7edb414660 testers.nixosTest: Move from top-level and improve docs 2022-05-05 12:48:47 +02:00
Frederik Rietdijk 1d63f89caa cudaPackages: overhaul of how we package cuda packages
There are many different versions of the `cudatoolkit` and related
cuda packages, and it can be tricky to ensure they remain compatible.

- `cudaPackages` is now a package set with `cudatoolkit`, `cudnn`, `cutensor`, `nccl`, as well as `cudatoolkit` split into smaller packages ("redist");
- expressions should now use `cudaPackages` as parameter instead of the individual cuda packages;
- `makeScope` is now used, so it is possible to use `.overrideScope'` to set e.g. a different `cudnn` version;
- `release-cuda.nix` is introduced to easily evaluate cuda packages using hydra.
2022-04-09 08:50:22 +02:00
github-actions[bot] 27e49cc5a4
Merge master into staging-next 2022-04-01 18:01:22 +00:00
Robert Hensing 6febb906a8 tests: Add pkgs-lib
Makes the following work

    ofborg build tests.pkgs-lib
2022-04-01 15:19:45 +02:00
github-actions[bot] be4f006d3c
Merge master into staging-next 2022-03-31 18:01:13 +00:00
Robert Hensing e2461d62b6 pkgs.tests.nixos-functions: machine -> nodes.machine 2022-03-28 14:11:58 +02:00
github-actions[bot] c6dd9fd65d
Merge master into staging-next 2022-03-25 18:01:14 +00:00
Silvan Mosberger 99d9d45630
Merge pull request #164651 from Infinisil/remove-optionSet
lib/modules: Finally remove deprecated types.optionSet
2022-03-25 17:41:57 +01:00
Vladimír Čunát 0a8b4eddd2
Merge branch 'master' into staging-next 2022-03-25 10:16:56 +01:00
Robert Hensing 6c469679f6 Merge remote-tracking branch 'upstream/master' into tests-restrict-arguments 2022-03-21 23:17:17 +01:00
Robert Hensing b2d3baa3cf tests.nixos-functions.nixosTest-test: Test callPackage-like behavior 2022-03-21 23:14:10 +01:00
Vladimír Čunát a519740b4c
Merge branch 'staging-next' into staging 2022-03-21 11:57:43 +01:00
Robert Hensing 9bc841fec1
Merge pull request #164305 from hercules-ci/haskellPackages-shellFor-extraDependencies
haskellPackages.shellFor: Add extraDependencies
2022-03-20 19:18:44 +01:00
Silvan Mosberger 7b32b8b66f Remove ancient mkOption tests
These are completely non-functional by now
2022-03-18 21:23:54 +01:00
Robert Hensing 2e87d165f7 haskellPackages.shellFor: Add extraDependencies
An example use case is when you have Haskell scripts that use
libraries that don't occur in your packages' dependencies.
2022-03-15 20:38:22 +01:00
K900 7e3c503257 build-support/writeTextFile: add test for weird file names 2022-03-10 13:30:46 +03:00
talyz 183147a037
makeWrapper: Don't glob in prefix/suffix
Disable file globbing in --prefix/--suffix, since bash will otherwise
try to find filenames matching the the value to be prefixed/suffixed
if it contains characters considered wildcards, such as `?` and
`*`. We want the value as is, except we also want to split it on on
the separator; hence we can't quote it.
2022-02-12 11:03:32 +01:00
talyz be2aa01de7
tests: Add test for makeWrapper
Co-authored-by: Janne Heß <janne@hess.ooo>
2022-02-02 20:08:26 +01:00
Sandro 982fdde775
neovim.tests: remove alias 2022-01-20 02:58:47 +01:00
Robert Hensing d75b85c5dc
Merge pull request #147690 from pasqui23/hosts
concatTextFile: init
2022-01-08 20:40:31 +01:00
Pasquale 5187d2cd8f
concatText: test now works 2021-12-30 13:12:34 +01:00
Robert Hensing f6ff6c4ff4
Merge pull request #151411 from hercules-ci/pkgs-tests-fetch
pkgs.tests: Add fetcher tests so ofborg can run them
2021-12-20 18:33:50 +01:00
Robert Hensing 7195f7d5b9 pkgs.tests: Add fetcher tests so ofborg can run them 2021-12-20 13:13:07 +01:00
Tobias Bergkvist ebf46e5764 makeBinaryWrapper: Fix issues on aarch64-darwin/macOS 12 (Monterey)
Sanitizers don't seem to be present on aarch64-darwin/macOS 12 (Monterey), so they are removed from the aarch64-darwin tests.

Switching from nativeBuildInputs to buildInputs and adding cc to the deps list caused some strange error messages to go away.
2021-12-16 21:29:21 +01:00
Tobias Bergkvist 228d451e03 makeBinaryWrapper: Fix chdir golden test for darwin
On macOS, /tmp is a symlink to /private/tmp. When performing cd /tmp, and checking cwd - it won't match since it follows the symlink.

This caused test breakage on macOS but not Linux. Instead, use a folder which is not a symlink, and consistent across Linux and macOS.
2021-12-16 21:12:59 +01:00
Tobias Bergkvist f7b5083cb6 makeBinaryWrapper: Make tests discoverable to OfBorg
Move makeBinaryWrapper tests to pkgs.makeBinaryWrapper.passthru.tests, since OfBorg doesn't discover/skips the tests in the previous location.
2021-12-16 21:04:07 +01:00
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
Matthieu Coudron 7836469dbe neovimUtils: makeNeovimConfig accepts plugins/customRc
mimics home-manager interface and makes it easier to associate configs with plugins. Added a test as well.
2021-05-25 22:41:08 +02:00
Jörg Thalheim 5551a78578
Merge pull request #123989 from Mic92/static-pie
glibc: allow to build position-independent static executable
2021-05-25 06:32:25 +01:00
Jörg Thalheim 166948d479 cc-wrapper: don't set rpath on static-pie executables 2021-05-23 17:38:17 +00:00
Jonathan Ringer c227fb4b17
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/development/tools/rust/cargo-cache/default.nix
	pkgs/development/tools/rust/cargo-embed/default.nix
	pkgs/development/tools/rust/cargo-flash/default.nix
	pkgs/servers/nosql/influxdb2/default.nix
2021-05-17 07:01:38 -07:00
Robert Hensing cc60f81e69 writeDirectReferencesToFile: init 2021-05-15 17:04:25 +02:00
Daniël de Kok 85f96822a0 treewide: fix cargoSha256/cargoHash
Rust 1.50.0 incorporated a Cargo change (rust-lang/cargo#8937) in
which cargo vendor erroneously changed permissions of vendored
crates. This was fixed in Rust
1.51.0 (rust-lang/cargo#9131). Unfortunately, this means that all
cargoSha256/cargoHashes produced during the Rust 1.50.0 cycle are
potentially broken.

This change updates cargoSha256/cargoHash tree-wide.

Fixes #121994.
2021-05-08 00:36:37 -07:00
Malte Brandy 2a11f1f5cc
Merge branch 'master' into haskell-updates 2021-05-07 15:03:54 +02:00
Dmitry Kalinkin f674f06ac5
tests.texlive.dvipng: apply recurseIntoAttrs 2021-05-02 19:35:47 -04:00
(cdep)illabout 88d9f2419e
tests.haskell-setBuildTarget: inline haskell package def to avoid IFD 2021-05-02 13:35:14 +09:00
Isaac Shapira d725ac7942
Add haskell.lib.setBuiltTarget, and support non library compiling of a single target 2021-05-02 13:35:07 +09:00
sternenseemann 1bfa5e1291 tests.haskell.shellFor: use writeText instead of toFile 2021-05-01 22:58:35 +02:00
sternenseemann 9a0dc0fa3e tests.haskell.shellFor: replace database-id-class with linear
Contrary to database-id-class, linear is part of stackage and actively
maintained, so the test is less likely to fail due to version
constraint issues as it is currently.
2021-05-01 22:58:35 +02:00
sternenseemann 10b771c61a tests.haskell*: move into tests.haskell set
This will make it easier to add all haskell related tests to the haskell
hydra jobset without updating a list of tests in two places.
2021-05-01 22:58:35 +02:00
Matthieu Coudron b3abdc9534
tests.vim: init (moved from vim-utils.nix) (#119467)
* tests.vim: init (moved from vim-utils.nix)

Moved tests from pkgs/misc/vim-plugins/vim-utils.nix to pkgs/test/vim.
Also reduced the amount of generated config:
- Make it possible to have an empty config when configured adequately
- removed default vim config when using native packages, it could be
  source of bugs see linked issues (syntax on overrides vim highlights)

Things to watch out for:
- if you set configure.beforePlugins yourself, you will need to add set nocompatible too not to lose it
- filetype indent plugin on | syn on is not enabled anymore by default for the vim-plug installer: I dont think we should override vim defualts, at least not here since it is shared with neovim. Also sometimes it's enabled before plugins (pathogen etc,) which is not consistent.


you can run the tests via
$ nix-build -A tests.vim
2021-04-21 12:55:05 +02:00
Daniël de Kok f75286e063 cudatoolkit-{9,9_0,9_1,9_2}: remove
Remove old CUDA toolkits (and corresponding CuDNN versions).

- Not supported by upstream anymore.
- We do not use them in nixpkgs.
- We do not test or actively maintain them.
- Anything but ancient GPUs is supported by newer toolkits.

Fixes #107131.
2021-04-18 11:55:10 +02:00
Dmitry Kalinkin 6829f9e141
texlive.bin.dvipng: refactor gs hardcoding, add a test for it 2021-03-18 20:55:35 -04:00
John Ericson 66447439a0 maintainers-list: obsidian-systems-maintenance
Fix mispelling. That word always breaks me...
2021-03-17 18:45:36 -04:00
John Ericson a680b02816 tests.cude.cuda-library-samples.cutensor: init at same version as others 2021-03-17 20:15:51 +00:00
John Ericson c1ced05ec4 tests.cude.cuda-library-samples.{cublas,cusolver}: init at master
Well, strictly speaking, master +
https://github.com/NVIDIA/CUDALibrarySamples/pull/29
2021-03-17 19:10:33 +00:00
John Ericson 23f815f12c tests.cuda.cuda-sample_*: Init at supported CUDA toolkit versions
Since CUDA is unfree, we won't actually use this when testing Nixpkgs
officially. But I want to include this as they are useful for users of
Nixpkgs trying to set up / debug a CUDA environment.
2021-03-17 19:10:33 +00:00
Andrew Childs 93a7e96c87 tests.patch-shebangs: add case for ignoring store paths 2021-02-09 13:07:49 +09:00
Pavol Rusnak a6ce00c50c
treewide: remove stdenv where not needed 2021-01-25 18:31:47 +01:00
Pavol Rusnak 90f7338112
treewide: stdenv.lib -> lib 2021-01-24 01:49:49 +01:00
Jörg Thalheim 61bbbcd1af
bintools-wrapper: skip dynamic linker for static binaries 2020-12-27 16:42:11 +01:00
Vladimír Čunát 363175cd99
Revert "bintools-wrapper: skip dynamic linker for static binaries"
This reverts commit ccfd26ef14.

These toolchain changes are too problematic, so reverting for now; see
https://github.com/NixOS/nixpkgs/pull/107086#issuecomment-749196366
2020-12-21 22:27:48 +01:00
github-actions[bot] d491b49037
Merge master into staging-next 2020-12-20 00:43:57 +00:00
John Ericson 5d2a20c93a buildRustCrateTests: Move to tests.buildRustCrate
I think it is preferable to separate the tests from the "real" packages.
2020-12-19 18:56:06 +00:00
Jörg Thalheim b39dd890ac
tests.cc-wrapper: disable static compilation macOS
macOS does not support this
2020-12-14 20:53:00 +01:00
Jörg Thalheim ccfd26ef14 bintools-wrapper: skip dynamic linker for static binaries
Currently we set dynamic-linker unconditionally. This breaks
however some static binaries i.e. rust binaries linked against musl.
There is no reason we should set an elf interpreter for static binaries
hence this is skipped if `-static` or `-static-pie` is either passed to
our cc or ld wrapper.
2020-12-14 15:42:54 +00:00
John Ericson b7650aaa77 rust: Clean up target configs and test some more
See the new docs for details. The difference is vis-a-vis older versions
of this PR, not master.
2020-11-28 19:36:28 +00:00
John Ericson 8ddf5c6907 Merge remote-tracking branch 'upstream/master' into aj-rust-custom-target 2020-11-28 18:10:38 +00:00
Joe Hermaszewski 7673eda11d haskell: Add documentationTarball to lib 2020-11-13 21:37:56 +01:00
Vladimír Čunát 89023c38fc
Recover the complicated situation after my bad merge
I made a mistake merge.  Reverting it in c778945806 undid the state
on master, but now I realize it crippled the git merge mechanism.
As the merge contained a mix of commits from `master..staging-next`
and other commits from `staging-next..staging`, it got the
`staging-next` branch into a state that was difficult to recover.

I reconstructed the "desired" state of staging-next tree by:
 - checking out the last commit of the problematic range: 4effe769e2
 - `git rebase -i --preserve-merges a8a018ddc0` - dropping the mistaken
   merge commit and its revert from that range (while keeping
   reapplication from 4effe769e2)
 - merging the last unaffected staging-next commit (803ca85c20)
 - fortunately no other commits have been pushed to staging-next yet
 - applying a diff on staging-next to get it into that state
2020-10-26 09:01:04 +01:00
Vladimír Čunát c778945806
Revert "Merge #101508: libraw: 0.20.0 -> 0.20.2"
I'm sorry; I didn't notice it contained staging commits.

This reverts commit 17f5305b6c, reversing
changes made to a8a018ddc0.
2020-10-25 09:41:51 +01:00
Aaron Janse 29cdd8ae60 fix whitespace 2020-10-17 14:38:36 -07:00
Aaron Janse 7ebcb6ee48 remove trailing period 2020-10-17 00:58:27 -07:00
Aaron Janse 0ac33bf3f8 add meta to rust-sysroot test 2020-10-17 00:58:09 -07:00
Aaron Janse 116ac11652 add test 2020-10-17 00:43:33 -07:00
Jan Tojnar 1882368e8a
Merge branch 'staging-next' into staging 2020-10-11 00:27:42 +02:00
Lily Ballard 03c9f6a647 installShellFiles: Add test suite 2020-10-08 15:08:40 -07:00
Dmitry Kalinkin 074f6d9d84
tests.texlive: init 2020-10-06 19:24:41 -04:00
(cdep)illabout 6bcfecbfa2 tests.haskell-shellFor: get compiling again 2020-09-25 21:08:23 +02:00
Jörg Thalheim 96092dc936
stdenv: make -nostdinc work as intended
Right now we add glibc to search path also -nostdinc was provided,
which breaks projects providing their own gcc.
2020-07-23 08:39:46 +01:00
Florian Klink cfb4d0dfe3
Merge pull request #84032 from teto/fix_kernel_merge
Fix kernel configuration merge
2020-05-22 13:32:22 +02:00
John Ericson c71ab32a67 pkg-config-wrapper: Init
This fixes longstanding build issues
2020-05-16 00:21:21 +00:00
John Ericson 27edd9efb3 cross/tests: Use crossPkgs.runCommand so we have strictDeps 2020-05-16 00:21:21 +00:00
Matthieu Coudron b9a4e6953d kernel: fix config generation
Addresses https://github.com/NixOS/nixpkgs/issues/71803:
Kernel options are not merged as described, especially the "optional"
aspects. The error silences legitimate warnings.
2020-04-01 22:25:57 +02:00
worldofpeace 6022db4d9d tests.nixos-functions: port test to python 2020-02-09 23:53:58 +01:00
Luka Blaskovic 0fc6280715 llvm_4: remove 2020-01-30 18:35:31 -05:00
Luka Blaskovic 0eafee8328 llvm_39: remove 2020-01-30 18:35:30 -05:00
Matthew Bauer 07db0b248c Merge remote-tracking branch 'obsidiansystems/work-on-multi-shellFor' 2020-01-17 18:00:27 -05:00
Jacquin Mininger 7d67db3919 shellFor: Refactor for consistency and cross
This makes it work like work-on-multi from Reflex Platform. In
particular, rather than making `.env` from `shellFor`, we make `.env`
the primitive, and `shellFor` works by combining together the arguments
of all the packages to `generic-builder` and taking the `.env` of the
resulting mashup-package.

There are 2 benefits of this:

1. The dependency logic is deduplicated. generic builder just concatted
   lists, whereas all the envs until now would sieve apart haskell and
   system build inputs. Now, they both decide haskell vs system the same
   way: according to the argument list and without reflection.
   Consistency is good, especially because it mean that if the build
   works, the shell is more likely to work.

2. Cross is handled better. For native builds, because the
   `ghcWithPackages` calls would shadow, we through both the regular
   component (lib, exe, test, bench) haskell deps and Setup.hs haskell
   deps in the same `ghcWithPackages` call. But for cross builds we use
   `buildPackages.ghcWithPackages` to get the setup deps. This ensures
   everything works correctly.
2020-01-17 10:46:29 -05:00
Will Dietz a4d1e97e3d
tests.cc-wrapper-{clang,libcxx}-{8,9}: add stdenv tests for LLVM 8, 9 2019-09-19 15:03:09 -05:00
volth 08f68313a4 treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
worldofpeace 3f4a353737 treewide: use dontUnpack 2019-07-01 04:23:51 -04:00
volth f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
Austin Seipp 64f7cb24d5
all-packages/test: add gcc9Stdenv, cc-wrapper-gcc9
Follow up from #60860.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-05-07 17:21:31 -05:00
Matthew Bauer 9abff4af4f wasm: init cross target
Adds pkgsCross.wasm32 and pkgsCross.wasm64. Use it to build Nixpkgs
with a WebAssembly toolchain.

stdenv/cross: use static overlay on isWasm

isWasm doesn’t make sense dynamically linked.
2019-04-23 21:48:57 -04:00
Matthew Bauer 8e25da0beb cross/tests: add llvm-based tests 2019-02-26 19:46:24 -05:00
Matthew Bauer b86e62d30d llvm: support cross compilation with useLLVM flag
You can build (partially) with LLVM toolchain using the useLLVM flag.
This works like so:

  nix-build -A hello --arg crossSystem '{ system =
    "aarch64-unknown-linux-musl"; useLLVM = true }'

also don’t separate debug info in lldClang

It doesn’t work currently with that setup hook. Missing build-id?
2019-02-26 19:45:35 -05:00
Matthieu Coudron 461cb3f9ed linux: added tests for the config 2019-01-28 09:07:24 +09:00
Matthew Bauer f435272ce3
Merge pull request #50212 from matthewbauer/host-emulator
Add "emulator" function to systems
2018-11-29 19:34:20 -06:00
Matthew Bauer 9c8fd41224 treewide: add emulator to platform
You can use stdenv.hostPlatform.emulator to get an executable that
runs cross-built binaries. This could be any emulator. For instance,
we use QEMU to emulate Linux targets and Wine to emulate Windows
targets. To work with qemu, we need to support custom targets.

I’ve reworked the cross tests in pkgs/test/cross to use this
functionality.

Also, I’ve used talloc to cross-execute with the emulator. There
appears to be a cross-execute for all waf builds. In the future, it
would be nice to set this for all waf builds.

Adds stdenv.hostPlatform.qemuArch attrbute to get the qemuArch for
each platform.
2018-11-29 19:15:30 -06:00
Jörg Thalheim f12bd000b9
Merge pull request #49290 from krebs/nix-writers
get nix-writers into nixpkgs
2018-11-27 07:17:03 +00:00
lassulus 2d02cd7790 build-support writers: add tests 2018-11-27 07:08:13 +01:00
Jan Malakhovski 58ff402b40 pkgs/test/nixos-functions: use dummy versioning
With this OfBorg and similar tools won't report this derivation as
changed every single time.
2018-11-19 19:26:52 +00:00
Robert Hensing 3783f2d510 pkgs/test/nixos-functions: Add inline doc 2018-11-13 10:47:17 +01:00
Robert Hensing 5d594d764e tests: Don't use pkgs.extend. OfBorg will reject it.
The good news is that it worked as expected.
2018-11-13 10:43:05 +01:00
Robert Hensing 933c95c0f4 Add tests for pkgs.nixos and pkgs.nixosTest 2018-11-13 10:43:05 +01:00
Jan Tojnar a2de5fc56e Remove openftd
It never worked, never was added as an attribute and the website is dead.
2018-10-21 21:52:20 +02:00
Vladimír Čunát 3a09a4b579
Merge branch 'master' into staging
Hydra: ?compare=1480463
2018-09-24 21:18:23 +02:00
Will Dietz 0c459474f9 tests: add variants for llvm7 2018-09-23 13:30:17 -05:00
Dan Peebles 88a969d1b7 top-level/release.nix: add patchShebangs test
This is currently failing but nobody noticed!
2018-09-16 14:22:29 -04:00
Tuomas Tynkkynen e94fcbcd01 pkgs/tests: Add test for LD_LIBRARY_PATH
The latest binutils upgrade silently broke this until it was fixed by
https://github.com/NixOS/nixpkgs/pull/43531.

So add a test.
2018-08-01 19:02:21 +03:00
Matthew Bauer b98b4eac71 tests: add some cross tests 2018-07-21 17:00:05 -04:00
John Ericson b3d957649f Merge remote-tracking branch 'upstream/master' into staging 2018-06-18 15:30:39 -04:00
John Ericson e3b1937baf tests.cc-wrapper: Fix sanitizer condition
fc9644d4c9 accidentally enabled the
sanitizer tests for GCC on Darwin, when fixing that case was never
attempted. Also inverted the condition from broken to working for
clarity.
2018-06-18 15:05:57 -04:00
John Ericson 6e7e22da70 llvm 5: split out compiler-rt and remove libcxxabi dep
We already did them on non-mass-rebuild llvm 6. Also, this allows
simplifying the stdenv booting.

We were missing the libcxxabi dep in compile-rt in llvm 6, so fixed that
too.
2018-06-14 19:22:15 -04:00
John Ericson fc9644d4c9 llvm 6: Fix libcxxabi impurity and darwin sanitizers 2018-06-14 19:19:54 -04:00
Orivej Desh 07ebb8bb79 tests.cc-wrapper: do not test sanitizers on darwin
They are not supported yet.

https://github.com/NixOS/nixpkgs/pull/41284#issuecomment-394977350
2018-06-06 08:01:13 +00:00
Benjamin Saunders f24f6d7af3 tests.cc-wrapper: skip known-broken sanitizer cases 2018-05-30 18:48:42 -07:00
Benjamin Saunders b0d0b1adfe clang_6: fix sanitizers under libstdc++ 2018-05-24 15:04:30 -07:00
Benjamin Saunders 46eeef1898 tests.cc-wrapper: verify building with sanitizers 2018-05-24 02:57:44 -04:00
Matthew Bauer 4d141bd463 tests: move to attribute set 2018-05-10 23:58:12 -05:00
Jan Tojnar a31d98f312
tree-wide: autorename gnome packages to use dashes 2018-02-25 17:41:16 +01:00
Daiderd Jordan 80de99b46b
sierra-shared-test: fix build
Using 500 libraries started failing with clang++: Argument list too long
This is enough to reproduce the issue.
2018-01-05 23:20:55 +01:00
Will Dietz 9d8f9b2e53 Add clang multilib variants (x64_64-only, 64/32bit), basic multilib tests 2017-12-05 07:17:14 -06:00
John Ericson 5aec3f96a2 treewide: Use *Platform.extensions 2017-09-13 11:16:10 -04:00
Daiderd Jordan b91307c2e1
nixpkgs-tests: add basic test for buildInputs 2017-09-10 22:49:47 +02:00
Daiderd Jordan 19c4673310
nixpkgs-tests: add basic test for cc-wrapper 2017-09-10 22:49:39 +02:00
John Ericson 14e05c30e8 macos-sierra-shared: Make live code and add to nascent Darwin channel
Also add appropriate `meta.platforms = ...` to each derivation.
2017-07-31 21:28:18 -04:00
John Ericson eeed1814dc cc-wrapper-test: Use $CXX else the C++ std lib won't be on the include path 2017-07-31 17:02:56 -04:00
John Ericson a9dd855894 cc-wrapper-test: Don't use assert 2017-07-31 17:02:56 -04:00
John Ericson 539dcb8e27 cc-wrapper-test: Forgot to extern "C" now that main is C++ 2017-07-31 17:02:56 -04:00
John Ericson f671b85fb2 cc-wrapper: Beef up sierra tests to actually use functions 2017-07-31 17:02:56 -04:00
John Ericson 0c37778c2c cc-wrapper: WIP linking hack for mac OS
Probably best to override Haskell packages set, or anything else
linking a lot of libraries, with this.
2017-07-31 17:02:56 -04:00
Eelco Dolstra a133a74c89 Remove cruft 2016-04-26 17:31:54 +02:00
Vladimír Čunát ab15a62c68 Merge branch 'master' into closure-size
Beware that stdenv doesn't build. It seems something more will be needed
than just resolution of merge conflicts.
2016-04-01 10:06:01 +02:00
Nicolas B. Pierron 6313a5698a Replace references to all-packages.nix, by references to the top-level of nixpkgs repository. 2016-03-13 18:25:52 +00:00
Vladimír Čunát 99e4371526 curl: split into multiple outputs
Also use pkgconfig to be safer and fix (some) referrers.
2015-10-13 20:18:48 +02:00
Mateusz Kowalczyk 7e5d0ee0c3 s/dependancy/dependency/ 2014-09-10 00:28:49 +01:00
Nicolas Pierron 0e25bb67cf Add a new way to handle option sets.
svn path=/nixpkgs/trunk/; revision=12505
2008-08-05 17:16:35 +00:00
Wouter den Breejen e3d6f44256 Missing gecko now.
svn path=/nixpkgs/trunk/; revision=9715
2007-11-16 14:41:15 +00:00
Wouter den Breejen c8a2eb68a9 libnotify is missing
svn path=/nixpkgs/trunk/; revision=9711
2007-11-16 14:24:24 +00:00
Wouter den Breejen 499a0942d5 Added openftd. Doesnt work (yet)
svn path=/nixpkgs/trunk/; revision=9708
2007-11-16 13:49:02 +00:00
Eelco Dolstra 105344a44e * Moved hsqldb.
svn path=/nixpkgs/trunk/; revision=9293
2007-09-11 11:06:31 +00:00
Wouter den Breejen 606a46e6b5 hsqldb: Forgot these 2
svn path=/nixpkgs/trunk/; revision=9264
2007-09-06 15:38:32 +00:00
Eelco Dolstra 82e678362f * "." -> "source".
svn path=/nixpkgs/trunk/; revision=4335
2005-12-05 14:11:09 +00:00
Eelco Dolstra beaff0a892 * Ensure that when building gcc, libstdc++ is linked against the
libgcc of the gcc being built, not the gcc building it.
* Only include a directory in the rpath of an executable/library if it
  is actually used.  Before, the `/lib' directory of every build input
  was added to the rpath, causing many unnecessary retained
  dependencies.  For instance, Perl has a `/lib' directory, but most
  applications whose build process uses Perl don't actually link
  against Perl.  (Also added a test for this.)
* After building glibc, remove glibcbug, to prevent a retained
  dependency on gcc.
* Add a newline after `building X' in GNU Make.

svn path=/nixpkgs/trunk/; revision=911
2004-04-04 22:02:41 +00:00
Eelco Dolstra 01a1658c6b * Finally we have a working stdenvLinux again.
On the downside, the build process of stdenvLinux builds gcc 9 times
  (3 x 3 bootstrap stages).  That's a bit excessive.

svn path=/nixpkgs/trunk/; revision=880
2004-03-30 12:46:52 +00:00
Eelco Dolstra 12ae5363ea * Remove trivial builders.
* Make builders unexecutable by removing the hash-bang line and
  execute permission.
* Convert calls to `derivation' to `mkDerivation'.
* Remove `system' and `stdenv' attributes from calls to
  `mkDerivation'.  These transformations were all done automatically,
  so it is quite possible I broke stuff.
* Put the `mkDerivation' function in stdenv/generic.

svn path=/nixpkgs/trunk/; revision=874
2004-03-29 17:23:01 +00:00
Eelco Dolstra 0fd59fd7a4 * Re-enabled purity checking: it should work now. First we only
checked whether absolute paths passed to gcc/ld refer to the store,
  which is wrong: they can also refer to the build tree
  (/tmp/nix-...).

* Less static composition in the construction of stdenv-nix-linux:
  gcc-wrapper and generic are now passed in as arguments, rather then
  referenced by relative path.  This makes it easier to hack on a
  specific stage of the bootstrap process (before, a change to, e.g.,
  generic/setup.sh would cause all bootstrap stages to be redone).

svn path=/nixpkgs/trunk/; revision=833
2004-03-12 11:12:18 +00:00
Eelco Dolstra de13527000 * Finally got stdenv-nix-linux working again. Still not perfect,
though.
* libxml2: upgrade to latest.
* octavefront/rna: keep debug info.

svn path=/nixpkgs/trunk/; revision=830
2004-03-11 17:26:14 +00:00
Eelco Dolstra a1b3ae0c81 * stdenv-nix-linux should more-or-less work again now.
svn path=/nixpkgs/trunk/; revision=826
2004-03-09 17:16:02 +00:00
Eelco Dolstra 946a2d4a48 * gcc-wrapper now filters out -L and -I flags referring to paths
outside the store (in pure builds).

svn path=/nixpkgs/trunk/; revision=817
2004-03-08 18:29:08 +00:00
Eelco Dolstra ce50734cf0 * Started reorganising stdenv:
- gcc/ld-wrappers have been factored out into a separate
    derivation.  This allows a working gcc to be installed in the user
    environment.  (Previously the Nix gcc didn't work because it
    needed a whole bunch of flags to point to glibc.)
    
  - Better modularity: packages can specify hooks into the setup
    scripts.  For instance, setup no longer knows about the
    PKG_CONFIG_PATH variable; pkgconfig can set it up instead.

  - gcc not longer depends on binutils.  This simplifies the bootstrap
    process.

svn path=/nixpkgs/trunk/; revision=816
2004-03-08 16:02:46 +00:00