aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2020-04-08Merge pull request #3468 from Infinisil/functionArgsPositionsEelco Dolstra
Make function arguments retain position info
2020-04-07Merge branch 'fetchgit-recursive' of https://github.com/blitz/nixEelco Dolstra
2020-04-07Backport libfetchers from the flakes branchEelco Dolstra
This provides a pluggable mechanism for defining new fetchers. It adds a builtin function 'fetchTree' that generalizes existing fetchers like 'fetchGit', 'fetchMercurial' and 'fetchTarball'. 'fetchTree' takes a set of attributes, e.g. fetchTree { type = "git"; url = "https://example.org/repo.git"; ref = "some-branch"; rev = "abcdef..."; } The existing fetchers are just wrappers around this. Note that the input attributes to fetchTree are the same as flake input specifications and flake lock file entries. All fetchers share a common cache stored in ~/.cache/nix/fetcher-cache-v1.sqlite. This replaces the ad hoc caching mechanisms in fetchGit and download.cc (e.g. ~/.cache/nix/{tarballs,git-revs*}). This also adds support for Git worktrees (c169ea59049f861aaba429f48b828d0820b74d1d).
2020-04-02Make function arguments retain position infoSilvan Mosberger
This allows querying the location of function arguments. E.g. builtins.unsafeGetAttrPos "x" (builtins.functionArgs ({ x }: null)) => { column = 57; file = "/home/infinisil/src/nix/inst/test.nix"; line = 1; }
2020-03-30Remove global -I flagsEelco Dolstra
(cherry picked from commit 2c692a3b144523bca68dd6de618124ba6c9bb332)
2020-03-29tests/fetchGitSubmodules.sh: more checksBjørn Forsman
2020-03-29fetchGit: fix submodule output attributeBjørn Forsman
Before this change it would be false for all evaluations but the first. Now it follows the input argument (as it should).
2020-03-29tests/fetchGitSubmodules: add more testsBjørn Forsman
2020-03-29Fix typo in submodule testJulian Stecklina
2020-03-29Rename fetchGit fetchSubmodules to just submodulesJulian Stecklina
2020-03-29Add more test for git submodule functionalityJulian Stecklina
2020-03-29Add git submodule fixes from @bjornforJulian Stecklina
This fixes fetching repositories with no submodules and also cleans up .git files in checkouts.
2020-03-29Add test for fetchGit submodule supportJulian Stecklina
2020-03-24Misc changes from the flakes branchEelco Dolstra
2020-03-24Pretty-print 'nix why-depends' / 'nix-store -q --tree' outputEelco Dolstra
Extracted from 678301072f05b650dc15c5edb4c25f08f0d6cace.
2020-03-11Move some corepkgs into the nix binaryEelco Dolstra
2020-03-04Add test for foldl'Eelco Dolstra
2020-01-21Fix derivation computation with __structuredAttrs and multiple outputsEelco Dolstra
Fixes error: derivation '/nix/store/klivma7r7h5lndb99f7xxmlh5whyayvg-zlib-1.2.11.drv' has incorrect output '/nix/store/fv98nnx5ykgbq8sqabilkgkbc4169q05-zlib-1.2.11-dev', should be '/nix/store/adm7pilzlj3z5k249s8b4wv3scprhzi1-zlib-1.2.11-dev'
2020-01-07Add support for \u escape in fromJSONNikola Knezevic
As fromTOML supports \u and \U escapes, bring fromJSON on par. As JSON defaults to UTF-8 encoding (every JSON parser must support UTF-8), this change parses the `\u hex hex hex hex` sequence (\u followed by 4 hexadecimal digits) into an UTF-8 representation. Add a test to verify correct parsing, using all escape sequences from json.org.
2020-01-02passAsFile: leave out the hash prefixedef
Having a colon in the path may cause issues, and having the hash function indicated isn't actually necessary. We now verify the path format in the tests to prevent regressions.
2019-12-16nix-store -r: Handle symlinks to store pathsEelco Dolstra
Fixes #3270.
2019-12-13Validate tarball componentsEelco Dolstra
2019-12-13Simplify tarball testEelco Dolstra
2019-12-13Initial gzip supportTom Bereknyei
Closes #3256
2019-12-10Add base32 encoder/decoderEelco Dolstra
2019-12-03Disable recursive Nix test on macOSEelco Dolstra
https://hydra.nixos.org/build/107724274
2019-12-02Merge remote-tracking branch 'origin/recursive-nix'Eelco Dolstra
2019-11-26Remove most of <nix/config.nix>Eelco Dolstra
This is no longer needed.
2019-11-26Merge pull request #3238 from puckipedia/attrset-overrides-dynamicEelco Dolstra
Ensure enough space in attrset bindings
2019-11-26Disallow empty store path namesEelco Dolstra
Fixes #3239.
2019-11-25Add testcase for attrset using __overrides and dynamic attrsPuck Meerburg
2019-11-08Replace $TMPDIR with $TEST_ROOT in tests/fetchurl.shEric Culp
$TMPDIR isn't necessarily set and would cause this test to fail.
2019-11-06Enable recursive Nix using a featureEelco Dolstra
Derivations that want to use recursion should now set requiredSystemFeatures = [ "recursive-nix" ]; to make the daemon socket appear. Also, Nix should be configured with "experimental-features = recursive-nix".
2019-11-06Add a test for recursive NixEelco Dolstra
2019-11-05Fix VM testsEelco Dolstra
2019-10-27Merge branch 'issue-3147-inNixShell-arg' of https://github.com/hercules-ci/nixEelco Dolstra
2019-10-27Add inNixShell = true to nix-shell auto-callRobert Hensing
This is an alternative to the IN_NIX_SHELL environment variable, allowing the expression to adapt itself to nix-shell without triggering those adaptations when used as a dependency of another shell. Closes #3147
2019-10-27Merge branch 'tojson-tostring-fix' of https://github.com/mayflower/nixEelco Dolstra
2019-10-27builtins.toJSON: fix __toString usageRobin Gloster
2019-10-21Add experimental-features settingEelco Dolstra
Experimental features are now opt-in. There is currently one experimental feature: "nix-command" (which enables the "nix" command. This will allow us to merge experimental features more quickly, without committing to supporting them indefinitely. Typical usage: $ nix build --experimental-features 'nix-command flakes' nixpkgs#hello (cherry picked from commit 8e478c234100cf03ea1b777d4bd42a9be7be9e8c, without the "flakes" feature)
2019-10-09nix-env: Create ~/.nix-profile automaticallyEelco Dolstra
2019-10-09nix-profile.sh: Don't create .nix-channelsEelco Dolstra
This is already done by the installer, so no need to do it again.
2019-10-09Remove world-writability from per-user directoriesEelco Dolstra
'nix-daemon' now creates subdirectories for users when they first connect. Fixes #509 (CVE-2019-17365). Should also fix #3127.
2019-09-18function-trace: always show the tracezimbatm
If the user invokes nix with --trace-function-calls it means that they want to see the trace.
2019-09-04gc-auto.sh: Increase sleep timeEelco Dolstra
2019-09-03gc-auto.sh: More test fixesEelco Dolstra
2019-09-03gc-auto.sh: Add some more instrumentationEelco Dolstra
2019-08-29Don't rely on st_blocksEelco Dolstra
It doesn't seem very reliable on ZFS.
2019-08-29Maybe fix #3058Eelco Dolstra
2019-08-29Add some more instrumentationEelco Dolstra