45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{
|
|
|
|
inputs = {
|
|
naersk.url = "github:nmattia/naersk/master";
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
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 ./.;
|
|
};
|
|
|
|
packages.ha-now-playing = naersk-lib.buildPackage {
|
|
pname = "ha-now-playing";
|
|
root = ./.;
|
|
|
|
buildInputs = with pkgs;[
|
|
openssl
|
|
];
|
|
nativeBuildInputs = with pkgs; [
|
|
pkg-config
|
|
];
|
|
};
|
|
defaultPackage = packages.ha-now-playing;
|
|
|
|
apps.ha-now-playing = utils.lib.mkApp {
|
|
drv = self.defaultPackage."${system}";
|
|
};
|
|
defaultApp = apps.ha-now-playing;
|
|
|
|
devShell = with pkgs; mkShell {
|
|
buildInputs = [ cargo rustc rustfmt pre-commit rustPackages.clippy ];
|
|
RUST_SRC_PATH = rustPlatform.rustLibSrc;
|
|
};
|
|
|
|
});
|
|
|
|
}
|