Fix flake overlay now?

This commit is contained in:
Erwin Boskma 2021-11-21 17:07:58 +01:00
parent b438fcf635
commit 3b33c60e64
Signed by: erwin
GPG key ID: 270B20D17394F7E5

View file

@ -7,27 +7,34 @@
}; };
outputs = { self, nixpkgs, utils, naersk }: outputs = { self, nixpkgs, utils, naersk }:
rec {
overlay = final: prev: {
ha-now-playing = final.callPackage ./.;
};
} // utils.lib.eachDefaultSystem (system:
let let
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { system = "x86_64-linux"; overlays = [ naersk.overlay ]; };
naersk-lib = pkgs.callPackage naersk { }; # naersk-lib = builtins.trace naersk nixpkgs.legacyPackages.x86_64-linux.callPackage naersk { };
naersk-lib = pkgs.naersk;
in in
rec { rec {
packages.ha-now-playing = naersk-lib.buildPackage { overlay = nixpkgs.lib.composeManyExtensions [
(final: prev: {
ha-now-playing = naersk-lib.buildPackage
{
pname = "ha-now-playing"; pname = "ha-now-playing";
root = ./.; root = ./.;
buildInputs = with pkgs;[ buildInputs = [
openssl prev.openssl
]; ];
nativeBuildInputs = with pkgs; [ nativeBuildInputs = [
pkg-config prev.pkg-config
]; ];
}; };
})
];
} // utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ self.overlay ]; };
in
rec {
packages.ha-now-playing = pkgs.ha-now-playing;
defaultPackage = packages.ha-now-playing; defaultPackage = packages.ha-now-playing;
apps.ha-now-playing = utils.lib.mkApp { apps.ha-now-playing = utils.lib.mkApp {