Skip to content
This repository was archived by the owner on May 28, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Here's an example:
processTrees = forEachSupportedSystem (
{ pkgs, system }:
{
postgres = pkgs.lib.mkProcessTree {
postgres = pkgs.up.mkProcessTree {
description = "Run Postgres locally";

packages = with pkgs; [
Expand Down Expand Up @@ -148,7 +148,7 @@ Here's how you can create a task runner in your flake:
taskRunners = forEachSupportedSystem (
{ pkgs, system }:
{
work = pkgs.lib.mkTaskRunner {
work = pkgs.up.mkTaskRunner {
name = "work";
description = "Run linters and formatters";
packages = with pkgs; [
Expand Down Expand Up @@ -238,7 +238,7 @@ The function converts each task into a proper Bash script using [`writeShellAppl
Here's an example:

```nix
pkgs.lib.mkTaskRunner {
pkgs.up.mkTaskRunner {
name = "rt";
description = "Rust development tasks 🦀";
environment.RUST_LOG = "trace";
Expand Down Expand Up @@ -290,13 +290,13 @@ Here's an example:

### Benchmark tasks

Up has a special function called `mkBenchmarkTask` that generates benchmarking tasks that use [hyperfine].
Up has a special function called `mkBenchmark` that generates benchmarking tasks that use [hyperfine].
Here's an example task:

```nix
{
run-benchmarks =
pkgs.lib.mkBenchmarkTask {
pkgs.up.mkBenchmark {
description = "Benchmark the CLI";
after = [ "build" ];
commands = [
Expand Down Expand Up @@ -335,7 +335,7 @@ Here's an example task:

```nix
{
rebuild-site = pkgs.lib.mkWatch {
rebuild-site = pkgs.up.mkWatch {
description = "Rebuild site upon change";
packages = [ pkgs.pnpm ];
command = "pnpm run build";
Expand Down Expand Up @@ -392,7 +392,7 @@ Here's an example:

```nix
let
procs = pkgs.lib.mkTool {
procs = pkgs.up.mkTool {
name = "procs";
tool = pkgs.bottom;
args = [
Expand Down
16 changes: 8 additions & 8 deletions example/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions example/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@
outputs =
{ self, ... }@inputs:
let
inherit (inputs.nixpkgs) lib;

supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];

forEachSupportedSystem =
f:
inputs.nixpkgs.lib.genAttrs supportedSystems (
lib.genAttrs supportedSystems (
system:
f {
inherit system;
Expand Down Expand Up @@ -51,7 +54,7 @@
processTrees = forEachSupportedSystem (
{ pkgs, system }:
{
dev = pkgs.lib.mkProcessTree {
dev = pkgs.up.mkProcessTree {
name = "dev";
aliases = [ "d" ];

Expand Down Expand Up @@ -93,7 +96,7 @@
taskRunners = forEachSupportedSystem (
{ pkgs, ... }:
{
proto = pkgs.lib.mkTaskRunner {
proto = pkgs.up.mkTaskRunner {
name = "proto";
description = "Protobuf-related tasks";

Expand Down Expand Up @@ -149,7 +152,7 @@
aliases = [ "l" ];
command = "buf lint";
};
watch-gen = pkgs.lib.mkWatch {
watch-gen = pkgs.up.mkWatch {
description = "Regenerate stubs on .proto change";
aliases = [
"w"
Expand Down
12 changes: 6 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
lib = import ./lib;

overlays.default = final: prev: {
lib =
prev.lib
// (self.lib {
inherit (prev) lib;
pkgs = prev;
});
up = (
import ./lib {
inherit (final) lib;
pkgs = final;
}
);
};

schemas = {
Expand Down
2 changes: 1 addition & 1 deletion lib/benchmark.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

assert lib.assertMsg (
runs == null || (minRuns == null && maxRuns == null)
) "mkBenchmarkTask: 'runs' and 'minRuns'/'maxRuns' are mutually exclusive";
) "mkBenchmark: 'runs' and 'minRuns'/'maxRuns' are mutually exclusive";

let
esc = lib.escapeShellArg;
Expand Down
2 changes: 1 addition & 1 deletion lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ let
taskModule = import ./task.nix { inherit lib mkScript pkgs; };
in
{
mkBenchmarkTask = import ./benchmark.nix {
mkBenchmark = import ./benchmark.nix {
inherit
lib
pkgs
Expand Down