Commit graph

52 commits

Author SHA1 Message Date
John Ericson
33241887d1 More quote coalescing 2024-06-12 17:47:54 -04:00
Cameron Dart
b764dd9aa4 housekeeping: shellcheck for tests/functional/flakes/unlocked-override.sh 2024-06-12 17:41:16 -04:00
Cameron Dart
e1ce349d05 housekeeping: shellcheck for tests/functional/flakes/search-root.sh 2024-06-12 17:41:16 -04:00
Cameron Dart
b9768b4872 housekeeping: shellcheck for tests/functional/flakes/mercurial.sh 2024-06-12 17:41:16 -04:00
Cameron Dart
c7b3468968 housekeeping: shellcheck for tests/functional/flakes/inputs.sh 2024-06-12 17:41:16 -04:00
Cameron Dart
d95adb531e housekeeping: shellcheck for tests/functional/flakes/init.sh 2024-06-12 17:41:16 -04:00
Cameron Dart
71d5baca47 housekeeping: shellcheck for tests/functional/flakes/flake-in-submodule.sh 2024-06-12 17:41:16 -04:00
Cameron Dart
3b853e795b housekeeping: shellcheck for tests/functional/flakes/circular.sh 2024-06-12 17:41:16 -04:00
Cameron Dart
ece86b7191 housekeeping: shellcheck for tests/functional/flakes/bundle.sh 2024-06-12 17:41:16 -04:00
Cameron Dart
ee57c610ae housekeeping: shellcheck for tests/functional/flakes/build-paths.sh 2024-06-12 17:41:16 -04:00
Cameron Dart
d81fd4a1c3 housekeeping: shellcheck for tests/functional/flakes/absolute-attr-paths.sh 2024-06-12 17:41:16 -04:00
John Ericson
1e99f324d9 Fix shellcheck issue
8b86f415c1 was merged from a CI run that
predated the new linting.
2024-06-03 09:36:48 -04:00
Eelco Dolstra
ecfad6a828
Merge pull request #10564 from edolstra/remove-forceErrors
AttrCursor: Remove forceErrors
2024-06-03 15:30:01 +02:00
Jörg Thalheim
69c159811e add regression test for nix edit 2024-05-31 12:58:47 +02:00
John Ericson
10f864c5ae Ensure all functional scripts are (a) executable (b) have shebang
This is good for shebang, and also good for future build system
simplifications
2024-05-28 12:46:24 -04:00
Eelco Dolstra
8b86f415c1 Add test for the evaluation cache 2024-05-24 16:34:49 +02:00
Eelco Dolstra
9951e14ae0 Handle zip files containing symlinks
In streaming mode, libarchive doesn't handle symlinks in zip files
correctly. So write the entire file to disk so libarchive can access
it in random-access mode.

Fixes #10649. This was broken in cabee98152.
2024-05-09 19:33:09 +02:00
Eelco Dolstra
1f41682217
Update tests/functional/flakes/flakes.sh
Co-authored-by: John Ericson <git@JohnEricson.me>
2024-04-30 18:10:16 +02:00
Eelco Dolstra
f29a220b70 Test that the root of a tree produces /nix/store/<hash1>-<hash2>-source 2024-04-30 17:25:35 +02:00
Eelco Dolstra
503be57bbd Test baseNameOf behaviour on the root of a flake 2024-04-30 15:43:33 +02:00
Eelco Dolstra
458441c637 Test dirOf behaviour on the root of a flake 2024-04-30 15:34:38 +02:00
Eelco Dolstra
737ce5e81f Actually run the Mercurial tests 2024-04-08 15:21:57 +02:00
John Ericson
36d92dc80a
Merge pull request #10316 from dottharun/derivation-output-test
test: for derivation output selection with `.`
2024-04-03 10:48:04 -04:00
Tharun T
8d84de455e outputSpecified doesnt exit in top attr-set 2024-04-03 08:26:42 +05:30
Tharun T
52359ca00a move test to correct file 2024-03-28 02:20:33 +05:30
Cyclic4179
9f7b2b93ce
fixup! add flakes.sh test for shebang supported types of comments 2024-03-27 15:03:54 +01:00
Cyclic4179
6227cd06bd
add flakes.sh test for shebang supported types of comments 2024-03-27 14:55:02 +01:00
Tharun T
53c15336b0 derivation output selection test 2024-03-25 07:43:31 +05:30
Robert Hensing
73cf23275e
Merge pull request #10107 from tweag/repl-file-argument
Properly fail on flakerefs that don't point to a directory
2024-03-07 10:04:35 +01:00
Olmo Kramer
b1ad729add
Add test for nix flake update with multiple inputs 2024-03-03 13:59:39 +01:00
Théophane Hufschmitt
11a1dcc43b Properly fail on flakerefs that don't point to a directory
Directly fail if a flakeref points to something that isn't a directory
instead of falling back to the logic of trying to look up the hierarchy
to find a valid flake root.

