ddcmqtt/flake.nix

41 lines
1.2 KiB
Nix
Raw Normal View History

2022-04-07 16:23:53 +01:00
{
description = "virtual environments";
inputs.devshell.url = "github:numtide/devshell";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.naersk.url = "github:nix-community/naersk";
2022-05-11 01:15:48 +01:00
inputs.rust-overlay.url = "github:oxalica/rust-overlay";
2022-04-07 16:23:53 +01:00
2022-05-11 01:15:48 +01:00
outputs = { self, flake-utils, devshell, nixpkgs, naersk, rust-overlay }:
2022-04-07 16:23:53 +01:00
flake-utils.lib.eachDefaultSystem (system: let
2022-05-11 01:15:48 +01:00
pkgs = import nixpkgs {
inherit system;
overlays = [ (import rust-overlay) ];
};
2022-04-07 16:23:53 +01:00
naersk-lib = naersk.lib."${system}";
in {
2022-05-11 01:15:48 +01:00
/*
2022-04-07 16:23:53 +01:00
defaultPackage = naersk-lib.buildPackage {
pname = "ddcmqtt";
root = ./.;
nativeBuildInputs = with pkgs; [ pkgconfig libudev ];
};
/* devshell currently not really working for stuff that needs pkgconfig/libs
devShell =
let pkgs = import nixpkgs {
inherit system;
overlays = [ devshell.overlay ];
};
in
pkgs.devshell.mkShell {
packages = with pkgs; [ rustc cargo gcc ];
nativeBuildInputs = with pkgs; [ libudev pkgconfig ];
};
*/
2022-05-11 01:15:48 +01:00
devShell = pkgs.mkShell{
nativeBuildInputs = with pkgs; [ rust-bin.stable.latest.default libudev pkgconfig ];
2022-04-07 16:23:53 +01:00
};
});
}