46 lines
1.3 KiB
Nix
46 lines
1.3 KiB
Nix
{
|
|
description = "Dev env for Catppuccin Mocha LUT: ImageMagick + Python (Pillow) with a generator tool";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
# Python environment with Pillow
|
|
pythonEnv = pkgs.python3.withPackages (ps: [ ps.pillow ]);
|
|
|
|
# Small helper that writes the LUT (256x1), a preview, and a palette.txt
|
|
|
|
in {
|
|
# `nix develop` (or `nix-shell` via legacy) drops you into this environment
|
|
devShells.default = pkgs.mkShell {
|
|
packages = [
|
|
# ImageMagick: on most channels this provides `magick` (v7). If not, you'll have `convert`.
|
|
pkgs.imagemagick
|
|
pythonEnv
|
|
];
|
|
shellHook = ''
|
|
echo
|
|
echo "Catppuccin Mocha dev shell ready."
|
|
echo "Generate assets into current dir:"
|
|
echo " make-mocha-assets ."
|
|
echo
|
|
'';
|
|
};
|
|
|
|
# So you can also `nix run .` to execute the generator
|
|
|
|
apps.default = {
|
|
type = "app";
|
|
};
|
|
|
|
formatter = pkgs.nixpkgs-fmt;
|
|
}
|
|
);
|
|
}
|
|
|