summaryrefslogtreecommitdiff
path: root/lib (follow)
Commit message (Expand)AuthorAgeFilesLines
* Merge pull request #65380 from danbst/int-merge-one-option•••lib/types: change merge strategy for `str`, `int`, `float`, `path` and `enum`Silvan Mosberger2019-07-291-5/+5
|\
| * lib/types: change merge strategy for `str`, `int`, `float` and `enum`•••Change to `mergeEqualOption`. danbst2019-07-251-5/+5
* | Add RISC-V embedded crossSystemsJay Kruer2019-07-252-1/+13
* | lib: allow sourceByRegex to be composed after cleanSourceWith•••`sourceByRegex src regexes` should include a source file if one of the regular expressions `regexes` matches the path of that file relative to `src`. However to compute this relative path `sourceByRegex` uses: ``` relPath = lib.removePrefix (toString src + "/") (toString path); ``` Note that `toString path` evaluates to an absolute file somewhere under `src` and not under `/nix/store`. The problem is that this doesn't work if `src` is a `cleanSourceWith` invocation as well because `toString src` will then evaluate to `src.outPath` which will evaluate to `builtins.filterSource ...` which evaluates to a path in `/nix/store` which is not a prefix of `path`. The solution is to replace `src` with `origSrc` where ``` origSrc = if isFiltered then src.origSrc else src; isFiltered = src ? _isLibCleanSourceWith; ``` Test this by executing the following from the nixpkgs repo: ``` (cat << 'EOI' let pkgs = import ./. {}; in pkgs.runCommand "test-sourceByRegex" { test_sourceByRegex = let src1 = pkgs.lib.sourceByRegex ./. [ "^test-sourceByRegex.nix$" ]; src2 = pkgs.lib.sourceByRegex src1 [ "^test-sourceByRegex.nix$" ]; in src2 + "/test-sourceByRegex.nix"; } '' cp $test_sourceByRegex $out '' EOI ) > test-sourceByRegex.nix nix-build test-sourceByRegex.nix ``` Bas van Dijk2019-07-191-6/+10
|/
* make-tarball / lib-tests: reduce duplication•••The misc.nix and systems.nix tests were invoked at three different places. Let's not that. Frederik Rietdijk2019-07-111-11/+4
* Revert "Revert "systems/doubles.nix: add Apple doubles""•••This reverts commit ce2f74df2cade57e74c235292c8b074281903e71. Doubles are treated as -darwin here, to provide some consistency. There is some ambiguity between “x86_64-darwin” and “i686-darwin” which could refer to binaries linked between iOS simulator or real macOS binaries. useiOSPrebuilt can be used to determine which to use, however. Matthew Bauer2019-07-102-4/+6
* Revert "systems/doubles.nix: add Apple doubles"•••The lib tests need to be fixed as well. This unbreaks the tarball job. This reverts commit 00ba557856d6217121e50ea69c251e9458d9dc08. Frederik Rietdijk2019-07-101-3/+1
* systems/doubles.nix: add Apple doubles•••These are used in cross-compilation to iOS devices and simulators. Fallout from #60349. Matthew Bauer2019-07-081-1/+3
* treewide: remove unused variables (#63177)•••* treewide: remove unused variables * making ofborg happy volth2019-06-161-1/+1
* Merge pull request #62712 from danbst/module-conflict-naming•••NixOS module system: improve one of error messagesDanylo Hlynskyi2019-06-131-1/+1
|\
| * module system: prettify a bit error when unique option defined twice•••The error can be reproduced like: ``` $ nix-instantiate ./nixos -A system --arg configuration ' { fileSystems."/".device = "nodev"; boot.loader.grub.devices = [ "nodev" ]; containers.t.config.imports = [ <nixpkgs/nixos/modules/virtualisation/amazon-image.nix> ]; }' ``` Previously error was: ``` error: The unique option `containers.t.networking.hostName' is defined multiple times, in `/nix/var/nix/profiles/per-user/root/channels/nixpkgs/nixos/modules/virtualisation/amazon-image.nix' and `module at /home/danbst/dev/nixpkgs/nixos/modules/virtualisation/containers.nix:470'. (use '--show-trace' to show detailed location information) ``` Now it is: ``` error: The unique option `containers.t.networking.hostName' is defined multiple times, in: - /nix/var/nix/profiles/per-user/root/channels/nixpkgs/nixos/modules/virtualisation/amazon-image.nix - module at /home/danbst/dev/nixpkgs/nixos/modules/virtualisation/containers.nix:470. (use '--show-trace' to show detailed location information) ``` Related: https://github.com/NixOS/nixpkgs/issues/15747 danbst2019-06-051-1/+1
* | licenses: refer to libpng2 using spdx•••https://spdx.org/licenses/libpng-2.0.html Orivej Desh2019-06-121-3/+3
* | licenses: fix LGPL 2.1 full nameOrivej Desh2019-06-061-2/+2
* | systems: fix lib-tests•••These were broken by the added system doubles. This just adds those to the lib-tests. Matthew Bauer2019-06-043-5/+8
* | systems: fixup from last commit•••it’s powerpc-none not ppc-none Matthew Bauer2019-06-041-1/+1
* | systems: add missing doubles•••in https://github.com/NixOS/nixpkgs/pull/60349, the attr handling was removed. This means we rely on these double values for determing what we are compatible with. This adds some of the missing doubles to this list. https://hydra.nixos.org/eval/1523389#tabs-removed Matthew Bauer2019-06-041-0/+4
* | Merge pull request #60349 from matthewbauer/fix-60345•••check-meta: use system tuple in platformsMatthew Bauer2019-06-044-41/+7
|\ \ | |/ |/|
| * systems: allow passing in string for cross/localSystem•••This makes things a little bit more convenient. Just pass in like: $ nix-build ’<nixpkgs>’ -A hello --argstr localSystem x86_64-linux --argstr crossSystem aarch64-linux Matthew Bauer2019-06-041-1/+3
| * systems: remove forMeta•••This is unused now. Matthew Bauer2019-06-042-39/+0
| * systems: add riscv double•••This was never listed in doubles.nix! Not sure why? Matthew Bauer2019-04-301-0/+3
| * check-meta: use system tuple in platforms•••Fixes #60345 Matthew Bauer2019-04-301-1/+1
* | Merge pull request #60406 from JohnAZoidberg/remove-isnull•••treewide: Remove usage of isNullRobin Gloster2019-05-183-4/+4
|\ \
| * | treewide: Remove usage of isNull•••isNull "is deprecated; just write e == null instead" says the Nix manual Daniel Schaefer2019-04-293-4/+4
* | | Adds pkgsCross.gnu32 and pkgsCross.gnu64 platformsLionello Lunesu2019-05-051-0/+3
| |/ |/|
* | Merge master into staging-nextFrederik Rietdijk2019-04-271-0/+6
|\|
| * lib.licences: Add CC-BY-NC-3.0Mario Rodas2019-04-241-0/+6
* | tests/systems: fix testsMatthew Bauer2019-04-251-1/+1
* | Merge pull request #56555 from matthewbauer/wasm•••Initial WebAssembly/WASI cross-compilation supportMatthew Bauer2019-04-236-5/+25
|\ \
| * | wasmtime: init and use for emulation•••This isn’t really an "emulator" but it’s the closest concept we have right now. Matthew Bauer2019-04-231-2/+2
| * | wasm: don’t assume muslMatthew Bauer2019-04-231-1/+1
| * | 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. Matthew Bauer2019-04-236-4/+24
| |/
* / cc-wrapper: make machine configuration configurable•••It is useful to make these dynamic and not bake them into gcc. This means we don’t have to rebuild gcc to change these values. Instead, we will pass cflags to gcc based on platform values. This was already done hackily for android gcc (which is multi-target), but not for our own gccs which are single target. To accomplish this, we need to add a few things: - add ‘arch’ to cpu - add NIX_CFLAGS_COMPILE_BEFORE flag (goes before args) - set -march everywhere - set mcpu, mfpu, mmode, and mtune based on targetPlatform.gcc flags cc-wrapper: only set -march when it is in the cpu type Some architectures don’t have a good mapping of -march. For instance POWER architecture doesn’t support the -march flag at all! https://gcc.gnu.org/onlinedocs/gcc/RS_002f6000-and-PowerPC-Options.html#RS_002f6000-and-PowerPC-Options Matthew Bauer2019-04-201-17/+17
|/
* release-cross: remove alpha-elf target•••This doesn’t appear to ever have worked. binutils doesn’t seem to support the alpha-elf target at all. It doesn’t make sense to keep this around. https://hydra.nixos.org/build/92403855/nixlog/1/tail Matthew Bauer2019-04-201-5/+0
* kernel-headers: infer ARCH from config triple•••This makes us less reliant on the systems/examples.nix. You should be able to cross compile with just your triple: $ nix build --arg crossSystem '{ config = "armv6l-unknown-linux-gnueabi"; }' stdenv Matthew Bauer2019-04-191-0/+7
* systems: correct qemu architectures•••ppc64le and ppc64 are different targets in the configure script. We can’t use the same one. TODO: canonicalize similar ones based on qemu’s configure script. Matthew Bauer2019-04-191-3/+2
* systems: fix emulator identity•••Squashed to fix shell quoting, thanks @Ericson2314 Matthew Bauer2019-04-191-1/+1
* systems/parse.nix: fixup arm compatibilitiesMatthew Bauer2019-04-191-13/+33
* Merge master into staging-nextFrederik Rietdijk2019-04-182-4/+6
|\
| * lib.converge: optimiseAlyssa Ross2019-04-171-3/+6
| * androidndk-pkgs: Remove -mfloat flagKen Micklas2019-04-161-1/+0
* | Merge staging-next into stagingFrederik Rietdijk2019-04-162-4/+3
|\|
| * Merge pull request #59369 from Ekleog/unique-fix•••lib: improve the implementation of the unique functionEelco Dolstra2019-04-151-2/+1
| |\
| | * lib: improve the implementation of the unique functionLéo Gaspard2019-04-121-2/+1
| * | Merge pull request #58815 from Infinisil/fix/cleanSource/git-worktree•••lib.cleanSourceFilter: Filter all .git, not just directoriesSilvan Mosberger2019-04-141-2/+2
| |\ \ | | |/ | |/|
| | * lib.cleanSourceFilter: Filter all .git, not just directories•••In the case of a worktree created with `git worktree add`, .git is actually a file with contents pointing to the original repository. Silvan Mosberger2019-04-081-2/+2
* | | Merge staging-next into stagingFrederik Rietdijk2019-04-112-18/+0
|\| |
| * | systems: remove android armv5te platform•••this isn’t useful any more because the ndk we use no longer supports it. Matthew Bauer2019-04-101-10/+0
| * | androidndk: fixup mess•••New android ndk (18) now uses clang. We were going through the wrapper that are provided. This lead to surprising errors when building. Ideally we could use the llvm linker as well, but this leads to errors as many packages don’t support the llvm linker. Matthew Bauer2019-04-101-8/+0
| * | Merge branch 'master' into staging-next•••Hydra nixpkgs: ?compare=1512490 Vladimír Čunát2019-04-025-1/+9
| |\|
| * | Merge master into staging-nextFrederik Rietdijk2019-03-231-1/+1
| |\ \