From 19a0c224840d09ba8ecbf6cdbb48b920b79c3e65 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Tue, 5 Nov 2024 22:04:30 +0000 Subject: [PATCH] openbsd.boot-ctags: init Co-Authored-By: Audrey Dutcher --- .../bsd/openbsd/pkgs/boot-ctags.nix | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pkgs/os-specific/bsd/openbsd/pkgs/boot-ctags.nix diff --git a/pkgs/os-specific/bsd/openbsd/pkgs/boot-ctags.nix b/pkgs/os-specific/bsd/openbsd/pkgs/boot-ctags.nix new file mode 100644 index 000000000000..e4bf4607da47 --- /dev/null +++ b/pkgs/os-specific/bsd/openbsd/pkgs/boot-ctags.nix @@ -0,0 +1,25 @@ +{ + mkDerivation, + lib, + flex, + byacc, + compatHook, +}: +mkDerivation { + path = "usr.bin/ctags"; + + extraNativeBuildInputs = [ + flex + byacc + compatHook + ]; + + buildPhase = '' + for f in *.l; do flex $f; done + for f in *.y; do yacc -H ''${f%.y}.h $f; done + for f in *.c; do $CC -I$TMP/include -DMAKE_BOOTSTRAP -c $f; done + $CC *.o -o ctags + ''; + + meta.platforms = lib.platforms.linux; +}