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
|
|
|
};
|
2024-12-08 15:04:44 -06:00
|
|
|
zig = {
|
|
|
|
url = "github:mitchellh/zig-overlay";
|
|
|
|
};
|
2024-02-11 19:29:23 -06:00
|
|
|
flake-utils = {
|
|
|
|
url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = {
|
|
|
|
nixpkgs,
|
|
|
|
flake-utils,
|
2024-12-08 15:04:44 -06:00
|
|
|
zig,
|
2024-02-11 19:29:23 -06:00
|
|
|
...
|
2024-12-08 15:04:44 -06:00
|
|
|
}: let
|
2024-02-11 19:29:23 -06:00
|
|
|
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 {
|
2024-12-21 12:05:33 -06:00
|
|
|
name = "zig-hidapi";
|
2024-02-11 19:29:23 -06:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgs.hidapi
|
2024-12-08 15:04:44 -06:00
|
|
|
zig.packages.${system}.master
|
2024-02-11 19:29:23 -06:00
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
pkgs.hidapi
|
|
|
|
];
|
|
|
|
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
|
|
|
|
pkgs.hidapi
|
|
|
|
];
|
|
|
|
};
|
|
|
|
packages.default = pkgs.zigStdenv.mkDerivation {
|
|
|
|
pname = "zig-hidapi";
|
|
|
|
version = "0.1.0";
|
|
|
|
buildInputs = [pkgs.hidapi];
|
|
|
|
src = ./.;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|