2021-11-19 17:44:10 +01:00
|
|
|
{
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
naersk.url = "github:nmattia/naersk/master";
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
2021-11-20 17:37:14 +01:00
|
|
|
utils.url = "github:numtide/flake-utils";
|
2021-11-19 17:44:10 +01:00
|
|
|
};
|
|
|
|
|
2021-11-20 17:37:14 +01:00
|
|
|
outputs = { self, nixpkgs, utils, naersk }:
|
|
|
|
utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
naersk-lib = pkgs.callPackage naersk { };
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
overlay = final: prev: {
|
|
|
|
ha-now-playing = final.callPackage ./.;
|
|
|
|
};
|
2021-11-19 17:44:10 +01:00
|
|
|
|
2021-11-20 17:37:14 +01:00
|
|
|
packages.ha-now-playing = naersk-lib.buildPackage {
|
|
|
|
pname = "ha-now-playing";
|
|
|
|
root = ./.;
|
2021-11-19 17:44:10 +01:00
|
|
|
|
2021-11-20 17:37:14 +01:00
|
|
|
buildInputs = with pkgs;[
|
|
|
|
openssl
|
|
|
|
];
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
};
|
|
|
|
defaultPackage = packages.ha-now-playing;
|
2021-11-19 17:44:10 +01:00
|
|
|
|
2021-11-20 17:37:14 +01:00
|
|
|
apps.ha-now-playing = utils.lib.mkApp {
|
|
|
|
drv = self.defaultPackage."${system}";
|
|
|
|
};
|
|
|
|
defaultApp = apps.ha-now-playing;
|
2021-11-19 17:44:10 +01:00
|
|
|
|
2021-11-20 17:37:14 +01:00
|
|
|
devShell = with pkgs; mkShell {
|
|
|
|
buildInputs = [ cargo rustc rustfmt pre-commit rustPackages.clippy ];
|
|
|
|
RUST_SRC_PATH = rustPlatform.rustLibSrc;
|
2021-11-19 17:44:10 +01:00
|
|
|
};
|
2021-11-20 17:37:14 +01:00
|
|
|
|
|
|
|
});
|
2021-11-19 17:44:10 +01:00
|
|
|
|
|
|
|
}
|