diff options
| author | Domen Kožar <domen@dev.si> | 2023-04-29 14:58:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-29 14:58:27 +0200 |
| commit | 379d42fad6bc5c28f79d5f7ff2fa5f1c90cb7bf8 (patch) | |
| tree | 5807f5c394dff47aa6d177063da7e4a9b50811be | |
| parent | a1ee4d333b092bc055655fb06229eb3013755812 (diff) | |
| parent | 597c723f1c2b70697f1de84802c25daaf22a166c (diff) | |
Merge pull request #600 from konradmalik/uri-builder-fix
fix: add '://' to built flake uri
| -rw-r--r-- | .github/workflows/test.yml | 4 | ||||
| -rw-r--r-- | pkgs/nix-tools/darwin-rebuild.sh | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cab17e8..21976df 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -114,3 +114,7 @@ jobs: darwin-rebuild build \ --flake /tmp/test-nix-darwin-submodules?submodules=1#simple \ --override-input darwin . + # Should also succeed + darwin-rebuild build \ + --flake git+file:///tmp/test-nix-darwin-submodules?submodules=1#simple \ + --override-input darwin . diff --git a/pkgs/nix-tools/darwin-rebuild.sh b/pkgs/nix-tools/darwin-rebuild.sh index 25d704f..ca0b266 100644 --- a/pkgs/nix-tools/darwin-rebuild.sh +++ b/pkgs/nix-tools/darwin-rebuild.sh @@ -123,9 +123,9 @@ flakeFlags=(--extra-experimental-features 'nix-command flakes') if [ -n "$flake" ]; then # Offical regex from https://www.rfc-editor.org/rfc/rfc3986#appendix-B if [[ "${flake}" =~ ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? ]]; then - scheme=${BASH_REMATCH[2]} - authority=${BASH_REMATCH[4]} - path=${BASH_REMATCH[5]} + scheme=${BASH_REMATCH[1]} # eg. http: + authority=${BASH_REMATCH[3]} # eg. //www.ics.uci.edu + path=${BASH_REMATCH[5]} # eg. /pub/ietf/uri/ queryWithQuestion=${BASH_REMATCH[6]} fragment=${BASH_REMATCH[9]} |
