Expose an overlay output for systems to easily import
(This, I suspect will work better with cross-compilation and is just plain more straightforward to work with anyhow)
This commit is contained in:
21
flake.nix
21
flake.nix
@@ -4,14 +4,21 @@
|
|||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { flake-utils, nixpkgs, ... }: flake-utils.lib.eachDefaultSystem (system: {
|
outputs = { flake-utils, nixpkgs, ... }:
|
||||||
|
let
|
||||||
|
overlay = final: prev: rec {
|
||||||
|
jdk-openhab = final.jdk11;
|
||||||
|
openhab = final.callPackage ./openhab.nix { inherit jdk-openhab; };
|
||||||
|
openhab-addons = final.callPackage ./openhab-addons.nix {};
|
||||||
|
};
|
||||||
|
pkgs = system: import nixpkgs { inherit system; overlays = [ overlay ]; };
|
||||||
|
in {
|
||||||
|
inherit overlay;
|
||||||
|
} // flake-utils.lib.eachDefaultSystem (system: {
|
||||||
packages = rec {
|
packages = rec {
|
||||||
jdk-openhab = nixpkgs.legacyPackages.${system}.jdk11;
|
jdk-openhab = (pkgs system).jdk-openhab;
|
||||||
openhab = nixpkgs.legacyPackages.${system}.callPackage ./openhab.nix {
|
openhab = (pkgs system).openhab;
|
||||||
inherit jdk-openhab;
|
openhab-addons = (pkgs system).openhab-addons;
|
||||||
};
|
|
||||||
openhab-addons = nixpkgs.legacyPackages.${system}.callPackage ./openhab-addons.nix {};
|
|
||||||
default = openhab;
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user