Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/infinisil/nix-quote-urls
Utility against unquoted Nix URIs
https://github.com/infinisil/nix-quote-urls
nix uri
Last synced: about 2 months ago
JSON representation
Utility against unquoted Nix URIs
- Host: GitHub
- URL: https://github.com/infinisil/nix-quote-urls
- Owner: infinisil
- License: mit
- Created: 2019-05-04T19:27:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-02T04:43:11.000Z (over 4 years ago)
- Last Synced: 2024-10-10T23:41:16.689Z (2 months ago)
- Topics: nix, uri
- Language: Haskell
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.org
- License: LICENSE
Awesome Lists containing this project
README
* nix-quote-urls
This is a simple program to quote all URLs in Nix files, written for [[https://github.com/NixOS/rfcs/pull/45][RFC45]]. It uses [[https://github.com/haskell-nix/hnix][hnix]] to parse the files. It can verify/fixup all of nixpkgs in ~25 seconds on my machine.
#+BEGIN_SRC source
nix-quote-urls - a helper against unquoted Nix urlsUsage: nix-quote-urls COMMAND
Verify or fixup unquoted URLs in PATHAvailable options:
-h,--help Show this help textAvailable commands:
fixup Fixup files/directories by quoting all urls
verify Verify files/directories to not have any unquoted
urls
#+END_SRC#+BEGIN_SRC bash
$ cat test.nix
{ foo = https://example.com; }
$ alias nix-quote-urls="$(nix-build --no-out-link \
https://github.com/infinisil/nix-quote-urls/tarball/master)/bin/nix-quote-urls"
$ nix-quote-urls fixup test.nix
Processing file test.nix
Inserting quotes on line 0 at columns 8, 27
$ cat test.nix
{ foo = "https://example.com"; }
#+END_SRC