summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--COPYING674
-rw-r--r--digilent-agent.scm91
-rw-r--r--dnie.scm140
-rw-r--r--elenq/documentation.scm122
-rw-r--r--elenq/graphics.scm109
-rw-r--r--elenq/tools.scm60
-rw-r--r--embedded.scm273
-rw-r--r--hare.scm209
-rw-r--r--patches/newlib-getentropy.patch380
-rw-r--r--qemu-build-info-manual.patch62
-rw-r--r--qemu-disable-aarch64-migration-test.patch13
-rw-r--r--qemu-fix-agent-paths.patch65
-rw-r--r--qemu-glibc-2.27.patch55
-rw-r--r--qemu-glibc-2.30.patch57
-rw-r--r--qemu.scm455
-rw-r--r--scholarref.scm6
-rw-r--r--tuxedo-keyboard.scm36
-rw-r--r--zig-Revert-Never-implicitly-add-rpaths-for-each-lib-dir-.patch40
-rw-r--r--zig-do-not-link-against-librt.patch10
-rw-r--r--zig.scm191
20 files changed, 1810 insertions, 1238 deletions
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/digilent-agent.scm b/digilent-agent.scm
index b42c73d..c834550 100644
--- a/digilent-agent.scm
+++ b/digilent-agent.scm
@@ -1,65 +1,72 @@
(define-module (digilent-agent)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
- #:use-module (guix build-system cmake)
+ #:use-module (guix build-system qt)
#:use-module (gnu packages qt))
(define-public digilent-agent
- (let ((commit-ref "ff1d7539d714f4e8883448475adb1955eec83706"))
+ (let ((revision "2")
+ (commit "0fdfa84e9cdc101731b17cc59df8bd22cdbc6e68"))
(package
(name "digilent-agent")
- (version commit-ref)
+ (version (git-version "1.0.1" revision commit))
(source (origin
(method git-fetch)
(uri (git-reference
;; It's my own fork, not the Digilent official one
;; because I removed tracking
(url "https://github.com/ekaitz-zarraga/digilent-agent")
- (commit commit-ref)
+ (commit commit)
(recursive? #t)))
(file-name (git-file-name name version))
(sha256
- (base32 "1rm6iysdba9p2iqd1yig02dav4z0h3ppwcqy5chhd229ma4c7173"))))
- (build-system cmake-build-system)
+ (base32 "1nzkfj5wpazpi3r49s47i923kbcbw34qp81b8s8l9v3p8cq8s2j0"))))
+ (build-system qt-build-system)
(native-inputs
- `(("qtserialport" ,qtserialport)
- ("qtbase" ,qtbase)))
+ `(("qtserialport" ,qtserialport-5)
+ ("qtbase" ,qtbase-5)))
(arguments
- `(#:tests? #f
+ (list
+ #:tests? #f
#:phases
- (modify-phases
- %standard-phases
- (replace
- 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- ; Need o overwrite stuff in digilent-agent.pro from:
- ; 8< ----
- ; TARGET = digilent-agent
- ; target.path = /usr/bin
- ;
- ; wwwRoot.path = /usr/share/digilent-agent/www
- ; wwwRoot.files = www/*
- ;
- ; INSTALLS += target
- ; INSTALLS += wwwRoot
- ; ---- >8
- ; Where it says /usr/ we need to add our output dir
- (substitute* "digilent-agent.pro"
- (("\\/usr\\/bin")
- (string-append out "/bin"))
- (("\\/usr\\/share")
- (string-append out "/share")))
- (substitute* "src/main.cpp"
- (("\\/usr\\/share")
- (string-append out "/share")))
- (invoke "qmake")))))))
- (synopsis "Digilent connector for Digilent devices such as OpenScope
- MZ")
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'fix-pro
+ (lambda _
+ (let ((out #$output))
+ ; Need o overwrite stuff in digilent-agent.pro from:
+ ; 8< ----
+ ; TARGET = digilent-agent
+ ; target.path = /usr/bin
+ ;
+ ; wwwRoot.path = /usr/share/digilent-agent/www
+ ; wwwRoot.files = www/*
+ ;
+ ; INSTALLS += target
+ ; INSTALLS += wwwRoot
+ ; ---- >8
+ ; Where it says /usr/ we need to add our output dir
+ (substitute* "digilent-agent.pro"
+ (("\\/usr\\/bin")
+ (string-append out "/bin"))
+ (("\\/usr\\/share")
+ (string-append out "/share")))
+ (substitute* "src/main.cpp"
+ (("\\/usr\\/share")
+ (string-append out "/share")))
+ (substitute* "share/applications/digilent-agent.desktop"
+ (("\\/usr\\/bin")
+ (string-append out "/bin"))))))
+ (replace 'configure
+ (lambda _ (invoke "qmake")))
+ (add-after 'install 'install-desktop
+ (lambda _ (copy-recursively "share"
+ (string-append #$output "/share")))))))
+ (synopsis "Digilent connector for Digilent devices such as OpenScope MZ")
(description "The Digilent Agent is a service that runs in the system
- tray and enables browser based applications to communicate with
- Digilent hardware.")
+tray and enables browser based applications to communicate with Digilent
+hardware.")
(home-page
- "https://reference.digilentinc.com/reference/software/digilent-agent/start")
- (license license:lgpl3))))
+"https://digilent.com/reference/software/digilent-agent/start")
+ (license (list license:gpl3 license:expat)))))
diff --git a/dnie.scm b/dnie.scm
new file mode 100644
index 0000000..b268450
--- /dev/null
+++ b/dnie.scm
@@ -0,0 +1,140 @@
+(define-module (dnie)
+ #:use-module (guix packages)
+ #:use-module (guix gexp)
+ #:use-module (guix download)
+ #:use-module (gnu packages elf)
+ #:use-module (gnu packages gcc)
+ #:use-module (gnu packages pth)
+ #:use-module (gnu packages gnupg)
+ #:use-module (gnu packages security-token)
+ #:use-module (guix build-system copy)
+ #:use-module (guix build-system gnu)
+ #:use-module ((guix licenses) #:prefix license:))
+
+(define-public dnie-cert
+ (package
+ (name "dnie-cert")
+ (version "1.6.8")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append
+ "https://www.dnielectronico.es/descargas/distribuciones_linux/"
+ "libpkcs11-dnie_" version "_amd64.deb"))
+ (sha256
+ (base32
+ "028v4vv5c2lf5f9iv25838lymh3rsaxv4s9f94g61jn0n8w787c5"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install 'unpack
+ (lambda _
+ (invoke "ar" "-x"
+ (string-append "libpkcs11-dnie_" #$version "_amd64.deb"))
+ (invoke "tar" "-xvf" "data.tar.xz"))))
+ #:install-plan
+ ''(("usr/share/libpkcs11-dnie/AC RAIZ DNIE 2.crt"
+ "/share/libpkcs11-dnie/AC_RAIZ_DNIE_2.crt"))))
+ (home-page "https://www.dnielectronico.es/PortalDNIe/")
+ (synopsis "Certs for Spanish DNIe")
+ (description "Certificate only")
+ (license
+ (license:non-copyleft
+ "https://www.dnielectronico.es/PortalDNIe/"
+ "Copyright (C) 2010 Dirección General de Policía y de la Guardia Civil
+All rights reserved."))))
+
+(define-public libassuan0
+ (package
+ (name "libassuan")
+ (version "2.5.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnupg/libassuan/libassuan-"
+ version ".tar.bz2"))
+ (sha256
+ (base32
+ "1r1lvcp67gn5lfrj1g388sd77ca6qwnmxndirdysd71gk362z34f"))))
+ (build-system gnu-build-system)
+ (arguments (if (%current-target-system)
+ (list #:configure-flags
+ #~(list (string-append
+ "--with-libgpg-error-prefix="
+ #$(this-package-input "libgpg-error"))))
+ '()))
+ (propagated-inputs
+ (list libgpg-error pth))
+ (home-page "https://gnupg.org")
+ (synopsis
+ "IPC library used by GnuPG and related software")
+ (description
+ "Libassuan is a small library implementing the so-called Assuan
+protocol. This protocol is used for IPC between most newer
+GnuPG components. Both, server and client side functions are
+provided.")
+ (license license:lgpl2.0+)))
+
+(define-public libpkcs-dnie
+ (package
+ (name "libpkcs-dnie")
+ (version "1.6.8")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append
+ "https://www.dnielectronico.es/descargas/distribuciones_linux/"
+ "libpkcs11-dnie_" version "_amd64.deb"))
+ (sha256
+ (base32
+ "028v4vv5c2lf5f9iv25838lymh3rsaxv4s9f94g61jn0n8w787c5"))))
+ (supported-systems (list "x86_64-linux"))
+ (build-system copy-build-system)
+ (inputs (list libassuan0 libgpg-error patchelf pcsc-lite (list gcc "lib")))
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install 'unpack
+ (lambda _
+ (invoke "ar" "-x"
+ (string-append "libpkcs11-dnie_" #$version "_amd64.deb"))
+ (invoke "tar" "-xvf" "data.tar.xz")))
+ (add-before 'install 'patchelf
+ (lambda _
+ (invoke "patchelf" "usr/lib/libpkcs11-dnie-cryptopp.so"
+ "--set-rpath" (string-append #$gcc:lib "/lib"))
+ (invoke "patchelf" "usr/lib/libpkcs11-dnie.so"
+ "--set-rpath" (string-join
+ (list
+ #$gcc:lib
+ #$libassuan0
+ #$libgpg-error
+ #$pcsc-lite
+ #$output)
+ "/lib:"
+ 'suffix)))))
+ #:install-plan
+ ''(("usr/lib" "/lib")
+ ("usr/share/doc" "/share/doc")
+ ("usr/share/libpkcs11-dnie/AC RAIZ DNIE 2.crt"
+ "/share/libpkcs11-dnie/AC_RAIZ_DNIE_2.crt"))))
+ (home-page "https://www.dnielectronico.es/PortalDNIe/")
+ (synopsis "Libraries and certs for Spanish DNIe")
+ (description "After installation you'll need to:
+@itemize
+@item Install the PKCS#11 module in your browser:
+ `guix build dnie`/lib/libpkcs11-dnie.so
+@item Install the DNIe certificate in your browser
+ `guix build dnie`/share/libpkcs11-dnie/AC_RAIZ_DNIE_2.crt
+@end itemize
+NOTE: maybe you just want to use OpenSC instead.")
+ (license
+ (license:non-copyleft
+ "https://www.dnielectronico.es/PortalDNIe/"
+ "Copyright (C) 2010 Dirección General de Policía y de la Guardia Civil
+All rights reserved."))))
diff --git a/elenq/documentation.scm b/elenq/documentation.scm
new file mode 100644
index 0000000..f255fe9
--- /dev/null
+++ b/elenq/documentation.scm
@@ -0,0 +1,122 @@
+(define-module (elenq documentation)
+ #:use-module (elenq graphics)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix build-system copy)
+ #:use-module (guix gexp)
+ #:use-module (guix git-download)
+ #:use-module (guix packages)
+ #:use-module (gnu packages haskell-xyz))
+
+(define-public elenq-pandoc-templates
+ (let ((revision "4")
+ (commit "4d65ed1bf92e46d04565b9cc1188db5e57f20f37"))
+ (package
+ (name "elenq-pandoc-templates")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "git://git.elenq.tech/pandoc-templates")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "12260xxs293g527vnpy7vs634vmd59irsy005f15320rxjbrblq7"))))
+ (build-system copy-build-system)
+ (inputs (list elenq-logos))
+ (arguments
+ (list
+ #:install-plan ''(("pandoc" "/share/pandoc"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install 'set-url
+ (lambda _
+ (for-each
+ (lambda (f)
+ (substitute* f
+ (("\\$elenq-directory\\$")
+ (string-append #$elenq-logos "/share/elenq/"))))
+ (list "pandoc/templates/elenq-article.latex"
+ "pandoc/templates/elenq-book.latex")))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "XDG_DATA_DIRS") ;; Not supported by pandoc _yet_
+ (files '("share")))))
+ (home-page "http://git.elenq.tech/pandoc-templates")
+ (synopsis "Pandoc templates for ElenQ Technology")
+ (description "A set of well configured Pandoc templates for ElenQ
+Technology's documents.")
+ (license license:asl2.0))))
+
+
+(define-public elenqdoc
+ (let ((revision "1")
+ (commit "1cb21742a69f681e6452a7ddd0adc9543aefd72a"))
+ (package
+ (name "elenqdoc")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "git://git.elenq.tech/elenqdoc")
+ (commit commit)))
+ (sha256
+ (base32 "0fdxskf3h14vdr9w5pi18svrz40p9qkbwcn4c4rp1b1azpbfsa6s"))))
+ (build-system copy-build-system)
+ (inputs (list elenq-pandoc-templates))
+ (propagated-inputs (list pandoc))
+ (arguments
+ (list
+ #:install-plan ''(("elenqdoc" "/bin/elenqdoc"))
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'install 'wrap
+ (lambda _
+ (wrap-program (string-append #$output "/bin/elenqdoc")
+ `("ELENQDOC_DATADIR" =
+ (,(string-append #$elenq-pandoc-templates
+ "/share/pandoc/")))))))))
+ (home-page "http://git.elenq.tech/")
+ (synopsis "Simplified pandoc wrapper for ElenQ documents")
+ (description "Provides `elenqdoc` command.")
+ (license license:asl2.0))))
+
+(define-public tiddlywiki5-bob
+ (package
+ (name "tiddlywiki5-bob")
+ (version "1.7.6")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/OokTech/TW5-Bob")
+ (commit version)))
+ (sha256
+ (base32 "0s8ssmxfc5ydn52xh8l1s8qyczy0vk6nrnwspc4in8f336vm8y4c"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:install-plan ''(("./" "tiddlywiki/plugins/OokTech/Bob"))))
+ (home-page "https://github.com/OokTech/TW5-Bob")
+ (synopsis "A plugin that makes tiddlywiki a multi-user wiki on node")
+ (description "What does it do?
+@itemize
+@item Multi-User support for using/editing the same wiki(s) simultaneously
+@item Multi-Wiki support - run it once and serve multiple wikis
+@item Create and configure new wikis from inside the root wiki
+@item Export single file wikis in a variety of ways
+@item Two-way real-time syncing between the browser and file system
+@item All configuration can be done from inside the wiki
+@item Serve external files (like images) so you can include them in your wikis
+@item Allows you to run shell scripts and commands from inside the wiki
+@item Can be used as a plugin library to make plugins available to other wikis
+ (requires the TWederBob plugin on the other wikis to connect)
+@item Inter-server federation. Different Bob servers can communicate to share
+ tiddlers and as chat servers/relays
+@item HTTP API for interacting with the server
+@end itemize")
+ (native-search-paths
+ (list (search-path-specification
+ (variable "TIDDLYWIKI_PLUGIN_PATH")
+ (files '("tiddlywiki/plugins")))))
+ (license license:bsd-3)))
diff --git a/elenq/graphics.scm b/elenq/graphics.scm
new file mode 100644
index 0000000..172aa93
--- /dev/null
+++ b/elenq/graphics.scm
@@ -0,0 +1,109 @@
+(define-module (elenq graphics)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix build-system font)
+ #:use-module (guix build-system copy)
+ #:use-module (guix gexp)
+ #:use-module (guix git-download)
+ #:use-module (guix packages)
+ #:use-module (gnu packages guile)
+ #:use-module (gnu packages gnome))
+
+(define-public font-armata
+ (package
+ (name "font-armata")
+ (version "0.9.7")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ekaitz-zarraga/font-armata/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1pdlydanpay93pgkbpawii11j62m643pqkv6i6crvia198i9fnrd"))))
+ (build-system font-build-system)
+ (home-page "https://fontlibrary.org/en/font/armata")
+ (synopsis "Armata Font")
+ (description
+ "Armata is a new Sans Serif font by Jasper @ Cannot Into Space
+Fonts. It is named after the new Russian T-14 Armata Main Battle Tank.")
+ (license license:silofl1.1)))
+
+(define-public font-b612-better
+ (let ((revision "1")
+ (commit "ab287a9876083f29d9bf83e4b71a60e79d8b657e"))
+ (package
+ (name "font-b612-better")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ekaitz-zarraga/font-b612-better/")
+ (commit commit)))
+ (sha256
+ (base32 "11r2blm2v82rsrl0jypi8x9r8im14q1gx57jhzdby4dia6jslsjv"))))
+ (build-system font-build-system)
+ (home-page "https://github.com/ekaitz-zarraga/font-b612-better")
+ (synopsis "B612 Font (improved)")
+ (description
+ "Fork of the B612 font developed by AIRBUS with a few
+improvements:
+@itemize
+@item Proper Monospace support
+@item Slashed Zero by default
+@item Cleaned source blob files that required proprietary software.
+@end itemize")
+ (license license:silofl1.1))))
+
+(define-public elenq-logos
+ (let ((revision "1")
+ (commit "3612f4a88e6a06a9c0fa7cfdb81cbbf6f081a1a9"))
+ (package
+ (name "elenq-logos")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "git://git.elenq.tech/elenq-logos/")
+ (commit commit)))
+ (sha256
+ (base32 "0q0a5p84vxwcj3516snnwq09i3g36idfmvpp46vsl9hcq9z53ha3"))))
+ (native-inputs (list librsvg font-armata guile-3.0-latest))
+ (arguments
+ (list
+ #:install-plan ''(("out/" "share/elenq"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install 'build
+ (lambda _
+ (define out "out")
+
+ (define (redirected-to-file filename . command)
+ (with-output-to-file filename
+ (lambda () (apply invoke command))))
+
+ (define (make-all-logo-formats subname)
+ (let ((base (string-append out "/elenq-" subname ".svg")))
+ (redirected-to-file base "guile" "logo/elenq.scm" subname)
+ (invoke
+ "rsvg-convert" base "--format=svg" "--output"
+ (string-append out "/elenq-" subname ".optimized.svg"))
+ (for-each
+ (lambda (size)
+ (invoke
+ "rsvg-convert" base "--format=png" "--output"
+ (string-append out "/elenq-" subname "-" size ".png")
+ "-w" size "--keep-aspect-ratio"))
+ (map (lambda (x) (number->string (integer-expt 2 x)))
+ (iota 6 5 1)))))
+
+ (mkdir "out")
+ (for-each make-all-logo-formats
+ (list "technology" "publishing")))))))
+ (build-system copy-build-system)
+ (home-page "https://elenq.tech")
+ (synopsis "ElenQ logos")
+ (description "ElenQ Technology logos in different sizes and formats.")
+ (license license:cc-by-sa4.0))))
diff --git a/elenq/tools.scm b/elenq/tools.scm
new file mode 100644
index 0000000..17b2a40
--- /dev/null
+++ b/elenq/tools.scm
@@ -0,0 +1,60 @@
+(define-module (elenq tools)
+ #:use-module (guix gexp)
+ #:use-module (guix packages)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix build-system guile)
+ #:use-module ((guix build utils) #:select (with-directory-excursion))
+ #:use-module (gnu packages)
+ #:use-module (gnu packages guile)
+ #:use-module (gnu packages guile-xyz))
+
+(define-public guile-simple-site-builder
+ (package
+ (name "guile-simple-site-builder")
+ (version "0.0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "git://git.elenq.tech/guile-simple-site-builder")
+ (commit version)))
+ (sha256
+ (base32 "1gfbckg34ws2nf6ng85ip82ixvdscz1dfw1wd0yn43gd336n268v"))))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'remove-guix.scm
+ (lambda _ (delete-file "guix.scm"))))))
+ (propagated-inputs (list guile-3.0))
+ (build-system guile-build-system)
+ (home-page "https://git.elenq.tech/guile-simple-site-builder/")
+ (synopsis "Atom and an HTML index generator")
+ (description "A simple tool to generate an Atom and an HTML index from a
+very simple scheme file.")
+ (license license:gpl3+)))
+
+(define-public reminder
+ (let ((revision "1")
+ (commit "cd2cbbb6511f6be57de2dcdcca20c76ca73e8f06"))
+ (package
+ (name "reminder")
+ (version "0.0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ekaitz-zarraga/reminder.git")
+ (commit commit)))
+ (sha256
+ (base32 "0giykd6x040xd2d75sra6ziyhfic8dgr3fpyzv5v4bwzv6wafh35"))))
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-before 'build 'delete-guix.scm
+ (lambda _ (delete-file "guix.scm"))))))
+ (build-system guile-build-system)
+ (native-inputs (list guile-3.0))
+ (propagated-inputs (list guile-libnotify))
+ (synopsis "Remind you things periodically")
+ (description "Reminder triggers desktop notifications periodically according
+to a configuration file you provided.")
+ (home-page "none")
+ (license license:asl2.0))))
diff --git a/embedded.scm b/embedded.scm
new file mode 100644
index 0000000..709e31f
--- /dev/null
+++ b/embedded.scm
@@ -0,0 +1,273 @@
+(define-module (embedded)
+ #:use-module (guix utils)
+ #:use-module (guix gexp)
+ #:use-module (guix memoization)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix build-system trivial)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages embedded)
+ #:use-module (gnu packages flex)
+ #:use-module (gnu packages cross-base)
+ #:use-module (gnu packages texinfo)
+ #:use-module (guix build utils)
+ #:use-module (gnu packages gcc)
+
+ #:export (make-gcc-arm-none-eabi-12.3.rel1
+ make-newlib-nano-arm-none-eabi-12.3.rel1
+ make-newlib-arm-none-eabi-12.3.rel1
+ arm-none-eabi-nano-toolchain-12.3.rel1
+ arm-none-eabi-toolchain-12.3.rel1))
+
+(define make-gcc-arm-none-eabi-12.3.rel1
+ (mlambda ()
+ (let ((xgcc (cross-gcc "arm-none-eabi"
+ #:xgcc gcc-12
+ #:xbinutils (cross-binutils "arm-none-eabi"))))
+ (package (inherit xgcc)
+ (source
+ (origin
+ (inherit (package-source xgcc))
+ (method git-fetch)
+ (uri (git-reference
+ (url "git://gcc.gnu.org/git/gcc.git")
+ (commit "0f54a73b998b72f7c8452a63730ec3b16fc47854")))
+ (sha256
+ (base32 "0r6q0m3d8g3k3rkmnqjw8aw5fcnsrmywf4ispdkxmk1al3whk1vk"))))
+ (native-inputs
+ (modify-inputs (package-native-inputs xgcc)
+ (delete "isl")
+ (prepend flex isl-0.18)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments xgcc)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+
+ (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((gcc (assoc-ref inputs "gcc")))
+ ;; Remove the default compiler from
+ ;; CPLUS_INCLUDE_PATH to prevent header conflict
+ ;; with the GCC from native-inputs.
+ (setenv "CPLUS_INCLUDE_PATH"
+ (string-join
+ (delete (string-append gcc "/include/c++")
+ (string-split
+ (getenv "CPLUS_INCLUDE_PATH")
+ #\:))
+ ":"))
+ (format #t
+ "environment variable `CPLUS_INCLUDE_PATH'\
+ changed to ~a~%"
+ (getenv "CPLUS_INCLUDE_PATH")))))))
+ ((#:configure-flags flags)
+ ;; The configure flags are largely identical to the flags
+ ;; used by the "GCC ARM embedded" project.
+ #~(append (list "--disable-libgomp"
+ "--disable-libmudflap"
+ "--disable-libquadmath"
+ "--disable-shared"
+ "--disable-nls"
+ "--disable-threads"
+ "--disable-tls"
+ "--without-cloog"
+ "--without-isl"
+ "--with-newlib"
+ "--with-headers=yes"
+ "--enable-checking=release"
+ "--enable-languages=c,c++"
+ "--with-gnu-as"
+ "--with-gnu-ld"
+ "--enable-multilib"
+ "--with-host-libstdcxx=-static-libgcc \
+-Wl,-Bstatic,-lstdc++,-Bdynamic -lm"
+ "--with-multilib-list=aprofile,rmprofile")
+ (delete "--disable-multilib" #$flags)))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "CROSS_C_INCLUDE_PATH")
+ (files '("arm-none-eabi/include")))
+ (search-path-specification
+ (variable "CROSS_CPLUS_INCLUDE_PATH")
+ (files '("arm-none-eabi/include/c++"
+ "arm-none-eabi/include/c++/arm-none-eabi"
+ ; C has to be last since c++ headers use
+ ; #include_next <stdlib.h> inside of <cstdlib>
+ ; Heh! :)
+ "arm-none-eabi/include")))
+ (search-path-specification
+ (variable "CROSS_LIBRARY_PATH")
+ (files '("arm-none-eabi/lib")))))))))
+
+(define make-base-newlib-arm-none-eabi-12.3.rel1
+ (mlambda (base)
+ (let ((commit "4c7d0dfec5793cbf5cf3930b91f930479126d8ce")
+ (revision "0"))
+ (package
+ (inherit base)
+ (version (git-version "3.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "http://sourceware.org/git/newlib-cygwin.git")
+ (commit commit)))
+ (sha256
+ (base32
+ "0drs9v8avh4y2h5bs0ixjn9x662jzkkikx8z034wgl41dxmn6786"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases original-phases)
+ #~(modify-phases #$original-phases
+ (replace 'fix-references-to-/bin/sh
+ (lambda _
+ (substitute* '("libgloss/arm/cpu-init/Makefile.inc"
+ "libgloss/arm/Makefile.inc"
+ "libgloss/libnosys/Makefile.inc"
+ "libgloss/Makefile.in")
+ (("/bin/sh") (which "sh")))
+ #t))))
+ ;; The configure flags are identical to the flags used by the "GCC
+ ;; ARM embedded" project.
+ ((#:configure-flags flags)
+ #~(cons* "--enable-newlib-io-c99-formats"
+ "--enable-newlib-retargetable-locking"
+ "--enable-newlib-mb"
+ "--enable-newlib-reent-check-verify"
+ "--enable-newlib-register-fini"
+ #$flags))))
+ (native-inputs
+ `(("xbinutils" ,(cross-binutils "arm-none-eabi"))
+ ("xgcc" ,(make-gcc-arm-none-eabi-12.3.rel1))
+ ("texinfo" ,texinfo)))))))
+
+(define make-newlib-nano-arm-none-eabi-12.3.rel1
+ (mlambda ()
+ (make-base-newlib-arm-none-eabi-12.3.rel1 (make-newlib-nano-arm-none-eabi))))
+
+(define make-newlib-arm-none-eabi-12.3.rel1
+ (mlambda ()
+ (make-base-newlib-arm-none-eabi-12.3.rel1 (make-newlib-arm-none-eabi))))
+
+(define make-libstdc++-12.3.rel1
+ (mlambda (xgcc newlib)
+ (let* ((newlib-with-xgcc
+ (package
+ (inherit newlib)
+ (native-inputs
+ (alist-replace "xgcc" (list xgcc)
+ (package-native-inputs newlib)))))
+ (base ((@@ (gnu packages embedded) make-libstdc++-arm-none-eabi) xgcc newlib-with-xgcc))
+ (src (package-source base)))
+ (package
+ (inherit base)
+ (source
+ (origin
+ (inherit src)
+ (patches
+ (cons* (local-file "./patches/newlib-getentropy.patch")
+ (origin-patches src)))))
+ ;; TODO add back the debug phase after figuring out
+ ;; how the Guix build system / gcc build phases create the
+ ;; debug phase
+ (outputs '("out"))
+ (arguments (substitute-keyword-arguments (package-arguments base)
+ ((#:configure-flags flags)
+ #~(cons* "--with-target-subdir=yes"
+ "CFLAGS=-ffunction-sections -fdata-sections"
+ (string-append "--libdir="
+ #$output
+ "/arm-none-eabi/lib")
+ #$flags))))))))
+
+(define make-libstdc++-nano-12.3.rel1
+ (mlambda (xgcc newlib-nano)
+ (let ((base (make-libstdc++-12.3.rel1 xgcc newlib-nano)))
+ (package
+ (inherit base)
+ (name "libstdc++-arm-none-eabi-nano")
+ (arguments (substitute-keyword-arguments (package-arguments base)
+ ((#:configure-flags flags)
+ #~(cons* "CFLAGS=-ffunction-sections -fdata-sections -fno-exceptions"
+ (filter
+ (lambda (flag)
+ (not (string-prefix? "CFLAGS=" flag)))
+ #$flags)))
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ ;; This is mostly the same as for newlib-nano
+ (add-after 'install 'hardlink-libstdc++
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ ;; The nano.specs file says that newlib-nano files should
+ ;; end in "_nano.a" instead of just ".a". Note that this
+ ;; applies to all the multilib folders too.
+ (for-each
+ (lambda (file)
+ (link file
+ (string-append
+ ;; Strip ".a" off the end
+ (substring file 0 (- (string-length file) 2))
+ ;; Add "_nano.a" onto the end
+ "_nano.a")))
+ (find-files
+ out "^(libstdc\\+\\+.a|libsupc\\+\\+.a)$")))))))))))))
+
+(define make-arm-none-eabi-toolchain
+ (mlambda (xgcc newlib)
+ "Produce a cross-compiler toolchain package with the compiler XGCC and the
+C library variant NEWLIB."
+ (let ((newlib-with-xgcc
+ (package
+ (inherit newlib)
+ (native-inputs
+ (alist-replace "xgcc" (list xgcc)
+ (package-native-inputs newlib))))))
+ (package
+ (name "arm-none-eabi-toolchain")
+ (version (package-version xgcc))
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ '(#:modules ((guix build union))
+ #:builder
+ (begin
+ (use-modules (ice-9 match)
+ (guix build union))
+ (match %build-inputs
+ (((names . directories) ...)
+ (union-build (assoc-ref %outputs "out")
+ directories))))))
+ (propagated-inputs
+ `(("binutils" ,(cross-binutils "arm-none-eabi"))
+ ("libstdc++" ,(make-libstdc++-12.3.rel1 xgcc newlib))
+ ("gcc" ,xgcc)
+ ("newlib" ,newlib-with-xgcc)))
+ (synopsis "Complete GCC tool chain for ARM bare metal development")
+ (description "This package provides a complete GCC tool chain for ARM
+bare metal development. This includes the GCC arm-none-eabi cross compiler
+and newlib (or newlib-nano) as the C library. The supported programming
+languages are C and C++.")
+ (home-page (package-home-page xgcc))
+ (license (package-license xgcc))))))
+
+(define make-arm-none-eabi-nano-toolchain
+ (mlambda (xgcc newlib-nano)
+ (let ((base (make-arm-none-eabi-toolchain xgcc newlib-nano)))
+ (package
+ (inherit base)
+ (name "arm-none-eabi-nano-toolchain")
+ (propagated-inputs
+ (modify-inputs (package-propagated-inputs base)
+ (replace "libstdc++" (make-libstdc++-nano-12.3.rel1 xgcc newlib-nano))))))))
+
+(define arm-none-eabi-toolchain-12.3.rel1
+ (make-arm-none-eabi-toolchain
+ (make-gcc-arm-none-eabi-12.3.rel1)
+ (make-newlib-arm-none-eabi-12.3.rel1)))
+
+(define arm-none-eabi-nano-toolchain-12.3.rel1
+ (make-arm-none-eabi-nano-toolchain
+ (make-gcc-arm-none-eabi-12.3.rel1)
+ (make-newlib-nano-arm-none-eabi-12.3.rel1)))
diff --git a/hare.scm b/hare.scm
deleted file mode 100644
index 77c5f60..0000000
--- a/hare.scm
+++ /dev/null
@@ -1,209 +0,0 @@
-(define-module (hare)
- #:use-module (guix packages)
- #:use-module (guix utils)
- #:use-module (guix gexp)
- #:use-module (guix git-download)
- #:use-module (guix download)
- #:use-module ((guix licenses) #:prefix license:)
- #:use-module (guix build-system gnu)
- #:use-module (guix build-system trivial)
- #:use-module (gnu packages)
- #:use-module (gnu packages base)
- #:use-module (gnu packages c)
- #:use-module (gnu packages man)
- #:use-module (ice-9 match))
-
-
-;; Partially obtained from:
-;; https://git.sr.ht/~whereiseveryone/guixrus/tree/master/item/guixrus/packages/hare.scm
-
-(define tzdata-list
- (package
- (inherit tzdata)
- (name "tzdata-list")
- (arguments
- (list #:tests? #f
- ;; This consists purely of (architecture-independent) data, so
- ;; ‘cross-compilation’ is pointless here! (The binaries zic,
- ;; dump, and tzselect are deleted in the post-install phase.)
- #:target #f
- #:make-flags
- #~(let ((out #$output)
- (tmp (getenv "TMPDIR")))
- (list (string-append "TOPDIR=" out)
- (string-append "TZDIR=" out "/share/zoneinfo")
- (string-append "TZDEFAULT=" out
- "/share/zoneinfo/localtime")
-
- ;; Likewise for the C library routines.
- (string-append "LIBDIR=" tmp "/lib")
- (string-append "MANDIR=" tmp "/man")
-
- ;; XXX: tzdata 2020b changed the on-disk format
- ;; of the time zone files from 'fat' to 'slim'.
- ;; Many packages (particularly evolution-data-server)
- ;; can not yet handle the latter, so we stick with
- ;; 'fat' for now.
- #$@(if (version>=? (package-version this-package)
- "2020b")
- '("CPPFLAGS=-DZIC_BLOAT_DEFAULT='\"fat\"'")
- '())
-
- "AWK=awk"
- "CC=gcc"))
- #:modules '((guix build utils)
- (guix build gnu-build-system)
- (srfi srfi-1))
- #:phases
- #~(modify-phases %standard-phases
- (replace 'unpack
- (lambda* (#:key source inputs #:allow-other-keys)
- (invoke "tar" "xvf" source)
- (invoke "tar" "xvf"
- #$(match (package-inputs this-package)
- (((_ tzcode)) tzcode)))))
- (add-after 'install 'post-install
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Move data in the right place.
- (let ((out (assoc-ref outputs "out")))
- (copy-file "leap-seconds.list"
- (string-append out "/share/zoneinfo/leap-seconds.list"))
- (symlink (string-append out "/share/zoneinfo")
- (string-append out "/share/zoneinfo/posix"))
- (copy-recursively (string-append out "/share/zoneinfo-leaps")
- (string-append out "/share/zoneinfo/right")))))
- (delete 'configure))))))
-
-(define qbe-master
- (let ((commit "d023bdaa6b493686f7e9be7ac200ee4ac37d351f")
- (revision "1"))
- (package
- (inherit qbe)
- (name "qbe")
- (version (git-version "1.1" revision commit))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "git://c9x.me/qbe")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "11flr6mmxglidp4fr7whfzhwr1bjkiz0rcvpy541xmwm2isj5znm")))))))
-
-(define-public harec
- (let ((revision "1")
- (commit "b4dd4275b24513d14e999bc35ea7d61ed02d1e08"))
- (package
- (name "harec")
- (version (git-version "0.0.1" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://git.sr.ht/~sircmpwn/harec")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "1brb0qr6fsi2hx724rprkkwi6qs6ymqglng78gm9m8k6z7c61j8b"))))
- (build-system gnu-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'configure 'setenv
- (lambda _
- (setenv "AR" ,(ar-for-target))
- (setenv "AS" ,(as-for-target))
- (setenv "LD" ,(ld-for-target))
- (setenv "CC" ,(cc-for-target))))
- (add-after 'configure 'configure-better
- (lambda* (#:key outputs #:allow-other-keys)
- (invoke "./configure"
- (string-append "--prefix=" (assoc-ref outputs "out")))))
- (delete 'configure))))
- (inputs (list qbe-master scdoc))
- (synopsis "Bootstrapping compiler for Hare")
- (description "This package provides @code{harec}, the Hare language's
-bootstrap written in C. Currently, the self-hosting @code{harec} rewrite is
-incomplete, so this is used as the default compiler in the build driver.")
- (home-page "https://git.sr.ht/~sircmpwn/harec")
- (license license:gpl3))))
-
-
-(define-public hare
- (let ((revision "1")
- (commit "b35f4bc1551bf561de2e0e1fcd7367c20fa21216"))
- (package
- (name "hare")
- (version (git-version "0.0.1" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://git.sr.ht/~sircmpwn/hare")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0v5r7007dyy75qagffkhag1pqigdsv2qgbgwrn44d51ws695phzi"))))
- (inputs (list scdoc qbe-master harec tzdata-list))
- (build-system gnu-build-system)
- (arguments
- (list
- #:make-flags #~(list "HARECACHE=./cache" (string-append "PREFIX=" #$output))
- #:phases
- #~(modify-phases %standard-phases
- (add-before 'configure 'configure-make
- (lambda _
- (substitute*
- "time/chrono/+linux.ha"
- (("/usr/share/zoneinfo/leap-seconds.list")
- (string-append #$tzdata-list "/share/zoneinfo/leap-seconds.list"))
- (("/usr/share/zoneinfo/")
- (string-append #$tzdata-list "/share/zoneinfo/")))
- (copy-file "config.example.mk" "config.mk")
- ;; We don't need to do this if we are using the toolchain
- ;; below...
- #;(substitute*
- "config.mk"
- (("AS = as")
- (string-append "AS = "#$(as-for-target)))
- (("LD = ld")
- (string-append "LD = "#$(ld-for-target)))
- (("QBE = qbe")
- (string-append "QBE = " #$qbe-master "/bin/qbe"))
- (("SCDOC = scdoc")
- (string-append "SD =" #$scdoc "/bin/scdoc"))
- (("HAREC = harec")
- (string-append "HAREC =" #$harec "/bin/harec")))
- #;(substitute*
- "cmd/hare/build.ha"
- (("\"qbe\"")
- (string-append "\"" #$qbe-master "/bin/qbe" "\""))
- (("\"harec\"")
- (string-append "\"" #$harec "/bin/harec" "\"")))
- ))
- (delete 'configure))))
- (synopsis "Hare build driver")
- (description "Hare is a systems programming language designed to be
-simple, stable, and robust. Hare uses a static type system, manual memory
-management, and a minimal runtime. It is well-suited to writing operating
-systems, system tools, compilers, networking software, and other low-level,
-high performance tasks.")
- (home-page "https://git.sr.ht/~sircmpwn/hare")
- (license license:gpl3))))
-
-(define-public hare-toolchain
- (package
- (name "hare-toolchain")
- (version (package-version hare))
- (source #f)
- (build-system trivial-build-system)
- (arguments `(#:builder (begin (mkdir %output))))
- (propagated-inputs (list binutils hare harec qbe-master))
- (native-search-paths (package-native-search-paths hare))
- (home-page (package-home-page hare))
- (synopsis "Complete @code{hare} toolchain for Hare development")
- (description "This package provides a toolchain for the Hare language. It
-allows you to conveniently install all the required packages (such as
-@code{binutils} and @code{qbe}) into your profile.")
- (license (package-license hare))))
diff --git a/patches/newlib-getentropy.patch b/patches/newlib-getentropy.patch
new file mode 100644
index 0000000..a4137d8
--- /dev/null
+++ b/patches/newlib-getentropy.patch
@@ -0,0 +1,380 @@
+Patch-Source: https://github.com/zephyrproject-rtos/gcc/pull/8
+
+From 55addb0c0c5ff5e0aab85574aa26abf175af85c8 Mon Sep 17 00:00:00 2001
+From: Stephanos Ioannidis <root@stephanos.io>
+Date: Mon, 25 Jul 2022 23:10:41 +0900
+Subject: [PATCH] libstdc++: Do not check getentropy and arc4random for cross builds
+
+The "getentropy" and "arc4random" check may not yield a correct result
+for the cross compile builds because linking is often not available for
+them and the C library headers (notoriously, newlib) may still declare
+these function prototypes even if they are not actually part of the
+final library -- for this reason, this commit disables the "getentropy"
+and "arc4random" checks for non-native builds.
+
+This effectively prevents the std::random_device from making use of
+these functions when `--with-newlib` is specified, which is indeed a
+correct behaviour because the newlib does not provide a default stub
+for the "getentropy" function (also note that the newlib "arc4random"
+implementation internally calls the missing "getentropy" function).
+
+For other C libraries, the `GLIBCXX_CROSSCONFIG` function may hard-code
+the availability of these functions by manually defining
+`HAVE_GETENTROPY` and `HAVE_ARC4RANDOM`, or by calling the
+`GLIBCXX_CHECK_GETENTROPY` and `GLIBCXX_CHECK_ARC4RANDOM` functions.
+
+libstdc++-v3:
+ * configure.ac: Relocate GLIBCXX_CHECK_GETENTROPY and
+ GLIBCXX_CHECK_ARC4RANDOM
+ * configure: Regenerate.
+
+Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
+---
+ libstdc++-v3/configure | 300 +++++++++++++++++++-------------------
+ libstdc++-v3/configure.ac | 8 +-
+ 2 files changed, 154 insertions(+), 154 deletions(-)
+
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index 0ce74e8202443..5d43b56b03ffa 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -28088,6 +28088,156 @@ $as_echo "#define _GLIBCXX_USE_RANDOM_TR1 1" >>confdefs.h
+
+
+
++ # Check for other random number APIs
++
++
++
++ ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getentropy" >&5
++$as_echo_n "checking for getentropy... " >&6; }
++if ${glibcxx_cv_getentropy+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++
++ if test x$gcc_no_link = xyes; then
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++#include <unistd.h>
++int
++main ()
++{
++unsigned i;
++ ::getentropy(&i, sizeof(i));
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_compile "$LINENO"; then :
++ glibcxx_cv_getentropy=yes
++else
++ glibcxx_cv_getentropy=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++else
++ if test x$gcc_no_link = xyes; then
++ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++fi
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++#include <unistd.h>
++int
++main ()
++{
++unsigned i;
++ ::getentropy(&i, sizeof(i));
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++ glibcxx_cv_getentropy=yes
++else
++ glibcxx_cv_getentropy=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_getentropy" >&5
++$as_echo "$glibcxx_cv_getentropy" >&6; }
++
++ if test $glibcxx_cv_getentropy = yes; then
++
++$as_echo "#define HAVE_GETENTROPY 1" >>confdefs.h
++
++ fi
++ ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++
++
++
++
++ ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arc4random" >&5
++$as_echo_n "checking for arc4random... " >&6; }
++if ${glibcxx_cv_arc4random+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++
++ if test x$gcc_no_link = xyes; then
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++#include <stdlib.h>
++int
++main ()
++{
++unsigned i = ::arc4random();
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_compile "$LINENO"; then :
++ glibcxx_cv_arc4random=yes
++else
++ glibcxx_cv_arc4random=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++else
++ if test x$gcc_no_link = xyes; then
++ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
++fi
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++#include <stdlib.h>
++int
++main ()
++{
++unsigned i = ::arc4random();
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++ glibcxx_cv_arc4random=yes
++else
++ glibcxx_cv_arc4random=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_arc4random" >&5
++$as_echo "$glibcxx_cv_arc4random" >&6; }
++
++ if test $glibcxx_cv_arc4random = yes; then
++
++$as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
++
++ fi
++ ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++
++
+ # For TLS support.
+
+
+@@ -75519,156 +75669,6 @@ $as_echo "#define _GLIBCXX_X86_RDSEED 1" >>confdefs.h
+ fi
+
+
+-# Check for other random number APIs
+-
+-
+-
+- ac_ext=cpp
+-ac_cpp='$CXXCPP $CPPFLAGS'
+-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+-
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getentropy" >&5
+-$as_echo_n "checking for getentropy... " >&6; }
+-if ${glibcxx_cv_getentropy+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+-
+- if test x$gcc_no_link = xyes; then
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-#include <unistd.h>
+-int
+-main ()
+-{
+-unsigned i;
+- ::getentropy(&i, sizeof(i));
+- ;
+- return 0;
+-}
+-_ACEOF
+-if ac_fn_cxx_try_compile "$LINENO"; then :
+- glibcxx_cv_getentropy=yes
+-else
+- glibcxx_cv_getentropy=no
+-fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-else
+- if test x$gcc_no_link = xyes; then
+- as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+-fi
+-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-#include <unistd.h>
+-int
+-main ()
+-{
+-unsigned i;
+- ::getentropy(&i, sizeof(i));
+- ;
+- return 0;
+-}
+-_ACEOF
+-if ac_fn_cxx_try_link "$LINENO"; then :
+- glibcxx_cv_getentropy=yes
+-else
+- glibcxx_cv_getentropy=no
+-fi
+-rm -f core conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-fi
+-
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_getentropy" >&5
+-$as_echo "$glibcxx_cv_getentropy" >&6; }
+-
+- if test $glibcxx_cv_getentropy = yes; then
+-
+-$as_echo "#define HAVE_GETENTROPY 1" >>confdefs.h
+-
+- fi
+- ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
+-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+-
+-
+-
+-
+-
+- ac_ext=cpp
+-ac_cpp='$CXXCPP $CPPFLAGS'
+-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+-
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arc4random" >&5
+-$as_echo_n "checking for arc4random... " >&6; }
+-if ${glibcxx_cv_arc4random+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+-
+- if test x$gcc_no_link = xyes; then
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-#include <stdlib.h>
+-int
+-main ()
+-{
+-unsigned i = ::arc4random();
+- ;
+- return 0;
+-}
+-_ACEOF
+-if ac_fn_cxx_try_compile "$LINENO"; then :
+- glibcxx_cv_arc4random=yes
+-else
+- glibcxx_cv_arc4random=no
+-fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-else
+- if test x$gcc_no_link = xyes; then
+- as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+-fi
+-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-#include <stdlib.h>
+-int
+-main ()
+-{
+-unsigned i = ::arc4random();
+- ;
+- return 0;
+-}
+-_ACEOF
+-if ac_fn_cxx_try_link "$LINENO"; then :
+- glibcxx_cv_arc4random=yes
+-else
+- glibcxx_cv_arc4random=no
+-fi
+-rm -f core conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-fi
+-
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_arc4random" >&5
+-$as_echo "$glibcxx_cv_arc4random" >&6; }
+-
+- if test $glibcxx_cv_arc4random = yes; then
+-
+-$as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
+-
+- fi
+- ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
+-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+-
+-
+-
+ # This depends on GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE.
+
+ # Do checks for resource limit functions.
+diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
+index e59bcdb29441f..05cdfcddbc43b 100644
+--- a/libstdc++-v3/configure.ac
++++ b/libstdc++-v3/configure.ac
+@@ -269,6 +269,10 @@ if $GLIBCXX_IS_NATIVE; then
+ # For /dev/random and /dev/urandom for std::random_device.
+ GLIBCXX_CHECK_DEV_RANDOM
+
++ # Check for other random number APIs
++ GLIBCXX_CHECK_GETENTROPY
++ GLIBCXX_CHECK_ARC4RANDOM
++
+ # For TLS support.
+ GCC_CHECK_TLS
+
+@@ -474,10 +478,6 @@ GLIBCXX_CHECK_X86_RDRAND
+ # Check if assembler supports rdseed opcode.
+ GLIBCXX_CHECK_X86_RDSEED
+
+-# Check for other random number APIs
+-GLIBCXX_CHECK_GETENTROPY
+-GLIBCXX_CHECK_ARC4RANDOM
+-
+ # This depends on GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE.
+ GLIBCXX_CONFIGURE_TESTSUITE
+
diff --git a/qemu-build-info-manual.patch b/qemu-build-info-manual.patch
deleted file mode 100644
index ff28266..0000000
--- a/qemu-build-info-manual.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 2793f47c066ed396b38893c10533202fceb1a05f Mon Sep 17 00:00:00 2001
-From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
-Date: Thu, 17 Sep 2020 13:28:19 -0400
-Subject: [PATCH] build: Build and install a Texinfo version of the manual.
-
-Take advantage of the Sphinx texinfo backend to generate a QEMU info
-manual. The Texinfo format allows for more structure and info readers
-provide more advanced navigation capabilities compared to manpages
-readers.
-
-* docs/meson.build (texi, info): New targets.
-
-Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
-
-diff --git a/docs/meson.build b/docs/meson.build
---- a/docs/meson.build
-+++ b/docs/meson.build
-@@ -92,4 +92,25 @@ if build_docs
- alias_target('sphinxdocs', sphinxdocs)
- alias_target('html', sphinxdocs)
- alias_target('man', sphinxmans)
-+
-+ # Generate a Texinfo version of the QEMU manual.
-+ makeinfo = find_program(['texi2any', 'makeinfo'])
-+ if makeinfo.found()
-+ sphinxtexi = custom_target(
-+ 'QEMU manual generated texinfo source',
-+ output: ['QEMU.texi', 'sphinxtexi.stamp'],
-+ depfile: 'sphinxtexi.d',
-+ command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@',
-+ '-Ddepfile_stamp=@OUTPUT1@', '-b', 'texinfo',
-+ meson.current_source_dir(), meson.current_build_dir()])
-+ sphinxinfo = custom_target(
-+ 'QEMU info manual',
-+ input: sphinxtexi,
-+ output: 'QEMU.info',
-+ install: true,
-+ install_dir: get_option('infodir'),
-+ command: [makeinfo, '--no-split', '@INPUT0@', '--output=@OUTPUT@'])
-+ alias_target('texi', sphinxtexi)
-+ alias_target('info', sphinxinfo)
-+ endif
- endif
-diff --git a/meson.build b/meson.build
---- a/meson.build
-+++ b/meson.build
-@@ -37,6 +37,7 @@ endif
- qemu_confdir = get_option('sysconfdir') / get_option('qemu_suffix')
- qemu_datadir = get_option('datadir') / get_option('qemu_suffix')
- qemu_docdir = get_option('docdir') / get_option('qemu_suffix')
-+qemu_infodir = get_option('infodir') / get_option('qemu_suffix')
- qemu_moddir = get_option('libdir') / get_option('qemu_suffix')
-
- qemu_desktopdir = get_option('datadir') / 'applications'
-@@ -3698,6 +3699,7 @@ else
- summary_info += {'local state directory': 'queried at runtime'}
- endif
- summary_info += {'Doc directory': get_option('prefix') / get_option('docdir')}
-+summary_info += {'Info directory': get_option('prefix') / get_option('infodir')}
- summary_info += {'Build directory': meson.current_build_dir()}
- summary_info += {'Source path': meson.current_source_dir()}
- summary_info += {'GIT submodules': config_host['GIT_SUBMODULES']}
diff --git a/qemu-disable-aarch64-migration-test.patch b/qemu-disable-aarch64-migration-test.patch
deleted file mode 100644
index bf60ed2..0000000
--- a/qemu-disable-aarch64-migration-test.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Disable the qtest-aarch64/migration-test, which sometimes fail non-deterministically.
-See: https://gitlab.com/qemu-project/qemu/-/issues/1230.
-
---- qemu-7.1.0/tests/qtest/meson.build.old 1969-12-31 19:00:01.000000000 -0500
-+++ qemu-7.1.0/tests/qtest/meson.build 2022-09-26 11:11:05.434209797 -0400
-@@ -219,7 +219,6 @@
- ['arm-cpu-features',
- 'numa-test',
- 'boot-serial-test',
-- 'migration-test',
- 'bcm2835-dma-test']
-
- qtests_s390x = \
diff --git a/qemu-fix-agent-paths.patch b/qemu-fix-agent-paths.patch
deleted file mode 100644
index 0c29890..0000000
--- a/qemu-fix-agent-paths.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-Allow a QEMU host to set the time and shutdown Guix guests. Styled
-after the patch from the Nix package:
-
-https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/virtualization/qemu/fix-qemu-ga.patch
-
-diff --git a/qga/commands-posix.c b/qga/commands-posix.c
---- a/qga/commands-posix.c
-+++ b/qga/commands-posix.c
-@@ -84,6 +84,7 @@ static void ga_wait_child(pid_t pid, int *status, Error **errp)
- void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
- {
- const char *shutdown_flag;
-+ const char *command;
- Error *local_err = NULL;
- pid_t pid;
- int status;
-@@ -101,10 +102,13 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
- slog("guest-shutdown called, mode: %s", mode);
- if (!has_mode || strcmp(mode, "powerdown") == 0) {
- shutdown_flag = powerdown_flag;
-+ command = "shutdown";
- } else if (strcmp(mode, "halt") == 0) {
- shutdown_flag = halt_flag;
-+ command = "halt";
- } else if (strcmp(mode, "reboot") == 0) {
- shutdown_flag = reboot_flag;
-+ command = "reboot";
- } else {
- error_setg(errp,
- "mode is invalid (valid values are: halt|powerdown|reboot");
-@@ -123,6 +127,11 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
- execl("/sbin/shutdown", "shutdown", shutdown_flag, "-g0", "-y",
- "hypervisor initiated shutdown", (char *)NULL);
- #else
-+ /* try Guix’s shutdown/halt/reboot first */
-+ char *path = g_strdup_printf("/run/current-system/profile/sbin/%s", command);
-+ execl(path, command, (char *)NULL);
-+ g_free(path);
-+
- execl("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
- "hypervisor initiated shutdown", (char *)NULL);
- #endif
-@@ -159,10 +168,12 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
- Error *local_err = NULL;
- struct timeval tv;
- static const char hwclock_path[] = "/sbin/hwclock";
-+ static const char hwclock_path_guix[] = "/run/current-system/profile/sbin/hwclock";
- static int hwclock_available = -1;
-
- if (hwclock_available < 0) {
-- hwclock_available = (access(hwclock_path, X_OK) == 0);
-+ hwclock_available = (access(hwclock_path_guix, X_OK) == 0) ||
-+ (access(hwclock_path, X_OK) == 0);
- }
-
- if (!hwclock_available) {
-@@ -208,6 +219,8 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
-
- /* Use '/sbin/hwclock -w' to set RTC from the system time,
- * or '/sbin/hwclock -s' to set the system time from RTC. */
-+ execl(hwclock_path_guix, "hwclock", has_time ? "-w" : "-s",
-+ NULL);
- execl(hwclock_path, "hwclock", has_time ? "-w" : "-s", NULL);
- _exit(EXIT_FAILURE);
- } else if (pid < 0) {
diff --git a/qemu-glibc-2.27.patch b/qemu-glibc-2.27.patch
deleted file mode 100644
index b1f354a..0000000
--- a/qemu-glibc-2.27.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001
-From: Paolo Bonzini <pbonzini@redhat.com>
-Date: Tue, 28 Nov 2017 11:51:27 +0100
-Subject: [PATCH] memfd: fix configure test
-MIME-Version: 1.0
-Content-Type: text/plain; charset=utf8
-Content-Transfer-Encoding: 8bit
-
-Recent glibc added memfd_create in sys/mman.h. This conflicts with
-the definition in util/memfd.c:
-
- /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration
-
-Fix the configure test, and remove the sys/memfd.h inclusion since the
-file actually does not exist---it is a typo in the memfd_create(2) man
-page.
-
-Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
-Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
----
- configure | 2 +-
- util/memfd.c | 4 +---
- 2 files changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/configure b/configure
-index 9c8aa5a..99ccc17 100755
---- a/configure
-+++ b/configure
-@@ -3923,7 +3923,7 @@ fi
- # check if memfd is supported
- memfd=no
- cat > $TMPC << EOF
--#include <sys/memfd.h>
-+#include <sys/mman.h>
-
- int main(void)
- {
-diff --git a/util/memfd.c b/util/memfd.c
-index 4571d1a..412e94a 100644
---- a/util/memfd.c
-+++ b/util/memfd.c
-@@ -31,9 +31,7 @@
-
- #include "qemu/memfd.h"
-
--#ifdef CONFIG_MEMFD
--#include <sys/memfd.h>
--#elif defined CONFIG_LINUX
-+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
- #include <sys/syscall.h>
- #include <asm/unistd.h>
-
---
-1.8.3.1
-
diff --git a/qemu-glibc-2.30.patch b/qemu-glibc-2.30.patch
deleted file mode 100644
index 1b74dee..0000000
--- a/qemu-glibc-2.30.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-This patch was taken from NixOS
-https://raw.githubusercontent.com/Mindavi/nixpkgs/1a737743a829746e48f4869ac517ff29c23c9d09/pkgs/tools/security/afl/qemu-patches/syscall-glibc2_30.diff
-It is based on an unmerged patch against american-fuzzy-lop and was
-never merged upstream because the author was unable to sign Google's CLA.
-Based on https://github.com/google/AFL/commit/6c917e3d63a2a0685d58c3518524f9615b001893.patch
-
---- qemu-2.10.0-clean/linux-user/syscall.c 2020-03-12 18:47:47.898592169 +0100
-+++ qemu-2.10.0/linux-user/syscall.c 2020-03-13 09:13:42.461809699 +0100
-@@ -34,6 +34,7 @@
- #include <sys/resource.h>
- #include <sys/swap.h>
- #include <linux/capability.h>
-+#include <linux/sockios.h> // https://lkml.org/lkml/2019/6/3/988
- #include <sched.h>
- #include <sys/timex.h>
- #ifdef __ia64__
-@@ -256,7 +257,9 @@ static type name (type1 arg1,type2 arg2,
- #endif
-
- #ifdef __NR_gettid
--_syscall0(int, gettid)
-+// taken from https://patchwork.kernel.org/patch/10862231/
-+#define __NR_sys_gettid __NR_gettid
-+_syscall0(int, sys_gettid)
- #else
- /* This is a replacement for the host gettid() and must return a host
- errno. */
-@@ -6219,7 +6222,7 @@ static void *clone_func(void *arg)
- cpu = ENV_GET_CPU(env);
- thread_cpu = cpu;
- ts = (TaskState *)cpu->opaque;
-- info->tid = gettid();
-+ info->tid = sys_gettid();
- task_settid(ts);
- if (info->child_tidptr)
- put_user_u32(info->tid, info->child_tidptr);
-@@ -6363,9 +6366,9 @@ static int do_fork(CPUArchState *env, un
- mapping. We can't repeat the spinlock hack used above because
- the child process gets its own copy of the lock. */
- if (flags & CLONE_CHILD_SETTID)
-- put_user_u32(gettid(), child_tidptr);
-+ put_user_u32(sys_gettid(), child_tidptr);
- if (flags & CLONE_PARENT_SETTID)
-- put_user_u32(gettid(), parent_tidptr);
-+ put_user_u32(sys_gettid(), parent_tidptr);
- ts = (TaskState *)cpu->opaque;
- if (flags & CLONE_SETTLS)
- cpu_set_tls (env, newtls);
-@@ -11402,7 +11405,7 @@ abi_long do_syscall(void *cpu_env, int n
- break;
- #endif
- case TARGET_NR_gettid:
-- ret = get_errno(gettid());
-+ ret = get_errno(sys_gettid());
- break;
- #ifdef TARGET_NR_readahead
- case TARGET_NR_readahead:
diff --git a/qemu.scm b/qemu.scm
deleted file mode 100644
index c0e5e7a..0000000
--- a/qemu.scm
+++ /dev/null
@@ -1,455 +0,0 @@
-; We need this because we have issues with 8.1.X:
-; https://gitlab.com/qemu-project/qemu/-/issues/1908
-(define-module (qemu)
- #:use-module (gnu packages)
- #:use-module (gnu packages acl)
- #:use-module (gnu packages admin)
- #:use-module (gnu packages assembly)
- #:use-module (gnu packages attr)
- #:use-module (gnu packages autotools)
- #:use-module (gnu packages backup)
- #:use-module (gnu packages base)
- #:use-module (gnu packages bash)
- #:use-module (gnu packages bison)
- #:use-module (gnu packages bootloaders)
- #:use-module (gnu packages build-tools)
- #:use-module (gnu packages check)
- #:use-module (gnu packages cluster)
- #:use-module (gnu packages cmake)
- #:use-module (gnu packages compression)
- #:use-module (gnu packages containers)
- #:use-module (gnu packages cross-base)
- #:use-module (gnu packages cryptsetup)
- #:use-module (gnu packages curl)
- #:use-module (gnu packages cyrus-sasl)
- #:use-module (gnu packages debian)
- #:use-module (gnu packages disk)
- #:use-module (gnu packages dns)
- #:use-module (gnu packages docbook)
- #:use-module (gnu packages documentation)
- #:use-module (gnu packages figlet)
- #:use-module (gnu packages firmware)
- #:use-module (gnu packages flex)
- #:use-module (gnu packages fonts)
- #:use-module (gnu packages fontutils)
- #:use-module (gnu packages freedesktop)
- #:use-module (gnu packages gettext)
- #:use-module (gnu packages gcc)
- #:use-module (gnu packages gl)
- #:use-module (gnu packages glib)
- #:use-module (gnu packages gnome)
- #:use-module (gnu packages gnupg)
- #:use-module (gnu packages golang)
- #:use-module (gnu packages graphviz)
- #:use-module (gnu packages gtk)
- #:use-module (gnu packages haskell)
- #:use-module (gnu packages haskell-apps)
- #:use-module (gnu packages haskell-check)
- #:use-module (gnu packages haskell-crypto)
- #:use-module (gnu packages haskell-web)
- #:use-module (gnu packages haskell-xyz)
- #:use-module (gnu packages image)
- #:use-module (gnu packages libbsd)
- #:use-module (gnu packages libusb)
- #:use-module (gnu packages linux)
- #:use-module (gnu packages m4)
- #:use-module (gnu packages man)
- #:use-module (gnu packages multiprecision)
- #:use-module (gnu packages ncurses)
- #:use-module (gnu packages nettle)
- #:use-module (gnu packages networking)
- #:use-module (gnu packages ninja)
- #:use-module (gnu packages onc-rpc)
- #:use-module (gnu packages package-management)
- #:use-module (gnu packages pciutils)
- #:use-module (gnu packages pcre)
- #:use-module (gnu packages perl)
- #:use-module (gnu packages pkg-config)
- #:use-module (gnu packages polkit)
- #:use-module (gnu packages protobuf)
- #:use-module (gnu packages python)
- #:use-module (gnu packages python-build)
- #:use-module (gnu packages python-check)
- #:use-module (gnu packages python-crypto)
- #:use-module (gnu packages python-web)
- #:use-module (gnu packages python-xyz)
- #:use-module (gnu packages pulseaudio)
- #:use-module (gnu packages readline)
- #:use-module (gnu packages rsync)
- #:use-module (gnu packages selinux)
- #:use-module (gnu packages sdl)
- #:use-module (gnu packages sphinx)
- #:use-module (gnu packages spice)
- #:use-module (gnu packages ssh)
- #:use-module (gnu packages texinfo)
- #:use-module (gnu packages textutils)
- #:use-module (gnu packages tls)
- #:use-module (gnu packages web)
- #:use-module (gnu packages wget)
- #:use-module (gnu packages xdisorg)
- #:use-module (gnu packages xml)
- #:use-module (gnu packages xorg)
- #:use-module (guix build-system cmake)
- #:use-module (guix build-system gnu)
- #:use-module (guix build-system go)
- #:use-module (guix build-system meson)
- #:use-module (guix build-system python)
- #:use-module (guix build-system trivial)
- #:use-module (guix download)
- #:use-module (guix git-download)
- #:use-module (guix gexp)
- #:use-module ((guix licenses) #:prefix license:)
- #:use-module (guix packages)
- #:use-module (guix utils)
- #:use-module (srfi srfi-1)
- #:use-module (srfi srfi-26)
- #:use-module (ice-9 match))
-
-(define-public qemu
- (package
- (name "qemu")
- (version "7.2.4")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "https://download.qemu.org/qemu-"
- version ".tar.xz"))
- (sha256
- (base32 "0795l8xsy67fnh4mbdz40jm880iisd7q6d7ly6nfzpac3gjr8zyf"))
- (patches (search-patches "qemu-build-info-manual.patch"
- "qemu-disable-aarch64-migration-test.patch"
- "qemu-fix-agent-paths.patch"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- ;; TODO: Scrub all firmwares from this directory!
- (with-directory-excursion "pc-bios"
- ;; Delete firmwares provided by SeaBIOS.
- (for-each delete-file (find-files "." "^(bios|vgabios).*\\.bin$"))
- ;; Delete SGABIOS.
- (delete-file "sgabios.bin")
- ;; Delete ppc64 OpenBIOS. TODO: Remove sparc32 and sparc64 too
- ;; once they are supported in Guix.
- (delete-file "openbios-ppc")
- ;; Delete riscv64 OpenSBI. TODO: Remove riscv32 when supported
- ;; in Guix.
- (delete-file "opensbi-riscv64-generic-fw_dynamic.bin")
- ;; Delete iPXE firmwares.
- (for-each delete-file (find-files "." "^(efi|pxe)-.*\\.rom$")))
- ;; Delete bundled code that we provide externally.
- (for-each delete-file-recursively
- '("dtc" "meson"
- "roms/ipxe"
- "roms/openbios"
- "roms/opensbi"
- "roms/seabios"
- "roms/sgabios"))))))
- (outputs '("out" "static" "doc")) ;5.3 MiB of HTML docs
- (build-system gnu-build-system)
- (arguments
- (list
- ;; FIXME: Disable tests on i686 to work around
- ;; <https://bugs.gnu.org/40527>.
- #:tests? (or (%current-target-system)
- (not (string=? "i686-linux" (%current-system))))
- #:configure-flags
- #~(let ((gcc (search-input-file %build-inputs "/bin/gcc"))
- (meson (search-input-file %build-inputs "bin/meson"))
- (openbios (search-input-file %build-inputs
- "share/qemu/openbios-ppc"))
- (opensbi (search-input-file
- %build-inputs
- "share/qemu/opensbi-riscv64-generic-fw_dynamic.bin"))
- (seabios (search-input-file %build-inputs
- "share/qemu/bios.bin"))
- (sgabios (search-input-file %build-inputs
- "/share/qemu/sgabios.bin"))
- (ipxe (search-input-file %build-inputs
- "share/qemu/pxe-virtio.rom"))
- (out #$output))
- (list (string-append "--cc=" gcc)
- ;; Some architectures insist on using HOST_CC.
- (string-append "--host-cc=" gcc)
- (string-append "--meson=" meson)
- (string-append "--prefix=" out)
-
- "--sysconfdir=/etc"
- "--enable-fdt=system"
- (string-append "--firmwarepath=" out "/share/qemu:"
- (dirname seabios) ":"
- (dirname ipxe) ":"
- (dirname openbios) ":"
- (dirname opensbi) ":"
- (dirname sgabios))
- (string-append "--smbd=" out "/libexec/samba-wrapper")
- "--disable-debug-info" ;for space considerations
- ;; The binaries need to be linked against -lrt.
- (string-append "--extra-ldflags=-lrt")))
- ;; Make build and test output verbose to facilitate investigation upon failure.
- #:make-flags #~'("V=1")
- #:modules `((srfi srfi-1)
- (srfi srfi-26)
- (ice-9 ftw)
- (ice-9 match)
- ,@%gnu-build-system-modules)
- #:phases
- #~(modify-phases %standard-phases
- ;; Since we removed the bundled firmwares above, many tests
- ;; can't work. Re-add them here.
- (add-after 'unpack 'replace-firmwares
- (lambda* (#:key inputs #:allow-other-keys)
- (let* ((seabios (dirname (search-input-file
- inputs "share/qemu/bios.bin")))
- (seabios-firmwares (find-files seabios "\\.bin$"))
- (sgabios (search-input-file inputs "share/qemu/sgabios.bin"))
- (ipxe (dirname (search-input-file
- inputs "share/qemu/pxe-virtio.rom")))
- (ipxe-firmwares (find-files ipxe "\\.rom$"))
- (openbios (search-input-file
- inputs "share/qemu/openbios-ppc"))
- (opensbi-riscv64
- (search-input-file
- inputs
- "share/qemu/opensbi-riscv64-generic-fw_dynamic.bin"))
- (allowed-differences
- ;; Ignore minor differences (addresses etc) in the firmware
- ;; data tables compared to what the test suite expects.
- '("tests/data/acpi/pc/SSDT.dimmpxm"
- "tests/data/acpi/pc/DSDT.dimmpxm"
- "tests/data/acpi/pc/ERST.acpierst"
- "tests/data/acpi/q35/ERST.acpierst"
- "tests/data/acpi/q35/DSDT.cxl"))
- (allowed-differences-whitelist
- (open-file "tests/qtest/bios-tables-test-allowed-diff.h"
- "a")))
- (with-directory-excursion "pc-bios"
- (for-each (lambda (file)
- (symlink file (basename file)))
- (append seabios-firmwares ipxe-firmwares
- (list openbios opensbi-riscv64 sgabios))))
- (for-each (lambda (file)
- (format allowed-differences-whitelist
- "\"~a\",~%" file))
- allowed-differences)
- (close-port allowed-differences-whitelist))))
- (add-after 'unpack 'extend-test-time-outs
- (lambda _
- ;; These tests can time out on heavily-loaded and/or slow storage.
- (substitute* (cons* "tests/qemu-iotests/common.qemu"
- (find-files "tests/qemu-iotests" "^[0-9]+$"))
- (("QEMU_COMM_TIMEOUT=[0-9]+" match)
- (string-append match "9")))))
- (add-after 'unpack 'disable-unusable-tests
- (lambda _
- (substitute* "tests/unit/meson.build"
- ;; Comment out the test-qga test, which needs /sys and
- ;; fails within the build environment.
- (("tests.*test-qga.*$" all)
- (string-append "# " all))
- ;; Comment out the test-char test, which needs networking and
- ;; fails within the build environment.
- ((".*'test-char':.*" all)
- (string-append "# " all)))
- (substitute* "tests/qtest/meson.build"
- ;; These tests fail to get the expected number of tests
- ;; on arm platforms.
- (("'arm-cpu-features',") ""))))
- #$@(if (target-riscv64?)
- '((add-after 'unpack 'disable-some-tests
- (lambda _
- ;; qemu.qmp.QMPConnectError:
- ;; Unexpected empty reply from server
- (delete-file "tests/qemu-iotests/040")
- (delete-file "tests/qemu-iotests/041")
- (delete-file "tests/qemu-iotests/256")
-
- ;; No 'PCI' bus found for device 'virtio-scsi-pci'
- (delete-file "tests/qemu-iotests/127")
- (delete-file "tests/qemu-iotests/267"))))
- '())
- (add-after 'patch-source-shebangs 'patch-embedded-shebangs
- (lambda* (#:key native-inputs inputs #:allow-other-keys)
- ;; Ensure the executables created by these source files reference
- ;; /bin/sh from the store so they work inside the build container.
- (substitute* '("block/cloop.c" "migration/exec.c"
- "net/tap.c" "tests/qtest/libqtest.c"
- "tests/qtest/vhost-user-blk-test.c")
- (("/bin/sh") (search-input-file inputs "/bin/sh")))
- (substitute* "tests/qemu-iotests/testenv.py"
- (("#!/usr/bin/env python3")
- (string-append "#!" (search-input-file (or native-inputs inputs)
- "/bin/python3"))))))
- (add-before 'configure 'fix-optionrom-makefile
- (lambda _
- ;; Work around the inability of the rules defined in this
- ;; Makefile to locate the firmware files (e.g.: No rule to make
- ;; target 'multiboot.bin') by extending the VPATH.
- (substitute* "pc-bios/optionrom/Makefile"
- (("^VPATH = \\$\\(SRC_DIR\\)")
- "VPATH = $(SRC_DIR):$(TOPSRC_DIR)/pc-bios"))))
- ;; XXX ./configure is being re-run at beginning of build phase...
- (replace 'configure
- (lambda* (#:key inputs configure-flags #:allow-other-keys)
- ;; The `configure' script doesn't understand some of the
- ;; GNU options. Thus, add a new phase that's compatible.
- (setenv "SHELL" (which "bash"))
- ;; Ensure config.status gets the correct shebang off the bat.
- ;; The build system gets confused if we change it later and
- ;; attempts to re-run the whole configuration, and fails.
- (substitute* "configure"
- (("#!/bin/sh")
- (string-append "#!" (which "sh"))))
- (mkdir-p "b/qemu")
- (chdir "b/qemu")
- (apply invoke "../../configure" configure-flags)))
-
- ;; Configure, build and install QEMU user-emulation static binaries.
- (add-after 'configure 'configure-user-static
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((static (assoc-ref outputs "static"))
- (gcc (search-input-file inputs "/bin/gcc"))
- ;; This is the common set of configure flags; it is
- ;; duplicated here to isolate this phase from manipulations
- ;; to the #:configure-flags build argument, as done in
- ;; derived packages such as qemu-minimal.
- (configure-flags (list (string-append "--cc=" gcc)
- (string-append "--host-cc=" gcc)
- "--sysconfdir=/etc"
- "--disable-debug-info")))
- (mkdir-p "../user-static")
- (with-directory-excursion "../user-static"
- (apply invoke "../../configure"
- "--static"
- "--disable-docs" ;already built
- "--disable-system"
- "--enable-linux-user"
- (string-append "--prefix=" static)
- configure-flags)))))
- (add-after 'build 'build-user-static
- (lambda args
- (with-directory-excursion "../user-static"
- (apply (assoc-ref %standard-phases 'build) args))))
- (add-after 'install 'install-user-static
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((static (assoc-ref outputs "static"))
- (bin (string-append static "/bin")))
- (with-directory-excursion "../user-static"
- (for-each (cut install-file <> bin)
- (append-map (cut find-files <> "^qemu-" #:stat stat)
- (scandir "."
- (cut string-suffix?
- "-linux-user" <>))))))))
-
- (add-after 'install 'delete-firmwares
- (lambda _
- ;; Delete firmares that are accessible on --firmwarepath.
- ;; For some reason tests fail if we simply remove them from
- ;; pc-bios/meson.build, hence this roundabout way.
- (with-directory-excursion (string-append #$output "/share/qemu")
- (for-each delete-file
- (append
- '("openbios-ppc"
- "opensbi-riscv64-generic-fw_dynamic.bin"
- "sgabios.bin")
- (find-files "." "^(vga)?bios(-[a-z0-9-]+)?\\.bin$")
- (find-files "." "^(efi|pxe)-.*\\.rom$"))))))
- ;; Create a wrapper for Samba. This allows QEMU to use Samba without
- ;; pulling it in as an input. Note that you need to explicitly install
- ;; Samba in your Guix profile for Samba support.
- (add-after 'install 'create-samba-wrapper
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((libexec (string-append #$output "/libexec")))
- (call-with-output-file "samba-wrapper"
- (lambda (port)
- (format port "#!/bin/sh
-exec smbd $@")))
- (chmod "samba-wrapper" #o755)
- (install-file "samba-wrapper" libexec))))
- (add-after 'install 'move-html-doc
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out #$output)
- (doc #$output:doc)
- (qemu-doc (string-append doc "/share/doc/qemu-"
- #$(package-version this-package))))
- (mkdir-p qemu-doc)
- (rename-file (string-append out "/share/doc/qemu")
- (string-append qemu-doc "/html"))))))))
- (inputs
- (list alsa-lib
- bash-minimal
- dtc
- glib
- gtk+
- ipxe-qemu
- libaio
- libcacard ;smartcard support
- attr libcap-ng ;VirtFS support
- libdrm
- libepoxy
- libjpeg-turbo
- libpng
- libseccomp
- libslirp
- liburing
- libusb ;USB pass-through support
- mesa
- ncurses
- openbios-qemu-ppc
- opensbi-qemu
- ;; ("pciutils" ,pciutils)
- pixman
- pulseaudio
- sdl2
- seabios-qemu
- sgabios
- spice
- usbredir
- util-linux
- vde2
- virglrenderer
-
- ;; Formats to support for .qcow2 (and possibly other) compression.
- zlib
- `(,zstd "lib")))
- (native-inputs
- ;; Note: acpica is here only to pretty-print firmware differences with IASL
- ;; (see the replace-firmwares phase above).
- (list acpica
- bison
- flex
- gettext-minimal
- `(,glib "bin") ;gtester, etc.
- meson
- ninja
- perl
- pkg-config
- python-wrapper
- python-sphinx
- python-sphinx-rtd-theme
- texinfo
- ;; The following static libraries are required to build
- ;; the static output of QEMU.
- `(,glib "static")
- `(,pcre "static")
- `(,zlib "static")))
- (home-page "https://www.qemu.org")
- (synopsis "Machine emulator and virtualizer")
- (description
- "QEMU is a generic machine emulator and virtualizer.
-
-When used as a machine emulator, QEMU can run OSes and programs made for one
-machine (e.g. an ARM board) on a different machine---e.g., your own PC. By
-using dynamic translation, it achieves very good performance.
-
-When used as a virtualizer, QEMU achieves near native performances by
-executing the guest code directly on the host CPU. QEMU supports
-virtualization when executing under the Xen hypervisor or using
-the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86,
-server and embedded PowerPC, and S390 guests.")
-
- ;; Many files are GPLv2+, but some are GPLv2-only---e.g., `memory.c'.
- (license license:gpl2)
-
- ;; Several tests fail on MIPS; see <http://hydra.gnu.org/build/117914>.
- (supported-systems (fold delete %supported-systems
- '("mips64el-linux" "i586-gnu")))))
diff --git a/scholarref.scm b/scholarref.scm
index a97a5ac..19e573b 100644
--- a/scholarref.scm
+++ b/scholarref.scm
@@ -14,12 +14,12 @@
(commit "837cbf4b25333714a49d659ac7941f7041360f59"))
(package
(name "scholarref")
- (version (git-version "0.0.1" revision commit ))
+ (version (git-version "0.0.1" revision commit))
(source (origin
(method git-fetch)
(uri (git-reference
- (url "git://src.adamsgaard.dk/scholarref")
- (commit version)))
+ (url "https://src.adamsgaard.dk/scholarref.git")
+ (commit commit)))
(sha256
(base32 "0dhx4ncjvklwc2a67f8wc8az5n3qv7nnkmknbqffaivl7fkz58bi"))))
(propagated-inputs (list poppler xclip xdg-utils curl))
diff --git a/tuxedo-keyboard.scm b/tuxedo-keyboard.scm
deleted file mode 100644
index c42f476..0000000
--- a/tuxedo-keyboard.scm
+++ /dev/null
@@ -1,36 +0,0 @@
-(define-module (tuxedo-keyboard)
- #:use-module ((guix licenses) #:prefix license:)
- #:use-module (guix packages)
- #:use-module (gnu packages linux)
- #:use-module (guix git-download)
- #:use-module (guix build-system linux-module))
-
-(define-public tuxedo-keyboard
- (let ((commit-ref "84442d0b2f3d3bff691ce8b96bb3baced4d692c0"))
- (package
- (name "tuxedo-keyboard")
- (version commit-ref)
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/tuxedocomputers/tuxedo-keyboard")
- (commit commit-ref)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "104i050ymrj0h0p52q52mn496gchq2k1gnnvxcqffrb69gzsa153"))))
- (arguments
- ;; Has no tests
- `(#:tests? #f))
- (native-inputs
- `(("linux-headers" ,linux-libre-headers)))
- (build-system linux-module-build-system)
- (home-page "http://www.tuxedocomputers.com")
- (synopsis "TUXEDO Computers Kernel Module for keyboard backlighting")
- (description "Additions:
-@itemize
-@item Sysfs interface to control the brightness, mode, color, on/off state
-@item DKMS Ready
-@item Full RGB Color Support
-@item WMI Support for FN-Keys
-@end itemize")
- (license license:gpl3+))))
diff --git a/zig-Revert-Never-implicitly-add-rpaths-for-each-lib-dir-.patch b/zig-Revert-Never-implicitly-add-rpaths-for-each-lib-dir-.patch
deleted file mode 100644
index 388b7c5..0000000
--- a/zig-Revert-Never-implicitly-add-rpaths-for-each-lib-dir-.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From b0e5390d0b2add2eb33496dc465e0ab360995d15 Mon Sep 17 00:00:00 2001
-From: Ekaitz Zarraga <ekaitz@elenq.tech>
-Date: Fri, 17 Nov 2023 23:20:58 +0100
-Subject: [PATCH] Revert "Never implicitly add rpaths for each lib dir, add
- NixOS libdir to rpath"
-
-This reverts commit 6fd7c2993044b2f6f43af1c640c11be22eca426c.
----
- lib/std/zig/system/NativePaths.zig | 1 -
- src/Compilation.zig | 2 +-
- 2 files changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/lib/std/zig/system/NativePaths.zig b/lib/std/zig/system/NativePaths.zig
-index 4c8f1286b..cfa567f4b 100644
---- a/lib/std/zig/system/NativePaths.zig
-+++ b/lib/std/zig/system/NativePaths.zig
-@@ -61,7 +61,6 @@ pub fn detect(arena: Allocator, native_info: NativeTargetInfo) !NativePaths {
- } else if (word.len > 2 and word[0] == '-' and word[1] == 'L') {
- const lib_path = word[2..];
- try self.addLibDir(lib_path);
-- try self.addRPath(lib_path);
- } else {
- try self.addWarningFmt("Unrecognized C flag from NIX_LDFLAGS: {s}", .{word});
- break;
-diff --git a/src/Compilation.zig b/src/Compilation.zig
-index a08c3e09f..1c73f8467 100644
---- a/src/Compilation.zig
-+++ b/src/Compilation.zig
-@@ -1542,7 +1542,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
- .llvm_cpu_features = llvm_cpu_features,
- .skip_linker_dependencies = options.skip_linker_dependencies,
- .parent_compilation_link_libc = options.parent_compilation_link_libc,
-- .each_lib_rpath = options.each_lib_rpath orelse false,
-+ .each_lib_rpath = options.each_lib_rpath orelse options.is_native_os,
- .build_id = build_id,
- .cache_mode = cache_mode,
- .disable_lld_caching = options.disable_lld_caching or cache_mode == .whole,
---
-2.41.0
-
diff --git a/zig-do-not-link-against-librt.patch b/zig-do-not-link-against-librt.patch
deleted file mode 100644
index 3239efb..0000000
--- a/zig-do-not-link-against-librt.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/src/target.zig 2023-04-22 11:44:47.917416658 +0200
-+++ b/src/target.zig 2023-04-22 11:45:04.577465352 +0200
-@@ -478,7 +478,6 @@
- "-lpthread",
- "-lc",
- "-ldl",
-- "-lrt",
- "-lutil",
- },
- },
diff --git a/zig.scm b/zig.scm
deleted file mode 100644
index 5e977aa..0000000
--- a/zig.scm
+++ /dev/null
@@ -1,191 +0,0 @@
-(define-module (zig)
- #:use-module (guix packages)
- #:use-module (guix utils)
- #:use-module (guix gexp)
- #:use-module (guix git-download)
- #:use-module ((guix licenses) #:prefix license:)
- #:use-module (guix build-system cmake)
- #:use-module (guix build utils)
- #:use-module (gnu packages)
- #:use-module (gnu packages compression)
- #:use-module (gnu packages llvm))
-
-(define-public zig-0.11
- (package
- (name "zig")
- (version "0.11.0")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/ziglang/zig.git")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0qh7c27cd4wcdjj0mbpkarvwypfk1js8hkyxs0z149qv75zkbrca"))
- (patches (search-patches "zig-do-not-link-against-librt.patch"
- "zig-Revert-Never-implicitly-add-rpaths-for-each-lib-dir-.patch"))))
- (build-system cmake-build-system)
- (arguments
- `(#:configure-flags
- (list ,@(if (%current-target-system)
- '(string-append "-DZIG_TARGET_TRIPLE="
- (%current-target-system))
- '())
- (string-append "-DZIG_TARGET_MCPU=baseline")
- "-DZIG_SHARED_LLVM=ON"
- (string-append "-DZIG_LIB_DIR=" (assoc-ref %outputs "out")
- "/lib/zig"))
- #:validate-runpath? #f ; TODO: zig binary can't find ld-linux.
- #:out-of-source? #f ; for tests
- ;; Tests fails in:
- ;; https://github.com/ziglang/zig/issues/18063
- #:tests? #f
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'set-env-variables
- (lambda* (#:key inputs native-inputs #:allow-other-keys)
- ;; Set CC, since the stage 2 zig relies on it to find the libc
- ;; installation, and otherwise silently links against its own.
- (setenv "CC" ,(cc-for-target))
- ;; Set cache dir, otherwise Zig looks for `$HOME/.cache'.
- (setenv "ZIG_GLOBAL_CACHE_DIR"
- (string-append (getcwd) "/zig-cache"))))
- (add-after 'patch-source-shebangs 'patch-more-shebangs
- (lambda* (#:key inputs #:allow-other-keys)
- ;; Zig uses information about /usr/bin/env to determine the
- ;; version of glibc and other data.
- (substitute* "lib/std/zig/system/NativeTargetInfo.zig"
- (("/usr/bin/env") (search-input-file inputs "/bin/env")))))
- (delete 'check)
- (add-after 'install 'check
- (lambda* (#:key outputs tests? #:allow-other-keys)
- (when tests?
- (invoke (string-append (assoc-ref outputs "out") "/bin/zig")
- "build" "test"
- ;; We're not testing the compiler bootstrap chain.
- ;; Non-native tests try to link and execute non-native
- ;; binaries.
- "-Dskip-non-native")))))))
- (inputs
- (list clang-16 ; Clang propagates llvm.
- lld-16
- zlib
- (list zstd "lib")))
- ;; Zig compiles fine with GCC, but also needs native LLVM libraries.
- (native-inputs
- (list llvm-16))
- (native-search-paths
- (list
- (search-path-specification
- (variable "C_INCLUDE_PATH")
- (files '("include")))
- (search-path-specification
- (variable "CPLUS_INCLUDE_PATH")
- (files '("include/c++" "include")))
- (search-path-specification
- (variable "LIBRARY_PATH")
- (files '("lib" "lib64")))))
- (synopsis "General purpose programming language and toolchain")
- (description "Zig is a general-purpose programming language and
-toolchain. Among other features it provides
-@itemize
-@item an Optional type instead of null pointers,
-@item manual memory management,
-@item generic data structures and functions,
-@item compile-time reflection and compile-time code execution,
-@item integration with C using zig as a C compiler, and
-@item concurrency via async functions.
-@end itemize")
- (home-page "https://github.com/ziglang/zig")
- (license license:expat)))
-
-
-(define-public zig-master
- (package
- (name "zig-master")
- (version "master")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/ziglang/zig.git")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "15pi43l1fla89n5kdink05a6a0cxqbf51nl0j2mvgxvcry12ql31"))
- (patches (search-patches "zig-do-not-link-against-librt.patch"))))
- (build-system cmake-build-system)
- (arguments
- `(#:configure-flags
- (list ,@(if (%current-target-system)
- '(string-append "-DZIG_TARGET_TRIPLE="
- (%current-target-system))
- '())
- (string-append "-DZIG_TARGET_MCPU=baseline")
- "-DZIG_SHARED_LLVM=ON"
- (string-append "-DZIG_LIB_DIR=" (assoc-ref %outputs "out")
- "/lib/zig"))
- #:validate-runpath? #f ; TODO: zig binary can't find ld-linux.
- #:out-of-source? #f ; for tests
- ;; Tests fails in:
- ;; https://github.com/ziglang/zig/issues/18063
- #:tests? #f
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'set-env-variables
- (lambda* (#:key inputs native-inputs #:allow-other-keys)
- ;; Set CC, since the stage 2 zig relies on it to find the libc
- ;; installation, and otherwise silently links against its own.
- (setenv "CC" ,(cc-for-target))
- ;; Set cache dir, otherwise Zig looks for `$HOME/.cache'.
- (setenv "ZIG_GLOBAL_CACHE_DIR"
- (string-append (getcwd) "/zig-cache"))))
- (add-after 'patch-source-shebangs 'patch-more-shebangs
- (lambda* (#:key inputs #:allow-other-keys)
- ;; Zig uses information about /usr/bin/env to determine the
- ;; version of glibc and other data.
- (substitute* "lib/std/zig/system/NativeTargetInfo.zig"
- (("/usr/bin/env") (search-input-file inputs "/bin/env")))))
- (delete 'check)
- (add-after 'install 'check
- (lambda* (#:key outputs tests? #:allow-other-keys)
- (when tests?
- (invoke (string-append (assoc-ref outputs "out") "/bin/zig")
- "build" "test"
- ;; We're not testing the compiler bootstrap chain.
- ;; Non-native tests try to link and execute non-native
- ;; binaries.
- "-Dskip-non-native")))))))
- (inputs
- (list clang-17 ; Clang propagates llvm.
- lld-17
- zlib
- (list zstd "lib")))
- ;; Zig compiles fine with GCC, but also needs native LLVM libraries.
- (native-inputs
- (list llvm-17))
- (native-search-paths
- (list
- (search-path-specification
- (variable "C_INCLUDE_PATH")
- (files '("include")))
- (search-path-specification
- (variable "CPLUS_INCLUDE_PATH")
- (files '("include/c++" "include")))
- (search-path-specification
- (variable "LIBRARY_PATH")
- (files '("lib" "lib64")))))
- (synopsis "General purpose programming language and toolchain")
- (description "Zig is a general-purpose programming language and
-toolchain. Among other features it provides
-@itemize
-@item an Optional type instead of null pointers,
-@item manual memory management,
-@item generic data structures and functions,
-@item compile-time reflection and compile-time code execution,
-@item integration with C using zig as a C compiler, and
-@item concurrency via async functions.
-@end itemize")
- (home-page "https://github.com/ziglang/zig")
- (license license:expat)))