aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2019-06-03Made epochs more fine-grainedNick Van den Broeck
Fixes #2894
2019-06-03Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-06-01Fix segfault in builtin fetchurl with hashed mirrors + SRI hashesEelco Dolstra
2019-05-31Fix handling of bare flakerefs containing a colonEelco Dolstra
2019-05-31Allow bare flakerefs as installablesEelco Dolstra
So now $ nix build blender-bin works and builds the default package from that flake. You don't need to add a colon at the end anymore.
2019-05-31Rename requires -> inputs, provides -> outputsEelco Dolstra
Issue #2828.
2019-05-29Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-05-29Enable more fromTOML testsEelco Dolstra
cpptoml now parses almost all examples from the spec.
2019-05-29Fix eval-okay-fromTOML testEelco Dolstra
Turns out we were mis-parsing single-quoted attributes, e.g. 'key2'.
2019-05-29Add date of last commit to SourceInfoEelco Dolstra
This is primarily useful for version string generation, where we need a monotonically increasing number. The revcount is the preferred thing to use, but isn't available for GitHub flakes (since it requires fetching the entire history). The last commit timestamp OTOH can be extracted from GitHub tarballs.
2019-05-28Merge branch 'attrPaths' of https://github.com/NinjaTrappeur/nixEelco Dolstra
2019-05-28Added nonFlakeRequires testNick Van den Broeck
Fixes #2888
2019-05-26Remove outdated fetchGit testEelco Dolstra
It's no longer an error if we can't update our clone.
2019-05-23Register flake source trees as GC rootsEelco Dolstra
This ensures that flakes don't get garbage-collected, which is important to get nix-channel-like behaviour. For example, running $ nix build hydra: will create a GC root ~/.cache/nix/flake-closures/hydra -> /nix/store/xarfiqcwa4w8r4qpz1a769xxs8c3phgn-flake-closure where the contents/references of the linked file in the store are the flake source trees used by the 'hydra' flake: /nix/store/n6d5f5lkpfjbmkyby0nlg8y1wbkmbc7i-source /nix/store/vbkg4zy1qd29fnhflsv9k2j9jnbqd5m2-source /nix/store/z46xni7d47s5wk694359mq9ay353ar94-source Note that this in itself is not enough to allow offline use; the fetcher for the flakeref (e.g. fetchGit or downloadCached) must not fail if it cannot fetch the latest version of the file, so long as it knows a cached version. Issue #2868.
2019-05-23Fix testsEelco Dolstra
https://hydra.nixos.org/eval/1521131
2019-05-22Add a test for the registry GC rootEelco Dolstra
2019-05-22Check the flake epochEelco Dolstra
Closes #2883.
2019-05-22Add some testsEelco Dolstra
2019-05-17Lockfile handling in `resolveFlake` is fixedNick Van den Broeck
2019-05-16Give errors in resolveFlakeNick Van den Broeck
If DontUpdate but the lockfile isn't correct
2019-05-16Fixed issue 65Nick Van den Broeck
lockfile updating
2019-05-15Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-05-15Disable tests introduced by PR #82Eelco Dolstra
This PR was not intended to be merged until those tests were actually passing. So disable them for now to unbreak the flakes branch. https://hydra.nixos.org/eval/1519271
2019-05-12build: add test for sandboxed --checkDaiderd Jordan
2019-05-09Add test for indirect flake dependenciesEelco Dolstra
I.e. flake3 depends on flake2 which depends on flake1. Currently this fails with error: indirect flake reference 'flake1' is not allowed because we're not propagating lockfiles downwards properly.
2019-05-09Add currently failing test for #81Eelco Dolstra
2019-05-08Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-05-08fix hashfile test that wasn't failing due to eval lazinessWill Dietz
See: https://github.com/NixOS/nix/commit/7becb1bf1c2ec1544a5374580a97b36273506baf#r33450554
2019-05-07Add basic flake testsEelco Dolstra
2019-05-07Fix test failures when $TMPDIR changesEelco Dolstra
2019-05-03Add builtins.hashFileDaniel Schaefer
For text files it is possible to do it like so: `builtins.hashString "sha256" (builtins.readFile /tmp/a)` but that doesn't work for binary files. With builtins.hashFile any kind of file can be conveniently hashed.
2019-04-19exportGit: Don't clone local repositoriesEelco Dolstra
This ensures that commands like 'nix flake info /my/nixpkgs' don't copy a gigabyte of crap to ~/.cache/nix. Fixes #60.
2019-04-08nix: Add --impure as a shorter alias of --no-pure-evalEelco Dolstra
2019-04-08Fix testsEelco Dolstra
2019-03-27Update eval-okay-types.exp to match #1828Eelco Dolstra
2019-03-24Add isPath primopzimbatm
this is added for completeness' sake since all the other possible `builtins.typeOf` results have a corresponding `builtins.is<Type>`
2019-03-10Update tests to the new --roots formatGuillaume Maudoux
2019-03-04Restore --init calls in testsEelco Dolstra
2019-02-22remove noop uses of nix-store --initzimbatm
the nix-store --init command is a noop apparently
2019-01-31Add builtins.appendContext.Shea Levy
A partner of builtins.getContext, useful for the same reasons.
2019-01-14Add builtins.getContext.Shea Levy
This can be very helpful when debugging, as well as enabling complex black magic like surgically removing a single dependency from a string's context.
2018-12-14tests/fetchurl: fix after changing default hash from 512 to 256Will Dietz
2018-12-13Support SRI hashesEelco Dolstra
SRI hashes (https://www.w3.org/TR/SRI/) combine the hash algorithm and a base-64 hash. This allows more concise and standard hash specifications. For example, instead of import <nix/fetchurl.nl> { url = https://nixos.org/releases/nix/nix-2.1.3/nix-2.1.3.tar.xz; sha256 = "5d22dad058d5c800d65a115f919da22938c50dd6ba98c5e3a183172d149840a4"; }; you can write import <nix/fetchurl.nl> { url = https://nixos.org/releases/nix/nix-2.1.3/nix-2.1.3.tar.xz; hash = "sha256-XSLa0FjVyADWWhFfkZ2iKTjFDda6mMXjoYMXLRSYQKQ="; }; In fixed-output derivations, the outputHashAlgo is no longer mandatory if outputHash specifies the hash (either as an SRI or in the old "<type>:<hash>" format). 'nix hash-{file,path}' now print hashes in SRI format by default. I also reverted them to use SHA-256 by default because that's what we're using most of the time in Nixpkgs. Suggested by @zimbatm.
2018-11-20Merge branch 'better-git-cache' of https://github.com/graham-at-target/nixEelco Dolstra
2018-11-07Enable sandboxing by defaultEelco Dolstra
Closes #179.
2018-10-27Restore old (dis)allowedRequisites behaviour for self-referencesEelco Dolstra
stdenv relies on this. So ignore self-references (but only in legacy non-structured attributes mode).
2018-10-23Per-output reference and closure size checksEelco Dolstra
In structured-attributes derivations, you can now specify per-output checks such as: outputChecks."out" = { # The closure of 'out' must not be larger than 256 MiB. maxClosureSize = 256 * 1024 * 1024; # It must not refer to C compiler or to the 'dev' output. disallowedRequisites = [ stdenv.cc "dev" ]; }; outputChecks."dev" = { # The 'dev' output must not be larger than 128 KiB. maxSize = 128 * 1024; }; Also fixed a bug in allowedRequisites that caused it to ignore self-references.
2018-10-08Merge pull request #2452 from ElvishJerricco/verify-sigs-overflowEelco Dolstra
Fix overflow when verifying signatures of content addressable paths
2018-09-28Check requiredSystemFeatures for local buildsEelco Dolstra
For example, this prevents a "kvm" build on machines that don't have KVM. Fixes #2012.
2018-09-25Add a test for signed content-addressed pathsWill Fancher