Cleaned up flake.nix
This commit is contained in:
parent
de02797144
commit
dd2894089a
1 changed files with 24 additions and 25 deletions
39
flake.nix
39
flake.nix
|
@ -10,33 +10,26 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, utils, naersk }:
|
outputs = { self, nixpkgs, utils, naersk }:
|
||||||
|
utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { system = "x86_64-linux"; overlays = [ naersk.overlay ]; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
naersk-lib = pkgs.naersk;
|
naersk-lib = pkgs.callPackage naersk { };
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
pkgs.openssl
|
||||||
|
];
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkgs.pkg-config
|
||||||
|
];
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
overlay = nixpkgs.lib.composeManyExtensions [
|
packages.ha-now-playing = naersk-lib.buildPackage
|
||||||
(final: prev: {
|
|
||||||
ha-now-playing = naersk-lib.buildPackage
|
|
||||||
{
|
{
|
||||||
|
inherit buildInputs nativeBuildInputs;
|
||||||
pname = "ha-now-playing";
|
pname = "ha-now-playing";
|
||||||
root = ./.;
|
root = ./.;
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
prev.openssl
|
|
||||||
];
|
|
||||||
nativeBuildInputs = [
|
|
||||||
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 {
|
||||||
|
@ -44,8 +37,14 @@
|
||||||
};
|
};
|
||||||
defaultApp = apps.ha-now-playing;
|
defaultApp = apps.ha-now-playing;
|
||||||
|
|
||||||
|
overlays = final: prev: {
|
||||||
|
ha-now-playing = packages.ha-now-playing;
|
||||||
|
};
|
||||||
|
|
||||||
devShell = with pkgs; mkShell {
|
devShell = with pkgs; mkShell {
|
||||||
buildInputs = [ cargo rustc rustfmt pre-commit rustPackages.clippy ];
|
inherit nativeBuildInputs;
|
||||||
|
|
||||||
|
buildInputs = [ cargo cargo-edit cargo-diet cargo-feature cargo-outdated rustc rustfmt pre-commit rustPackages.clippy ] ++ buildInputs;
|
||||||
RUST_SRC_PATH = rustPlatform.rustLibSrc;
|
RUST_SRC_PATH = rustPlatform.rustLibSrc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue