~jack/misc

2414e18a46b716d6d32be8e6808d77956d98ad0f — Jack Kelly 4 months ago 33761b4
Add top-level nix expression to build projects
3 files changed, 33 insertions(+), 14 deletions(-)

M .build.yml
M README.md
A default.nix
M .build.yml => .build.yml +14 -14
@@ 3,26 3,26 @@ sources:
  - https://git.sr.ht/~jack/misc
tasks:
  - bunkplan: |
      cd misc/bunkplan
      nix-build --no-out-link
      cd misc
      nix-build --no-out-link -A bunkplan
  - bunkplan-ml: |
      cd misc/bunkplan-ml
      nix-build --no-out-link
      cd misc
      nix-build --no-out-link -A bunkplan-ml
  - cabinsheets: |
      cd misc/cabinsheets
      nix-build --no-out-link
      cd misc
      nix-build --no-out-link -A cabinsheets
  - codeworld-raycaster: |
      cd misc/codeworld-raycaster
      nix-build --no-out-link
      cd misc
      nix-build --no-out-link -A codeworld-raycaster
  - ergodox: |
      cd misc/ergodox
      nix-build --no-out-link
      cd misc
      nix-build --no-out-link -A ergodox
  - metscrape: |
      cd misc/metscrape
      nix-build --no-out-link
      cd misc
      nix-build --no-out-link -A metscrape
  - metscrape2: |
      cd misc/metscrape2
      nix-build --no-out-link
      cd misc
      nix-build --no-out-link -A metscrape2
triggers:
  - condition: failure
    action: email

M README.md => README.md +8 -0
@@ 6,6 6,7 @@ Here's where I store code that's not worth spinning out into
full-fledged projects. Most of it is AGPLv3-or-later but I might
licence it under something else if you ask nicely.


## Index of Projects

All paths are relative to repository root.


@@ 18,3 19,10 @@ All paths are relative to repository root.
* `metscrape` - Batch-download wind forecasts from MetVUW (broken, unmaintained).
* `metscrape2` - Batch-download marine weather forecasts.
* `photoscripts` - Some shell scripts I use to manage my photos.


## Building a Project

If you have [Nix](https://nixos.org/nix/) installed, you can run `nix
build -f . $PROJECTNAME` to build that project. You will find it under
the `result` symlink.

A default.nix => default.nix +11 -0
@@ 0,0 1,11 @@
{ nixpkgs ? import ./nix/nixpkgs.nix }:
let
  bunkplan = import ./bunkplan { inherit nixpkgs; };
  bunkplan-ml = import ./bunkplan-ml { inherit nixpkgs; };
  cabinsheets = import ./cabinsheets { inherit nixpkgs; };
  codeworld-raycaster = import ./codeworld-raycaster { inherit nixpkgs; };
  ergodox = import ./ergodox { inherit nixpkgs; };
  metscrape = import ./metscrape { inherit nixpkgs; };
  metscrape2 = import ./metscrape2 { inherit nixpkgs; };
in
  { inherit bunkplan bunkplan-ml cabinsheets ergodox metscrape metscrape2; }