-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into staging-next
- Loading branch information
Showing
45 changed files
with
3,455 additions
and
2,525 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
...oc/manual/installation/building-images-via-nixos-rebuild-build-image.chapter.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Building Images with `nixos-rebuild build-image` {#sec-image-nixos-rebuild-build-image} | ||
|
||
Nixpkgs contains a variety of modules to build custom images for different virtualization platforms and cloud providers, such as e.g. `amazon-image.nix` and `proxmox-lxc.nix`. | ||
|
||
While those can be imported individually, `system.build.images` provides an attribute set mapping variant names to image derivations. Available variants are defined - end extendable - in `image.modules`, an attribute set mapping variant names to a list of NixOS modules. | ||
|
||
All of those images can be built via both, their `system.build.image` attribute, and the CLI `nixos-rebuild build-image`. To build i.e. an Amazon image from your existing NixOS configuration: | ||
|
||
```ShellSession | ||
$ nixos-rebuild build-image --image-variant amazon | ||
$ ls result | ||
nixos-image-amazon-25.05pre-git-x86_64-linux.vhd nix-support | ||
``` | ||
|
||
To get a list of all variants available, run `nixos-rebuild build-image` without arguments. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
pkgs/applications/networking/cluster/k3s/1_28/chart-versions.nix
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
pkgs/applications/networking/cluster/k3s/1_28/images-versions.json
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
pkgs/applications/networking/cluster/k3s/1_28/versions.nix
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"name": "awk-language-server", | ||
"description": "AWK Language Server", | ||
"version": "0.10.6", | ||
"author": "Stanislav Chernov <[email protected]>", | ||
"publisher": "beaglefoot", | ||
"license": "MIT", | ||
"keywords": [ | ||
"language-server", | ||
"language-server-protocol", | ||
"lsp", | ||
"awk", | ||
"gawk" | ||
], | ||
"engines": { | ||
"node": ">=16.0.0" | ||
}, | ||
"bin": "./server/out/cli.js", | ||
"main": "./server/out/server.js", | ||
"typings": "./server/out/server.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Beaglefoot/awk-language-server" | ||
}, | ||
"dependencies": { | ||
"minimist": "1.2.6", | ||
"tree-sitter-awk": "0.7.2", | ||
"vscode-languageserver": "^7.0.0", | ||
"vscode-languageserver-textdocument": "^1.0.1", | ||
"web-tree-sitter": "0.22.1" | ||
}, | ||
"devDependencies": { | ||
"@types/minimist": "1.2.2", | ||
"@types/jest": "27.0.1", | ||
"@types/node": "^12.12.0", | ||
"jest": "27.1.1", | ||
"prettier": "2.3.2", | ||
"ts-jest": "27.0.5", | ||
"typescript": "^4.3.2" | ||
}, | ||
"scripts": { | ||
"build:completion": "man gawk | gawk -f scripts/build_completion_list.awk > docs.json", | ||
"prepublishOnly": "cd .. && yarn build:server:force", | ||
"clean:client": "rm -rfv client/out/*", | ||
"clean:server": "rm -rfv server/out/*", | ||
"build": "yarn build:server && yarn build:client", | ||
"build:client": "tsc -b client/tsconfig.json", | ||
"build:client:force": "yarn clean:client && yarn build:client --verbose --force", | ||
"build:server": "tsc -b server/tsconfig.json", | ||
"build:server:force": "yarn clean:server && yarn build:server --verbose --force", | ||
"postinstall": "cd client && yarn && cd ../server && yarn && cd ..", | ||
"test": "jest", | ||
"test:server": "jest server/tests", | ||
"test:ci": "jest --runInBand", | ||
"check:types": "tsc --noEmit -p server/tsconfig.json", | ||
"check:style": "prettier --check **/*.ts" | ||
}, | ||
"private": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
lib, | ||
mkYarnPackage, | ||
fetchYarnDeps, | ||
fetchFromGitHub, | ||
jq, | ||
}: | ||
|
||
mkYarnPackage rec { | ||
name = "awk-language-server"; | ||
version = "0.10.6"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "Beaglefoot"; | ||
repo = "awk-language-server"; | ||
rev = "server-${version}"; | ||
hash = "sha256-YtduDfMAUAoQY9tgyhgERFwx9TEgD52KdeHnX2MrjjI="; | ||
sparseCheckout = [ "server" ]; | ||
postFetch = '' | ||
# combine both yarn lock files | ||
tail -n+4 $out/server/yarn.lock >> $out/yarn.lock | ||
# recontextualize server/package.json to be one folder up | ||
sed -i 's|\./|./server/|' $out/server/package.json | ||
# combine both package.json files | ||
${lib.getExe jq} -s '.[0] * .[1]' \ | ||
$out/server/package.json \ | ||
$out/package.json \ | ||
> package.json | ||
mv -f package.json $out/ | ||
''; | ||
}; | ||
|
||
packageJSON = ./package.json; | ||
yarnLock = ./yarn.lock; | ||
|
||
offlineCache = fetchYarnDeps { | ||
yarnLock = ./yarn.lock; | ||
hash = "sha256-PaebqpXQGBxqcaxun8zi6TPeIgHmY+2fjsE/3LaWPN8="; | ||
}; | ||
|
||
distPhase = "true"; | ||
|
||
buildPhase = '' | ||
runHook preBuild | ||
export HOME=$(mktemp -d) | ||
yarn --offline build:server | ||
runHook postBuild | ||
''; | ||
|
||
postInstall = '' | ||
chmod +x $out/bin/awk-language-server | ||
''; | ||
|
||
passthru.updateScript = ./update.sh; | ||
|
||
meta = with lib; { | ||
description = "Language Server for AWK and associated VSCode client extension"; | ||
homepage = "https://github.com/Beaglefoot/awk-language-server"; | ||
license = licenses.mit; | ||
maintainers = with maintainers; [ mathiassven ]; | ||
mainProgram = "awk-language-server"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env nix-shell | ||
#!nix-shell -i bash -p common-updater-scripts coreutils gnused prefetch-yarn-deps | ||
|
||
set -e | ||
|
||
# update src version and hash | ||
version="$(list-git-tags | sort -V | tail -1 | sed 's|server-||')" | ||
|
||
update-source-version awk-language-server "$version" | ||
|
||
# update vendored yarn.lock & package.json | ||
newSrc="$(nix-build --no-out-link -A awk-language-server.src)" | ||
|
||
nixFile="$(nix-instantiate --eval --strict -A 'awk-language-server.meta.position' \ | ||
| sed -re 's/^"(.*):[0-9]+"$/\1/')" | ||
|
||
nixFileDir="$(dirname "$nixFile")" | ||
|
||
cp --force --no-preserve=mode "$newSrc"/{yarn.lock,package.json} "$nixFileDir/" | ||
|
||
# update offlineCache hash | ||
oldCacheSriHash="$(nix-instantiate --eval --strict \ | ||
-A 'awk-language-server.offlineCache.drvAttrs.outputHash')" | ||
|
||
newCacheHash="$(prefetch-yarn-deps "$nixFileDir/yarn.lock")" | ||
|
||
newCacheSriHash="$(nix-hash --to-sri --type sha256 "$newCacheHash")" | ||
|
||
sed -i "s|$oldCacheSriHash|\"$newCacheSriHash\"|" "$nixFile" | ||
|
Oops, something went wrong.