{ description = "Dobble / Spot It card generator - produces printable PDFs from images"; 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 = nixpkgs.legacyPackages.${system}; python = pkgs.python3; pythonWithDeps = python.withPackages (ps: [ ps.reportlab ps.pillow ]); dobble = pkgs.writeShellScriptBin "dobble" '' exec ${pythonWithDeps}/bin/python3 ${./dobble.py} "$@" ''; in { packages = { dobble = dobble; default = dobble; }; apps.default = { type = "app"; program = "${dobble}/bin/dobble"; }; } ); }