This file contains hidden or 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
{ | |
apps = { | |
# nix run <flake>#server | |
server = { | |
type = "app"; | |
program = "${myPkg}/bin/server"; | |
}; | |
# nix run <flake>#client | |
client = { |
This file contains hidden or 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
nix run <flake>#my-linter | |
nix run <flake>#my-checker | |
# If the flake were in the current directory | |
nix run .#my-linter | |
nix run .#my-checker | |
# If the flake were in a GitHub repo | |
nix run github:my-org/my-repo#my-linter | |
nix run github:my-org/my-repo#my-checker |
This file contains hidden or 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
{ | |
apps = { | |
my-linter = { | |
type = "app"; | |
program = "${myLinter}/bin/my-linter"; | |
}; | |
my-checker = { | |
type = "app"; | |
program = "${myChecker}/bin/my-checker"; |
This file contains hidden or 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
{ | |
apps.default = { | |
type = "app"; | |
program = "${myPkg}/bin/my-pkg"; | |
# Assuming there's a local derivation called myPkg | |
}; | |
} |
This file contains hidden or 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
- name: Prettify repo code | |
uses: creyD/[email protected] | |
with: | |
prettier_options: --write **/*.{js,jsx,ts,tsx} | |
only_changed: true |
This file contains hidden or 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
[package.metadata.riff] | |
build-inputs = ["protobuf"] | |
[package.metadata.riff.targets.aarch64-apple-darwin] | |
build-inputs = ["darwin.apple_sdk.frameworks.CoreServices"] | |
[package.metadata.riff.targets.x86_64-apple-darwin] | |
build-inputs = ["darwin.apple_sdk.frameworks.CoreServices"] |
This file contains hidden or 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
{ | |
devShells.default = pkgs.mkShell { | |
buildInputs = with pkgs; [ go_1_19 terraform ]; | |
}; | |
} |
This file contains hidden or 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
{ | |
# Inputs omitted for brevity | |
outputs = { ... }: { | |
devShells.default = pkgs.mkShell { | |
buildInputs = with pkgs; [ node2nix nodejs pnpm yarn ]; | |
shellHook = '' | |
echo "node `${pkgs.nodejs}/bin/node --version`" | |
''; |
This file contains hidden or 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
final: prev: { | |
qemu = prev.qemu.overrideAttrs (o: { | |
patches = o.patches ++ [ (prev.fetchpatch { | |
name = "qemu-9p-performance-fix.patch"; | |
url = "https://gitlab.com/lheckemann/qemu/-/commit/ca8c4a95a320dba9854c3fd4159ff4f52613311f.patch"; | |
sha256 = "sha256-9jYpGmD28yJGZU4zlae9BL4uU3iukWdPWpSkgHHvOxI="; | |
}) ]; | |
}); | |
} |
This file contains hidden or 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
static V9fsFidState *coroutine_fn get_fid(V9fsPDU *pdu, int32_t fid) | |
{ | |
int err; | |
V9fsFidState *f; | |
V9fsState *s = pdu->s; | |
// Blog note: I've omitted some parts that are irrelevant to performance here. | |
QSIMPLEQ_FOREACH(f, &s->fid_list, next) { | |
if (f->fid == fid) { | |
return f; |