More cows, optionally rendered as images!
You can run this flake's packages without committing to installing them by using the following commands.
nix run github:snowfallorg/cowsay -- "Hello, World"
nix run github:snowfallorg/cowsay#cow2img
First, include this flake as an input in your flake.
{
description = "My awesome flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Snowfall Lib is not required, but will make configuration easier for you.
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};
cowsay = {
url = "github:snowfallorg/cowsay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}
Then add the overlay or use the packages from this flake directly.
{
description = "My awesome flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Snowfall Lib is not required, but will make configuration easier for you.
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};
cowsay = {
url = "github:snowfallorg/cowsay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs:
inputs.snowfall-lib.mkFlake {
inherit inputs;
src = ./.;
overlays = with inputs; [
# To make this flake's packages available in your NixPkgs package set.
cowsay.overlays.default
# There are also individual overlays for specific packages.
cowsay.overlays."package/cow2img"
cowsay.overlays."package/cowsay"
];
outputs-builder = channels:
let
inherit (channels.nixpkgs) system;
# Use packages directly from the input instead.
inherit (inputs.cowsay.packages.${system}) cowsay cow2img;
in {
# Use the packages in some way.
};
};
}
The cowsay
package in this flake acts as a wrapper for the original cowsay
command.
However, instead of displaying a cow it will display a random image each time. Use it just
like the normal cowsay
command.
cowsay "Hello, World"
The cow2img
package in this flake will render the output of fortune
and cowsay
to
an image. See the following for help information.
cow2img
USAGE
cow2img [options]
OPTIONS
-h, --help Show this help message
-c, --cow <cowfile> Use a specific cow file
-m, --message <text> Use a specific message
-p, --pick Pick a cow from a list
EXAMPLES
$ # Render a random cow and quote.
$ cow2img
$ # Render a cow with a specific message.
$ cow2img --message "Hello, World!"
$ # Render a specific cow.
$ cow2img --cow ./my.cow
$ # Pick a cow.
$ cow2img --pick