Go to file
Sean Chalmers 9321785bab 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.
2018-08-07 10:14:57 +10:00
.github .github/CODEOWNERS: add basvandijk to Haskell 2018-07-23 12:52:22 +02:00
doc dockerTools.pullImage: control OS and architecture 2018-07-27 12:29:31 -07:00
lib systems: fix netbsd triple parsing 2018-07-28 19:54:09 -04:00
maintainers maintainers: add @borisbabic 2018-07-31 13:58:01 +02:00
nixos nixos/manual: fix inclusion of FoundationDB documentation 2018-07-30 18:30:40 -05:00
pkgs vscode-extensions: script to generate Nix for "latest" version of all installed vscode extensions 2018-08-07 10:14:57 +10:00
.dir-locals.el .dir-locals.el: init 2018-07-06 12:48:43 -04:00
.editorconfig Revert ".version: remove final newline" 2018-04-28 14:23:13 +02:00
.gitattributes gitattributes: disable merge=union in all-packages 2018-03-27 11:03:03 -05:00
.gitignore kde5: consolidate packages into desktops/kde-5 2016-03-01 10:36:00 -06:00
.version Revert ".version: remove final newline" 2018-04-28 14:23:13 +02:00
COPYING 2018 will be the year of NixOS 2018-01-04 17:59:52 -05:00
default.nix Update message to reflect nix 2.0 availability of imperative nix-update (#36123) 2018-06-25 00:35:06 +02:00
README.md README: 17.09 -> 18.03 2018-04-04 09:48:35 +02:00

logo

Code Triagers Badge

Nixpkgs is a collection of packages for the Nix package manager. It is periodically built and tested by the Hydra build daemon as so-called channels. To get channel information via git, add nixpkgs-channels as a remote:

% git remote add channels git://github.com/NixOS/nixpkgs-channels.git

For stability and maximum binary package support, it is recommended to maintain custom changes on top of one of the channels, e.g. nixos-18.03 for the latest release and nixos-unstable for the latest successful build of master:

% git remote update channels
% git rebase channels/nixos-18.03

For pull-requests, please rebase onto nixpkgs master.

NixOS Linux distribution source code is located inside nixos/ folder.

Communication: