diff options
Diffstat (limited to 'Biz')
| -rwxr-xr-x | Biz/Dragons/Analysis.nix | 35 | ||||
| -rw-r--r-- | Biz/Packages.nix | 15 | ||||
| -rw-r--r-- | Biz/Targets.nix | 19 |
3 files changed, 33 insertions, 36 deletions
diff --git a/Biz/Dragons/Analysis.nix b/Biz/Dragons/Analysis.nix index de641e8..b0e0cc9 100755 --- a/Biz/Dragons/Analysis.nix +++ b/Biz/Dragons/Analysis.nix @@ -1,18 +1,19 @@ #!/usr/bin/env run.sh -{bild}: let - targets = import ../Targets.nix {inherit bild;}; -in - # Run this like so: - # - # bild Biz/Dragons/Analysis.nix - # docker load < _/nix/Biz/Dragons/Analysis.nix - # docker run --volume $PWD:/src dragons-analyze dragons-analyze /src/.git - bild.image { - name = "dragons-analyze"; - tag = "latest"; - fromImage = null; - fromImageName = null; - fromImageTag = "latest"; - contents = [bild.pkgs.git targets.dragons-analysis]; - config.Cmd = ["/bin/dragons-analyze"]; - } +{ + bild, + packages ? import ../Packages.nix {inherit bild;}, +}: +# Run this like so: +# +# bild Biz/Dragons/Analysis.nix +# docker load < _/nix/Biz/Dragons/Analysis.nix +# docker run --volume $PWD:/src dragons-analyze dragons-analyze /src/.git +bild.image { + name = "dragons-analyze"; + tag = "latest"; + fromImage = null; + fromImageName = null; + fromImageTag = "latest"; + contents = [bild.pkgs.git packages.dragons-analysis]; + config.Cmd = ["/bin/dragons-analyze"]; +} diff --git a/Biz/Packages.nix b/Biz/Packages.nix new file mode 100644 index 0000000..6b17fe5 --- /dev/null +++ b/Biz/Packages.nix @@ -0,0 +1,15 @@ +# Build all Biz packages independently, outside NixOS context. +# +# This file builds all Biz packages and returns them as an attribute set. +# The NixOS config (Biz.nix) will accept these as inputs rather than +# building them during OS evaluation. +# +# Usage: +# nix-build Biz/Packages.nix # builds all packages +# nix-build Biz/Packages.nix -A storybook # builds one package +{bild ? import ../Omni/Bild.nix {}}: { + storybook = bild.run ../Biz/Storybook.py; + podcastitlater-web = bild.run ../Biz/PodcastItLater/Web.py; + podcastitlater-worker = bild.run ../Biz/PodcastItLater/Worker.py; + dragons-analysis = bild.run ../Biz/Dragons/Analysis.hs; +} diff --git a/Biz/Targets.nix b/Biz/Targets.nix deleted file mode 100644 index 77e462c..0000000 --- a/Biz/Targets.nix +++ /dev/null @@ -1,19 +0,0 @@ -# Pre-declared build targets for the Biz namespace. -# -# This file exposes all buildable Biz targets as an attribute set, allowing -# NixOS configs to reference them directly without triggering recursive builds. -# -# To add a new target: -# 1. Add the attribute here pointing to bild.run ./path/to/target -# 2. Reference it in Biz.nix or other configs as targets.<name> -{bild}: { - # Web services - storybook = bild.run ./Storybook.py; - podcastitlater-web = bild.run ./PodcastItLater/Web.py; - podcastitlater-worker = bild.run ./PodcastItLater/Worker.py; - - # CLI tools and analysis - dragons-analysis = bild.run ./Dragons/Analysis.hs; - - # Add new Biz targets here as they are created -} |
