-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{flexcpp, bisoncpp}: adopt and update #347109
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e5958cc
yodl: migrate to by-name
AndersonTorres 4751325
yodl: refactor
AndersonTorres a45e9b8
flexcpp: migrate to by-name
AndersonTorres ec21d0e
flexcpp: 2.05.00 -> 2.16.00
AndersonTorres 3e6397a
flexcpp: test bisoncpp
AndersonTorres 7242ec5
bisoncpp: migrate to by-name
AndersonTorres 712a2bf
bisoncpp: refactor
AndersonTorres 8b29c72
bisoncpp: 6.04.00 -> 6.09.00
AndersonTorres 7b129f2
icmake: migrate to by-name
AndersonTorres 5deaa11
icmake: refactor
AndersonTorres 0e6fa10
bobcat: refactor
AndersonTorres File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
pkgs/by-name/bi/bisoncpp/0000-parameterize-license-file.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff -Naur bisoncpp-sources-6.09.00-old/bisonc++/documentation/manual/conditions/gpl.yo bisoncpp-sources-6.09.00-new/bisonc++/documentation/manual/conditions/gpl.yo | ||
--- bisoncpp-sources-6.09.00-old/bisonc++/documentation/manual/conditions/gpl.yo 1969-12-31 21:00:01.000000000 -0300 | ||
+++ bisoncpp-sources-6.09.00-new/bisonc++/documentation/manual/conditions/gpl.yo 2024-10-07 17:19:52.344796158 -0300 | ||
@@ -1,9 +1,9 @@ | ||
The text of the em(GNU General Public License) (GPL) is frequently found in | ||
files named tt(COPYING). On em(Debian) systems the GPL may be found in the | ||
-file tt(/usr/share/common-licenses/GPL). Alternatively, visit | ||
+file tt(@license_file@). Alternatively, visit | ||
lurl(https://www.gnu.org/licenses/gpl-3.0.en.html). | ||
|
||
The GPL is shown below: | ||
|
||
-verbinclude(../../../LICENSE) | ||
+verbinclude(@license_file@) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
lib, | ||
bobcat, | ||
fetchFromGitLab, | ||
fetchurl, | ||
flexcpp, | ||
icmake, | ||
stdenv, | ||
yodl, | ||
}: | ||
|
||
let | ||
gpl3PlusText = fetchurl { | ||
url = "https://www.gnu.org/licenses/gpl-3.0.txt"; | ||
hash = "sha256-OXLcl0T2SZ8Pmy2/dmlvKuetivmyPd5m1q+Gyd+zaYY="; | ||
}; | ||
in | ||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "bisoncpp"; | ||
version = "6.09.00"; | ||
|
||
src = fetchFromGitLab { | ||
name = "bisoncpp-sources-${finalAttrs.version}"; | ||
domain = "gitlab.com"; | ||
owner = "fbb-git"; | ||
repo = "bisoncpp"; | ||
rev = finalAttrs.version; | ||
hash = "sha256-N3MiS4li1wQFDFr01fpXs3yH/Njjtd/OUHQsekiNjks="; | ||
}; | ||
|
||
patches = [ | ||
# Self-explaining, I think | ||
./0000-parameterize-license-file.patch | ||
]; | ||
|
||
patchFlags = [ | ||
# Because I changed the sourceRoot and the patch was written for the | ||
# original root | ||
"-p2" | ||
]; | ||
|
||
buildInputs = [ bobcat ]; | ||
|
||
nativeBuildInputs = [ | ||
flexcpp | ||
icmake | ||
yodl | ||
]; | ||
|
||
sourceRoot = "${finalAttrs.src.name}/bisonc++"; | ||
|
||
strictDeps = true; | ||
|
||
postPatch = '' | ||
substituteInPlace INSTALL.im --replace-fail /usr $out | ||
patchShebangs . | ||
license_file=${gpl3PlusText} substituteAllInPlace documentation/manual/conditions/gpl.yo | ||
for file in $(find documentation -type f); do | ||
substituteInPlace "$file" --replace-warn /usr $out | ||
done | ||
''; | ||
|
||
buildPhase = '' | ||
runHook preBuild | ||
|
||
./build program | ||
./build man | ||
./build manual | ||
|
||
runHook postBuild | ||
''; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
|
||
./build install x | ||
|
||
runHook postInstall | ||
''; | ||
|
||
meta = { | ||
homepage = "https://fbb-git.gitlab.io/bisoncpp/"; | ||
description = "Parser generator like bison, but it generates C++ code"; | ||
license = lib.licenses.gpl3Plus; | ||
mainProgram = "bisonc++"; | ||
maintainers = with lib.maintainers; [ | ||
raskin | ||
AndersonTorres | ||
]; | ||
platforms = lib.platforms.all; | ||
}; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
{ | ||
lib, | ||
bisoncpp, | ||
bobcat, | ||
fetchFromGitLab, | ||
icmake, | ||
stdenv, | ||
yodl, | ||
}: | ||
|
||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "flexcpp"; | ||
version = "2.16.00"; | ||
|
||
src = fetchFromGitLab { | ||
name = "flexcpp-source-${finalAttrs.version}"; | ||
owner = "fbb-git"; | ||
repo = "flexcpp"; | ||
rev = finalAttrs.version; | ||
hash = "sha256-hnsWJATdA24kxuOmH7x8HMH9nPFXAAThofXvshuWk0s="; | ||
}; | ||
|
||
buildInputs = [ | ||
bobcat | ||
]; | ||
|
||
nativeBuildInputs = [ | ||
icmake | ||
yodl | ||
]; | ||
|
||
sourceRoot = "${finalAttrs.src.name}/flexc++"; | ||
|
||
strictDeps = true; | ||
|
||
postPatch = '' | ||
substituteInPlace INSTALL.im --replace-fail /usr $out | ||
patchShebangs . | ||
''; | ||
|
||
buildPhase = '' | ||
runHook preBuild | ||
|
||
./build man | ||
./build manual | ||
./build program | ||
|
||
runHook postBuild | ||
''; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
|
||
./build install x | ||
|
||
runHook postInstall | ||
''; | ||
|
||
passthru = { | ||
tests = { | ||
inherit bisoncpp; # reverse dependency | ||
}; | ||
}; | ||
|
||
meta = { | ||
homepage = "https://fbb-git.gitlab.io/flexcpp/"; | ||
description = "Tool for generating lexical scanners in C++"; | ||
longDescription = '' | ||
Flexc++ was designed after `flex'. Flexc++ offers as compared to flex's | ||
C++ option a cleaner class-design. | ||
|
||
Flexc++ generates a scanner class that is ready for use, as well as a | ||
member function producing the lexical scanner tokens (lex()). The class | ||
can easily be provided with additional members without the need for | ||
polymorphic functions. Consequently, classes generated by flexc++ have no | ||
virtual members and actually have but one public member: lex(), replacing | ||
the old-style flex and flex++ yylex() function. | ||
|
||
Flexc++ offers many options, among which an option to define classes | ||
generated by flexc++ in a separate namespace. This allows developers to | ||
define additional symbols, even outside of the class generated by flexc++, | ||
without encountering name-collision problems. With flexc++, artificial | ||
means to prevent name-collisions, like the yy-conventions used by flex and | ||
flex++ are no longer required. Flexc++ generates C++ code. If C code is | ||
required, flex should be used. Flexc++'s grammar requirements are highly | ||
compatible with flex's requirements, so converting a flex grammar into a | ||
flexc++ grammar should be fairly simple. | ||
|
||
In addition to the flexc++ scanner generator itself and several skeleton | ||
files, the package contains an extensive man-page, as well as a full | ||
manual rewritten after the original flex manual, and several examples. | ||
''; | ||
changelog = "https://gitlab.com/fbb-git/flexcpp/-/blob/master/flexc++/changelog"; | ||
license = lib.licenses.gpl3Plus; | ||
maintainers = with lib.maintainers; [ AndersonTorres ]; | ||
mainProgram = "flexc++"; | ||
platforms = lib.platforms.all; | ||
}; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
lib, | ||
fetchFromGitLab, | ||
makeWrapper, | ||
ncurses, | ||
stdenv, | ||
}: | ||
|
||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "icmake"; | ||
version = "9.03.01"; | ||
|
||
src = fetchFromGitLab { | ||
owner = "fbb-git"; | ||
repo = "icmake"; | ||
rev = finalAttrs.version; | ||
hash = "sha256-XqIwIqgqVuKpee9F0kQue4tbKWh9iXUlxGJDwJNRIBc="; | ||
}; | ||
|
||
nativeBuildInputs = [ makeWrapper ]; | ||
|
||
sourceRoot = "${finalAttrs.src.name}/icmake"; | ||
|
||
strictDeps = true; | ||
|
||
postPatch = '' | ||
patchShebangs ./ | ||
substituteInPlace INSTALL.im \ | ||
--replace-fail "usr/" "" | ||
''; | ||
|
||
buildPhase = '' | ||
runHook preBuild | ||
|
||
./icm_prepare $out | ||
./icm_bootstrap x | ||
|
||
runHook postBuild | ||
''; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
|
||
./icm_install all / | ||
|
||
wrapProgram $out/bin/icmbuild \ | ||
--prefix PATH : ${lib.getBin ncurses}/bin | ||
|
||
runHook postInstall | ||
''; | ||
|
||
meta = { | ||
homepage = "https://fbb-git.gitlab.io/icmake/"; | ||
description = "Program maintenance utility using a C-like grammar"; | ||
longDescription = '' | ||
Icmake can be used as an alternative to make(1). | ||
|
||
Icmake allows the programmer to use a program language (closely resembling | ||
the well-known C-programming language) to define the actions involved in | ||
(complex) program maintenance. For this, icmake offers various special | ||
operators as well as a set of support functions that have proven to be | ||
useful in program maintenance. | ||
|
||
Traditional make-utilities recompile sources once header files are | ||
modified. In the context of C++ program development this is often a bad | ||
idea, as adding a new member to a class does not normally require you to | ||
recompile the class's sources. To handle class dependencies in a more | ||
sensible way, icmake's CLASSES file may define dependencies among | ||
classes. By default, class-dependencies are not interpreted. | ||
''; | ||
license = lib.licenses.gpl3; | ||
mainProgram = "icmake"; | ||
maintainers = with lib.maintainers; [ | ||
pSub | ||
AndersonTorres | ||
]; | ||
platforms = lib.platforms.all; | ||
}; | ||
}) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little confused about this "recursive dependency" 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I figured out, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 61.
This is a more or less typical design pattern: we tests reverse dependencies so that we can guarrantee that e.g. updating flexcpp does not break existing bisoncpp.
You can see a similar thing at live555.