diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-30 18:44:52 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-30 18:44:52 +0100 |
commit | 8beb57f19d5abd9ec9356abfc67a4da094e94b14 (patch) | |
tree | 0c041715fc5bb365729f5daff31a29bdac45d866 /rust/qmk-hid-com/src_c/package.nix | |
parent | feat(treewide): Migrate the Unicode handling to a custom c program, that work... (diff) | |
download | qmk_layout-8beb57f19d5abd9ec9356abfc67a4da094e94b14.zip |
fix(qmk_unicode_type): Package
Diffstat (limited to '')
-rw-r--r-- | rust/qmk-hid-com/src_c/package.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/rust/qmk-hid-com/src_c/package.nix b/rust/qmk-hid-com/src_c/package.nix new file mode 100644 index 0000000..17f84db --- /dev/null +++ b/rust/qmk-hid-com/src_c/package.nix @@ -0,0 +1,63 @@ +{ + stdenv, + lib, + # deps + meson, + pkg-config, + ninja, + wayland-scanner, + wayland, + hidapi, +}: +stdenv.mkDerivation { + pname = "qmk-unicode-type"; + version = "1.0.0"; + + src = lib.cleanSourceWith { + src = lib.cleanSource ./.; + filter = name: type: + (type == "directory") + || (builtins.elem (builtins.baseNameOf name) [ + "virtual-keyboard-unstable-v1.xml" + ]) + || (lib.strings.hasSuffix ".c" (builtins.baseNameOf name)) + || (lib.strings.hasSuffix ".h" (builtins.baseNameOf name)) + || (lib.strings.hasSuffix ".build" (builtins.baseNameOf name)); + }; + + env = { + }; + mesonFlags = lib.mapAttrsToList lib.mesonOption { + debug = "false"; + optimization = "3"; + strip = "true"; + warning_level = "everything"; + werror = "true"; + b_lundef = "true"; + b_lto = "true"; + b_ndebug = "false"; + b_pgo = "generate"; + b_staticpic = "true"; + b_pie = "false"; + c_std = "gnu2x"; + }; + # ar with gcc plugins for lto objects + preConfigure = '' + CC="gcc"; + AR="gcc-ar"; + RANLIB="gcc-ranlib" ; + export CC AR RANLIB + ''; + + strictDeps = true; + nativeBuildInputs = [ + meson + pkg-config + ninja + wayland-scanner + ]; + buildInputs = [ + wayland + hidapi + ]; +} |