zig-hidapi/flake.nix

49 lines
974 B
Nix
Raw Normal View History

2024-02-11 19:29:23 -06:00
{
2024-06-16 12:28:14 -05:00
description = "zig-hidapi";
2024-02-11 19:29:23 -06:00
inputs = {
nixpkgs = {
2024-12-08 14:54:09 -06:00
url = "nixpkgs/nixos-unstable";
2024-02-11 19:29:23 -06:00
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs = {
nixpkgs,
flake-utils,
...
} @ inputs: let
in
2024-06-16 12:28:14 -05:00
flake-utils.lib.eachDefaultSystem (
2024-02-11 19:29:23 -06:00
system: let
pkgs = import nixpkgs {
2024-12-08 14:54:09 -06:00
inherit system;
2024-02-11 19:29:23 -06:00
};
in {
devShells.default = pkgs.mkShell {
nativeBuildInputs = [
pkgs.hidapi
2024-06-16 12:28:14 -05:00
pkgs.zig_0_13
2024-02-11 19:29:23 -06:00
];
buildInputs = [
pkgs.hidapi
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
pkgs.hidapi
];
shellHook = ''
name="zig-hidapi"
'';
};
packages.default = pkgs.zigStdenv.mkDerivation {
pname = "zig-hidapi";
version = "0.1.0";
buildInputs = [pkgs.hidapi];
src = ./.;
};
}
);
}