Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 893b080e5628
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 308d7809d36a
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Aug 7, 2018

  1. vscode-extensions: script to generate Nix for "latest" version of all…

    … installed vscode extensions
    
    Added better practices to update_exts script.
    
    Use `jq` instead of `grep` for more reliable JSON querying.
    
    Check for 404 when requesting package.json information to avoid mangled
    output.
    
    Added proper failure points for missing vscode package, unknown version,
    and if the code executable couldn't be found.
    
    Switched to using a `nix-shell` shebang for even better reliability and
    use the `sh` shell to be that little bit more generic.
    
    Script is still clunky and sequential, anything more and I'd need to
    write a proper program to do this and that's getting a bit silly? But
    people that have a dozen or so extensions might be in for a long wait.
    
    Be explicit about using bash
    
    Improve the use of jq to remove unnecessary use of tr. Hat-tip coretemp.
    
    Add some comments, finally.
    
    Remove the `fetch` function.
    
    Change the `get_ver` function to more accurately demonstrate what it is trying
    to do, as well as add in some better error handling for non-200 http responses.
    
    I couldn't make the bash `${param/search/replacement}` work for chopping up the
    response in the `get_ver` function, hence the use of `sed`. Hopefully it all
    makes a bit more sense now.
    
    Remove github requests.
    
    VSIXPackage is just a zip format in disguise so use a tmpdir and unpackage the
    package.json file for the file in question so we can get the precise version
    that we're interested in without additional redundant calls to github that may
    not provide the right answer anyway.
    
    Add trap to try to clean up the temp folders and clean up as we go.
    
    I can't use 'fetchurl' or even 'nix-prefetch-url' because for the former we
    don't yet know the hash that we're after and for the latter there isn't a way to
    tie the predownloaded file into the next part of the workflow.
    
    Prevent an unnecessary file from being extracted.
    
    Change the unzip command to read the file we're after to stdout so we can use jq
    on it directly instead of creating a file, reading it, then deleting it.
    
    Courtesy of worldofpeace, remove the dependency on coreutils and use the
    provided nix-hash function to generate the required hash.
    
    Fix up a comment
    
    Remove use of 'awk' and clean up individual Nix printing with cat to EOF expression.
    mankyKitty committed Aug 7, 2018
    Configuration menu
    Copy the full SHA
    9321785 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #44292 from mankyKitty/vscode-exts-update-script

    vscode-extensions: Script to generate Nix for "latest" version of all installed vscode extensions
    infinisil committed Aug 7, 2018
    Configuration menu
    Copy the full SHA
    308d780 View commit details
    Browse the repository at this point in the history