38 lines
1.0 KiB
Nix
38 lines
1.0 KiB
Nix
|
{
|
||
|
description = "Cooklang tools";
|
||
|
|
||
|
outputs = { self, nixpkgs }:
|
||
|
let
|
||
|
supportedSystems = [ "x86_64-linux" ];
|
||
|
pkgsFor = system: import nixpkgs { inherit system; };
|
||
|
perSystem = nixpkgs.lib.genAttrs supportedSystems;
|
||
|
mkApp =
|
||
|
{ drv
|
||
|
, name ? drv.pname or drv.name
|
||
|
, exePath ? drv.meta.mainProgram or "bin/${name}"
|
||
|
}: {
|
||
|
type = "app";
|
||
|
program = "${drv}/${exePath}";
|
||
|
};
|
||
|
in
|
||
|
{
|
||
|
packages = perSystem (system:
|
||
|
let
|
||
|
pkgs = pkgsFor system;
|
||
|
in
|
||
|
rec {
|
||
|
cookcli = pkgs.callPackage ./packages/cookcli.nix { };
|
||
|
cook-docs = pkgs.callPackage ./packages/cook-docs.nix { };
|
||
|
default = cookcli;
|
||
|
});
|
||
|
apps = perSystem (system: rec {
|
||
|
cookcli = mkApp {
|
||
|
drv = self.packages.${system}.cookcli;
|
||
|
exePath = "/bin/cook";
|
||
|
};
|
||
|
cook-docs = mkApp { drv = self.packages.${system}.cook-docs; };
|
||
|
default = cookcli;
|
||
|
});
|
||
|
};
|
||
|
}
|