teensy-cmake-macros: init at unstable-2023-04-15

Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>
This commit is contained in:
Michael Donovan
2023-08-19 22:22:45 +00:00
committed by Anderson Torres
co-authored by Anderson Torres
parent 5a6d170f60
commit 3cecf7bb5a
4 changed files with 59 additions and 0 deletions
@@ -0,0 +1,35 @@
{ stdenv
, lib
, fetchFromGitHub
, cmake
, pkg-config
, callPackage
}:
stdenv.mkDerivation (finalAttrs: {
pname = "teensy-cmake-macros";
version = "unstable-2023-04-15";
src = fetchFromGitHub {
owner = "newdigate";
repo = "teensy-cmake-macros";
rev = "dc401ed23e6e13a9db3cd2a65f611a4738df3b0e";
hash = "sha256-E+BOlsCJtOScr3B5GSv1WM6rFv6cFYvm/iJ893fsmXM=";
};
propagatedBuildInputs = [ cmake pkg-config ];
passthru = {
hook = callPackage ./hook.nix {
teensy-cmake-macros = finalAttrs.finalPackage;
};
};
meta = with lib; {
description = "CMake macros for building teensy projects";
platforms = platforms.all;
homepage = "https://github.com/newdigate/teensy-cmake-macros";
license = licenses.mit;
maintainers = [ maintainers.michaeldonovan ];
};
})
@@ -0,0 +1,17 @@
{ lib
, makeSetupHook
, teensy-cmake-macros
}:
makeSetupHook {
name = "teensy-cmake-macros-hook";
propagatedBuildInputs = [ teensy-cmake-macros ];
passthru = { inherit teensy-cmake-macros; };
meta = {
description = "A setup hook for teensy-cmake-macros";
inherit (teensy-cmake-macros.meta) maintainers platforms broken;
};
} ./setup-hook.sh
@@ -0,0 +1,5 @@
teensyCMakeMacrosEnvHook() {
cmakeFlagsArray+=(-DCMAKE_MODULE_PATH=@out@/lib/cmake)
}
addEnvHooks "$targetOffset" teensyCMakeMacrosEnvHook
+2
View File
@@ -20160,6 +20160,8 @@ with pkgs;
tcptrack = callPackage ../development/tools/misc/tcptrack { };
teensy-cmake-macros = callPackage ../development/embedded/teensy-cmake-macros { };
teensyduino = arduino-core.override { withGui = true; withTeensyduino = true; };
teensy-loader-cli = callPackage ../development/embedded/teensy-loader-cli { };