Skip to content

Instantly share code, notes, and snippets.

View lucperkins's full-sized avatar
🎯
Focusing

Luc Perkins lucperkins

🎯
Focusing
View GitHub Profile
nix develop --command npm run build
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
go_1_18
nodePackages.prettier
cargo
python38
openssl
];
};
- name: Prettify repo code
uses: creyD/prettier_action@v4.2
with:
prettier_options: --write **/*.{js,jsx,ts,tsx}
only_changed: true
{
description = "Dev env with prettier";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells.default = pkgs.mkShell {
github:DeterminateSystems/riff/a54624ac12aa2c125d8891d124519fba17aa2016
│├───defaultPackage │
││ ├───aarch64-darwin: package 'riff-1.0.2' │
││ ├───aarch64-linux: package 'riff-1.0.2' │
││ ├───x86_64-darwin: package 'riff-1.0.2'
# 🚫 BAD
nix run github:kinda-sketch/could-be-a-bitcoin-miner
# ✅ BETTER (if you've already vetted the code for this commit)
nix run github:kinda-sketch/could-be-a-bitcoin-miner/0a8e7a241db7938b10062218309ba30f6d9f0e2d
# Syntax
nix run github:<owner>/<repo>/<revision>#<executable>
# Examples
## Specific commit ID
nix run github:DeterminateSystems/riff/a71a8b5ddf680df5db8cc17fa7fddd393ee39ffe
## Tag
nix run github:omnicorp/runme
nix run github:omnicorp/runme#runme # Equivalent to the above
nix run github:omnicorp/runme#runme-lint
{
description = "runme application";
inputs = {
nixpkgs.url = "nixpkgs"; # Resolves to github:NixOS/nixpkgs
# Helpers for system-specific outputs
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
{
apps = {
# nix run <flake>#server
server = {
type = "app";
program = "${myPkg}/bin/server";
};
# nix run <flake>#client
client = {