Fix https://github.com/NixOS/nix/issues/9868
2024-03-02 10:24:20 +01:00
Eelco Dolstra
66bd1b0298 Merge remote-tracking branch 'origin/master' into pr-shell-env 2024-01-12 12:56:26 +01:00
Fabian Möller
994f1b5c0d
Add test cases for flake urls with fragments 2023-12-11 16:05:34 +01:00
Bob van der Linden
06a745120b
nix: develop: remove test for interactive shell executable 2023-11-26 21:27:46 +01:00
Théophane Hufschmitt
bf13943206
Merge pull request #9173 from vkryachko/transitive-input-overrides
Fix transitive input locking.
2023-11-23 08:54:45 +01:00
Bob van der Linden
eaa3629532
fixup! nix: develop: add tests for interactive shell 2023-11-16 15:12:31 +01:00
Bob van der Linden
ceab20d056
nix: develop: add tests for interactive shell 2023-11-16 09:37:49 +01:00
Eelco Dolstra
98a120b8b8 Merge remote-tracking branch 'origin/master' into libgit2 2023-11-09 16:48:41 +01:00
Robert Hensing
466271568b nix: Parse --file relative to shebang script 2023-11-07 13:24:01 -05:00
Robert Hensing
198bc22e3b nix: Add command baseDir to parse --expr relative to shebang script 2023-11-07 13:24:01 -05:00
Robert Hensing
20ff61ab25 nix: Reserve shebang line syntax and only parse double backtick quotes
Being restrictive about syntax leaves opportunity to improve the
syntax and functionality later.
2023-11-07 13:24:01 -05:00
Tom Bereknyei
06f3583b1c feat: break out of shebang processing for non-comments 2023-11-07 13:24:01 -05:00
Tom Bereknyei
bfcbf3b5bf doc: shebang release notes, docs, tests
fix: release notes
2023-11-07 13:24:01 -05:00
Tom Bereknyei
eea5a003d9 fix: test to ensure arguments are passed 2023-11-07 13:24:01 -05:00
Tom Bereknyei
74210c12fe Shellbang support with flakes
Enables shebang usage of nix shell. All arguments with `#! nix` get
added to the nix invocation. This implementation does NOT set any
additional arguments other than placing the script path itself as the
first argument such that the interpreter can utilize it.

Example below:

```
    #!/usr/bin/env nix
    #! nix shell --quiet
    #! nix nixpkgs#bash
    #! nix nixpkgs#shellcheck
    #! nix nixpkgs#hello
    #! nix --ignore-environment --command bash
    # shellcheck shell=bash
    set -eu
    shellcheck "$0" || exit 1
    function main {
        hello
        echo 0:"$0" 1:"$1" 2:"$2"
    }
    "$@"
```

fix: include programName usage

EDIT: For posterity I've changed shellwords to shellwords2 in order
      not to interfere with other changes during a rebase.
      shellwords2 is removed in a later commit. -- roberth
2023-11-07 13:24:01 -05:00
Eelco Dolstra
39ea46abb1 Merge remote-tracking branch 'origin/master' into libgit2 2023-11-02 16:16:37 +01:00
Eelco Dolstra
0c5eac9c45 Git fetcher: Handle submodules for workdirs 2023-10-31 15:59:25 +01:00
Felix Uhl
c7dcdb8325 Overhaul nix flake update and lock commands
Closes #5110
2023-10-31 15:33:57 +01:00
Eelco Dolstra
ee36a44bf2 GitInputScheme: Use libgit2
This replaces most calls to the "git" binary with libgit2.
2023-10-31 14:52:21 +01:00
Vladimir Kryachko
311e2ad024 Address review comments 2023-10-18 10:37:06 -04:00