aboutsummaryrefslogtreecommitdiffhomepage
path: root/flake.nix
blob: 0a02c3c17b412781546c91c8cf9853fdd20ce753 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
  description                  = "spine (sisu like parser & document generator) made available to process markup samples";
  inputs = {
    nixpkgs.url                = "github:NixOS/nixpkgs/nixpkgs-unstable"; # "github:nixos/nixpkgs";
    flake-utils.url            = "github:numtide/flake-utils";
    spine.url                  = "git+file:///home/ralph/grotto/repo/git.repo/projects/doc-reform/code/software/spine";
    spine.inputs.nixpkgs.follows = "nixpkgs";
    spine.flake                = true;
  };
  outputs = { self, nixpkgs, flake-utils, spine }:
    let
      version                  = "0.12.0";
      supportedSystems         = [ "x86_64-linux" ]; # [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
      forAllSystems            = nixpkgs.lib.genAttrs supportedSystems;
      nixpkgsFor               = forAllSystems (system: import nixpkgs { inherit system;  }); # nixpkgs instantiated for supported system types.
    in {
      packages = forAllSystems (system:
        let pkgs               = nixpkgsFor.${system};
        in {
          default              = spine.packages.${system}.default;
          spine-dmd            = spine.packages.${system}.spine-dmd;
          spine-ldc            = spine.packages.${system}.spine-ldc;
          spine-gdc            = spine.packages.${system}.spine-gdc;
          #vendorSha256         = "sha256-0Q00000000000000000000000000000000000000000=";
        });
      devShells = forAllSystems (system:
        let pkgs               = nixpkgsFor.${system};
        in with pkgs; {
          devShell             = mkShell { buildInputs = [ git dub dmd ldc gdc sqlite ]; };
        });
  };
}