guix-cookbook.es.po 157 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475
  1. # SOME DESCRIPTIVE TITLE
  2. # Copyright (C) YEAR the authors of Guix (msgids) and the following authors (msgstr)
  3. # This file is distributed under the same license as the guix manual package.
  4. # Reynaldo Cordero <reynaldo.cordero@gmail.com>, 2021.
  5. # Emilio Herrera <ehespinosa57@gmail.com>, 2021.
  6. # Julien Lepiller <fedora-account@lepiller.eu>, 2022.
  7. msgid ""
  8. msgstr ""
  9. "Project-Id-Version: guix manual checkout\n"
  10. "Report-Msgid-Bugs-To: bug-guix@gnu.org\n"
  11. "POT-Creation-Date: 2021-12-31 15:18+0000\n"
  12. "PO-Revision-Date: 2022-01-10 11:16+0000\n"
  13. "Last-Translator: Julien Lepiller <fedora-account@lepiller.eu>\n"
  14. "Language-Team: Spanish <https://translate.fedoraproject.org/projects/guix/documentation-cookbook/es/>\n"
  15. "Language: es\n"
  16. "MIME-Version: 1.0\n"
  17. "Content-Type: text/plain; charset=UTF-8\n"
  18. "Content-Transfer-Encoding: 8bit\n"
  19. "Plural-Forms: nplurals=2; plural=n != 1;\n"
  20. "X-Generator: Weblate 4.10.1\n"
  21. #. type: Plain text
  22. #: guix-git/doc/guix-cookbook.texi:7
  23. msgid "@documentencoding UTF-8"
  24. msgstr "@documentencoding UTF-8"
  25. #. type: top
  26. #: guix-git/doc/guix-cookbook.texi:7 guix-git/doc/guix-cookbook.texi:36
  27. #: guix-git/doc/guix-cookbook.texi:50
  28. #, no-wrap
  29. msgid "GNU Guix Cookbook"
  30. msgstr "Libro de cocina GNU Guix"
  31. #. type: copying
  32. #: guix-git/doc/guix-cookbook.texi:21
  33. msgid "Copyright @copyright{} 2019 Ricardo Wurmus@* Copyright @copyright{} 2019 Efraim Flashner@* Copyright @copyright{} 2019 Pierre Neidhardt@* Copyright @copyright{} 2020 Oleg Pykhalov@* Copyright @copyright{} 2020 Matthew Brooks@* Copyright @copyright{} 2020 Marcin Karpezo@* Copyright @copyright{} 2020 Brice Waegeneire@* Copyright @copyright{} 2020 André Batista@* Copyright @copyright{} 2020 Christine Lemmer-Webber@* Copyright @copyright{} 2021 Joshua Branson@*"
  34. msgstr ""
  35. #. type: copying
  36. #: guix-git/doc/guix-cookbook.texi:28
  37. msgid "Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''."
  38. msgstr ""
  39. #. type: dircategory
  40. #: guix-git/doc/guix-cookbook.texi:30
  41. #, no-wrap
  42. msgid "System administration"
  43. msgstr ""
  44. #. type: menuentry
  45. #: guix-git/doc/guix-cookbook.texi:33
  46. msgid "Guix cookbook: (guix-cookbook)"
  47. msgstr ""
  48. #. type: menuentry
  49. #: guix-git/doc/guix-cookbook.texi:33
  50. msgid "Tutorials and examples for GNU Guix."
  51. msgstr "Tutoriales y ejemplos para GNU Guix."
  52. #. type: subtitle
  53. #: guix-git/doc/guix-cookbook.texi:37
  54. #, no-wrap
  55. msgid "Tutorials and examples for using the GNU Guix Functional Package Manager"
  56. msgstr "Tutoriales y ejemplos para usar el Gestor Funcional de Paquetes de GNU Guix"
  57. #. type: author
  58. #: guix-git/doc/guix-cookbook.texi:38
  59. #, no-wrap
  60. msgid "The GNU Guix Developers"
  61. msgstr "Los desarrolladores de GNU Guix"
  62. #. type: node
  63. #: guix-git/doc/guix-cookbook.texi:49
  64. #, no-wrap
  65. msgid "Top"
  66. msgstr "Top"
  67. #. type: Plain text
  68. #: guix-git/doc/guix-cookbook.texi:56
  69. msgid "This document presents tutorials and detailed examples for GNU@tie{}Guix, a functional package management tool written for the GNU system. Please @pxref{Top,,, guix, GNU Guix reference manual} for details about the system, its API, and related concepts."
  70. msgstr "Este documento presenta tutoriales y ejemplos detallados para GNU@tie{}Guix, una herramienta funcional de paquetes para el sistema GNU. Por favor @pxref{Arriba,,, guix, Manual de referencia de GNU Guix} para detalles acerca del sistema, su API, y conceptos relacionados."
  71. #. type: Plain text
  72. #: guix-git/doc/guix-cookbook.texi:66
  73. msgid "This manual is also available in French (@pxref{Top,,, guix-cookbook.fr, Livre de recettes de GNU Guix}) and German (@pxref{Top,,, guix-cookbook.de, GNU-Guix-Kochbuch}). If you would like to translate this document in your native language, consider joining @uref{https://translate.fedoraproject.org/projects/guix/documentation-cookbook, Weblate} (@pxref{Translating Guix,,, guix, GNU Guix reference manual})."
  74. msgstr ""
  75. #. type: chapter
  76. #: guix-git/doc/guix-cookbook.texi:73 guix-git/doc/guix-cookbook.texi:82
  77. #: guix-git/doc/guix-cookbook.texi:98 guix-git/doc/guix-cookbook.texi:99
  78. #, no-wrap
  79. msgid "Scheme tutorials"
  80. msgstr ""
  81. #. type: menuentry
  82. #: guix-git/doc/guix-cookbook.texi:73
  83. msgid "Meet your new favorite language!"
  84. msgstr ""
  85. #. type: chapter
  86. #: guix-git/doc/guix-cookbook.texi:73 guix-git/doc/guix-cookbook.texi:86
  87. #: guix-git/doc/guix-cookbook.texi:305 guix-git/doc/guix-cookbook.texi:306
  88. #, no-wrap
  89. msgid "Packaging"
  90. msgstr ""
  91. #. type: menuentry
  92. #: guix-git/doc/guix-cookbook.texi:73
  93. msgid "Packaging tutorials"
  94. msgstr ""
  95. #. type: chapter
  96. #: guix-git/doc/guix-cookbook.texi:73 guix-git/doc/guix-cookbook.texi:90
  97. #: guix-git/doc/guix-cookbook.texi:1340 guix-git/doc/guix-cookbook.texi:1341
  98. #, no-wrap
  99. msgid "System Configuration"
  100. msgstr ""
  101. #. type: menuentry
  102. #: guix-git/doc/guix-cookbook.texi:73
  103. msgid "Customizing the GNU System"
  104. msgstr ""
  105. #. type: chapter
  106. #: guix-git/doc/guix-cookbook.texi:73 guix-git/doc/guix-cookbook.texi:2436
  107. #: guix-git/doc/guix-cookbook.texi:2437
  108. #, no-wrap
  109. msgid "Advanced package management"
  110. msgstr ""
  111. #. type: menuentry
  112. #: guix-git/doc/guix-cookbook.texi:73
  113. msgid "Power to the users!"
  114. msgstr ""
  115. #. type: chapter
  116. #: guix-git/doc/guix-cookbook.texi:73 guix-git/doc/guix-cookbook.texi:2834
  117. #: guix-git/doc/guix-cookbook.texi:2835
  118. #, no-wrap
  119. msgid "Environment management"
  120. msgstr ""
  121. #. type: menuentry
  122. #: guix-git/doc/guix-cookbook.texi:73
  123. msgid "Control environment"
  124. msgstr ""
  125. #. type: chapter
  126. #: guix-git/doc/guix-cookbook.texi:77 guix-git/doc/guix-cookbook.texi:2958
  127. #: guix-git/doc/guix-cookbook.texi:2959
  128. #, no-wrap
  129. msgid "Acknowledgments"
  130. msgstr ""
  131. #. type: menuentry
  132. #: guix-git/doc/guix-cookbook.texi:77
  133. msgid "Thanks!"
  134. msgstr ""
  135. #. type: appendix
  136. #: guix-git/doc/guix-cookbook.texi:77 guix-git/doc/guix-cookbook.texi:2983
  137. #: guix-git/doc/guix-cookbook.texi:2984
  138. #, no-wrap
  139. msgid "GNU Free Documentation License"
  140. msgstr ""
  141. #. type: menuentry
  142. #: guix-git/doc/guix-cookbook.texi:77
  143. msgid "The license of this document."
  144. msgstr ""
  145. #. type: unnumbered
  146. #: guix-git/doc/guix-cookbook.texi:77 guix-git/doc/guix-cookbook.texi:2989
  147. #: guix-git/doc/guix-cookbook.texi:2990
  148. #, no-wrap
  149. msgid "Concept Index"
  150. msgstr ""
  151. #. type: menuentry
  152. #: guix-git/doc/guix-cookbook.texi:77
  153. msgid "Concepts."
  154. msgstr ""
  155. #. type: menuentry
  156. #: guix-git/doc/guix-cookbook.texi:80
  157. msgid "--- The Detailed Node Listing ---"
  158. msgstr ""
  159. #. type: section
  160. #: guix-git/doc/guix-cookbook.texi:84 guix-git/doc/guix-cookbook.texi:112
  161. #: guix-git/doc/guix-cookbook.texi:113
  162. #, no-wrap
  163. msgid "A Scheme Crash Course"
  164. msgstr ""
  165. #. type: menuentry
  166. #: guix-git/doc/guix-cookbook.texi:84
  167. msgid "Learn the basics of Scheme"
  168. msgstr ""
  169. #. type: section
  170. #: guix-git/doc/guix-cookbook.texi:88 guix-git/doc/guix-cookbook.texi:317
  171. #: guix-git/doc/guix-cookbook.texi:319 guix-git/doc/guix-cookbook.texi:320
  172. #, no-wrap
  173. msgid "Packaging Tutorial"
  174. msgstr ""
  175. #. type: menuentry
  176. #: guix-git/doc/guix-cookbook.texi:88
  177. msgid "Let's add a package to Guix!"
  178. msgstr ""
  179. #. type: section
  180. #: guix-git/doc/guix-cookbook.texi:93 guix-git/doc/guix-cookbook.texi:1360
  181. #: guix-git/doc/guix-cookbook.texi:1362 guix-git/doc/guix-cookbook.texi:1363
  182. #, no-wrap
  183. msgid "Auto-Login to a Specific TTY"
  184. msgstr ""
  185. #. type: menuentry
  186. #: guix-git/doc/guix-cookbook.texi:93 guix-git/doc/guix-cookbook.texi:1360
  187. msgid "Automatically Login a User to a Specific TTY"
  188. msgstr ""
  189. #. type: section
  190. #: guix-git/doc/guix-cookbook.texi:93 guix-git/doc/guix-cookbook.texi:1360
  191. #: guix-git/doc/guix-cookbook.texi:1407 guix-git/doc/guix-cookbook.texi:1408
  192. #, no-wrap
  193. msgid "Customizing the Kernel"
  194. msgstr ""
  195. #. type: menuentry
  196. #: guix-git/doc/guix-cookbook.texi:93 guix-git/doc/guix-cookbook.texi:1360
  197. msgid "Creating and using a custom Linux kernel on Guix System."
  198. msgstr ""
  199. #. type: Plain text
  200. #: guix-git/doc/guix-cookbook.texi:105
  201. msgid "GNU@tie{}Guix is written in the general purpose programming language Scheme, and many of its features can be accessed and manipulated programmatically. You can use Scheme to generate package definitions, to modify them, to build them, to deploy whole operating systems, etc."
  202. msgstr ""
  203. #. type: Plain text
  204. #: guix-git/doc/guix-cookbook.texi:109
  205. msgid "Knowing the basics of how to program in Scheme will unlock many of the advanced features Guix provides --- and you don't even need to be an experienced programmer to use them!"
  206. msgstr ""
  207. #. type: Plain text
  208. #: guix-git/doc/guix-cookbook.texi:111
  209. msgid "Let's get started!"
  210. msgstr ""
  211. #. type: cindex
  212. #: guix-git/doc/guix-cookbook.texi:115
  213. #, no-wrap
  214. msgid "Scheme, crash course"
  215. msgstr ""
  216. #. type: Plain text
  217. #: guix-git/doc/guix-cookbook.texi:121
  218. msgid "Guix uses the Guile implementation of Scheme. To start playing with the language, install it with @code{guix install guile} and start a @dfn{REPL}---short for @uref{https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop, @dfn{read-eval-print loop}}---by running @code{guile} from the command line."
  219. msgstr ""
  220. #. type: Plain text
  221. #: guix-git/doc/guix-cookbook.texi:124
  222. msgid "Alternatively you can also run @code{guix environment --ad-hoc guile -- guile} if you'd rather not have Guile installed in your user profile."
  223. msgstr ""
  224. #. type: Plain text
  225. #: guix-git/doc/guix-cookbook.texi:130
  226. msgid "In the following examples, lines show what you would type at the REPL; lines starting with ``@result{}'' show evaluation results, while lines starting with ``@print{}'' show things that get printed. @xref{Using Guile Interactively,,, guile, GNU Guile Reference Manual}, for more details on the REPL."
  227. msgstr ""
  228. #. type: itemize
  229. #: guix-git/doc/guix-cookbook.texi:138
  230. msgid "Scheme syntax boils down to a tree of expressions (or @emph{s-expression} in Lisp lingo). An expression can be a literal such as numbers and strings, or a compound which is a parenthesized list of compounds and literals. @code{#true} and @code{#false} (abbreviated @code{#t} and @code{#f}) stand for the Booleans ``true'' and ``false'', respectively."
  231. msgstr ""
  232. #. type: itemize
  233. #: guix-git/doc/guix-cookbook.texi:140
  234. msgid "Examples of valid expressions:"
  235. msgstr ""
  236. #. type: lisp
  237. #: guix-git/doc/guix-cookbook.texi:144
  238. #, no-wrap
  239. msgid ""
  240. "\"Hello World!\"\n"
  241. "@result{} \"Hello World!\"\n"
  242. "\n"
  243. msgstr ""
  244. #. type: lisp
  245. #: guix-git/doc/guix-cookbook.texi:147
  246. #, no-wrap
  247. msgid ""
  248. "17\n"
  249. "@result{} 17\n"
  250. "\n"
  251. msgstr ""
  252. #. type: lisp
  253. #: guix-git/doc/guix-cookbook.texi:151
  254. #, no-wrap
  255. msgid ""
  256. "(display (string-append \"Hello \" \"Guix\" \"\\n\"))\n"
  257. "@print{} Hello Guix!\n"
  258. "@result{} #<unspecified>\n"
  259. msgstr ""
  260. #. type: itemize
  261. #: guix-git/doc/guix-cookbook.texi:158
  262. msgid "This last example is a function call nested in another function call. When a parenthesized expression is evaluated, the first term is the function and the rest are the arguments passed to the function. Every function returns the last evaluated expression as its return value."
  263. msgstr ""
  264. #. type: itemize
  265. #: guix-git/doc/guix-cookbook.texi:161
  266. msgid "Anonymous functions are declared with the @code{lambda} term:"
  267. msgstr ""
  268. #. type: lisp
  269. #: guix-git/doc/guix-cookbook.texi:165
  270. #, no-wrap
  271. msgid ""
  272. "(lambda (x) (* x x))\n"
  273. "@result{} #<procedure 120e348 at <unknown port>:24:0 (x)>\n"
  274. msgstr ""
  275. #. type: itemize
  276. #: guix-git/doc/guix-cookbook.texi:170
  277. msgid "The above procedure returns the square of its argument. Since everything is an expression, the @code{lambda} expression returns an anonymous procedure, which can in turn be applied to an argument:"
  278. msgstr ""
  279. #. type: lisp
  280. #: guix-git/doc/guix-cookbook.texi:174
  281. #, no-wrap
  282. msgid ""
  283. "((lambda (x) (* x x)) 3)\n"
  284. "@result{} 9\n"
  285. msgstr ""
  286. #. type: itemize
  287. #: guix-git/doc/guix-cookbook.texi:178
  288. msgid "Anything can be assigned a global name with @code{define}:"
  289. msgstr ""
  290. #. type: lisp
  291. #: guix-git/doc/guix-cookbook.texi:184
  292. #, no-wrap
  293. msgid ""
  294. "(define a 3)\n"
  295. "(define square (lambda (x) (* x x)))\n"
  296. "(square a)\n"
  297. "@result{} 9\n"
  298. msgstr ""
  299. #. type: itemize
  300. #: guix-git/doc/guix-cookbook.texi:188
  301. msgid "Procedures can be defined more concisely with the following syntax:"
  302. msgstr ""
  303. #. type: lisp
  304. #: guix-git/doc/guix-cookbook.texi:191
  305. #, no-wrap
  306. msgid "(define (square x) (* x x))\n"
  307. msgstr ""
  308. #. type: itemize
  309. #: guix-git/doc/guix-cookbook.texi:195
  310. msgid "A list structure can be created with the @code{list} procedure:"
  311. msgstr ""
  312. #. type: lisp
  313. #: guix-git/doc/guix-cookbook.texi:199
  314. #, no-wrap
  315. msgid ""
  316. "(list 2 a 5 7)\n"
  317. "@result{} (2 3 5 7)\n"
  318. msgstr ""
  319. #. type: itemize
  320. #: guix-git/doc/guix-cookbook.texi:206
  321. msgid "The @dfn{quote} disables evaluation of a parenthesized expression: the first term is not called over the other terms (@pxref{Expression Syntax, quote,, guile, GNU Guile Reference Manual}). Thus it effectively returns a list of terms."
  322. msgstr ""
  323. #. type: lisp
  324. #: guix-git/doc/guix-cookbook.texi:210
  325. #, no-wrap
  326. msgid ""
  327. "'(display (string-append \"Hello \" \"Guix\" \"\\n\"))\n"
  328. "@result{} (display (string-append \"Hello \" \"Guix\" \"\\n\"))\n"
  329. "\n"
  330. msgstr ""
  331. #. type: lisp
  332. #: guix-git/doc/guix-cookbook.texi:213
  333. #, no-wrap
  334. msgid ""
  335. "'(2 a 5 7)\n"
  336. "@result{} (2 a 5 7)\n"
  337. msgstr ""
  338. #. type: itemize
  339. #: guix-git/doc/guix-cookbook.texi:219
  340. msgid "The @dfn{quasiquote} disables evaluation of a parenthesized expression until @dfn{unquote} (a comma) re-enables it. Thus it provides us with fine-grained control over what is evaluated and what is not."
  341. msgstr ""
  342. #. type: lisp
  343. #: guix-git/doc/guix-cookbook.texi:223
  344. #, no-wrap
  345. msgid ""
  346. "`(2 a 5 7 (2 ,a 5 ,(+ a 4)))\n"
  347. "@result{} (2 a 5 7 (2 3 5 7))\n"
  348. msgstr ""
  349. #. type: itemize
  350. #: guix-git/doc/guix-cookbook.texi:227
  351. msgid "Note that the above result is a list of mixed elements: numbers, symbols (here @code{a}) and the last element is a list itself."
  352. msgstr ""
  353. #. type: itemize
  354. #: guix-git/doc/guix-cookbook.texi:231
  355. msgid "Multiple variables can be named locally with @code{let} (@pxref{Local Bindings,,, guile, GNU Guile Reference Manual}):"
  356. msgstr ""
  357. #. type: lisp
  358. #: guix-git/doc/guix-cookbook.texi:238
  359. #, no-wrap
  360. msgid ""
  361. "(define x 10)\n"
  362. "(let ((x 2)\n"
  363. " (y 3))\n"
  364. " (list x y))\n"
  365. "@result{} (2 3)\n"
  366. "\n"
  367. msgstr ""
  368. #. type: lisp
  369. #: guix-git/doc/guix-cookbook.texi:241
  370. #, no-wrap
  371. msgid ""
  372. "x\n"
  373. "@result{} 10\n"
  374. "\n"
  375. msgstr ""
  376. #. type: lisp
  377. #: guix-git/doc/guix-cookbook.texi:244
  378. #, no-wrap
  379. msgid ""
  380. "y\n"
  381. "@error{} In procedure module-lookup: Unbound variable: y\n"
  382. msgstr ""
  383. #. type: itemize
  384. #: guix-git/doc/guix-cookbook.texi:248
  385. msgid "Use @code{let*} to allow later variable declarations to refer to earlier definitions."
  386. msgstr ""
  387. #. type: lisp
  388. #: guix-git/doc/guix-cookbook.texi:254
  389. #, no-wrap
  390. msgid ""
  391. "(let* ((x 2)\n"
  392. " (y (* x 3)))\n"
  393. " (list x y))\n"
  394. "@result{} (2 6)\n"
  395. msgstr ""
  396. #. type: itemize
  397. #: guix-git/doc/guix-cookbook.texi:261
  398. msgid "@dfn{Keywords} are typically used to identify the named parameters of a procedure. They are prefixed by @code{#:} (hash, colon) followed by alphanumeric characters: @code{#:like-this}. @xref{Keywords,,, guile, GNU Guile Reference Manual}."
  399. msgstr ""
  400. #. type: itemize
  401. #: guix-git/doc/guix-cookbook.texi:266
  402. msgid "The percentage @code{%} is typically used for read-only global variables in the build stage. Note that it is merely a convention, like @code{_} in C. Scheme treats @code{%} exactly the same as any other letter."
  403. msgstr ""
  404. #. type: itemize
  405. #: guix-git/doc/guix-cookbook.texi:270
  406. msgid "Modules are created with @code{define-module} (@pxref{Creating Guile Modules,,, guile, GNU Guile Reference Manual}). For instance"
  407. msgstr ""
  408. #. type: lisp
  409. #: guix-git/doc/guix-cookbook.texi:276
  410. #, no-wrap
  411. msgid ""
  412. "(define-module (guix build-system ruby)\n"
  413. " #:use-module (guix store)\n"
  414. " #:export (ruby-build\n"
  415. " ruby-build-system))\n"
  416. msgstr ""
  417. #. type: itemize
  418. #: guix-git/doc/guix-cookbook.texi:282
  419. msgid "defines the module @code{guix build-system ruby} which must be located in @file{guix/build-system/ruby.scm} somewhere in the Guile load path. It depends on the @code{(guix store)} module and it exports two variables, @code{ruby-build} and @code{ruby-build-system}."
  420. msgstr ""
  421. #. type: Plain text
  422. #: guix-git/doc/guix-cookbook.texi:287
  423. msgid "For a more detailed introduction, check out @uref{http://www.troubleshooters.com/codecorn/scheme_guile/hello.htm, Scheme at a Glance}, by Steve Litt."
  424. msgstr ""
  425. #. type: Plain text
  426. #: guix-git/doc/guix-cookbook.texi:299
  427. msgid "One of the reference Scheme books is the seminal ``Structure and Interpretation of Computer Programs'', by Harold Abelson and Gerald Jay Sussman, with Julie Sussman. You'll find a @uref{https://mitpress.mit.edu/sites/default/files/sicp/index.html, free copy online}, together with @uref{https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/video-lectures/, videos of the lectures by the authors}. The book is available in Texinfo format as the @code{sicp} Guix package. Go ahead, run @code{guix install sicp} and start reading with @code{info sicp} (@pxref{,,, sicp, Structure and Interpretation of Computer Programs}). An @uref{https://sarabander.github.io/sicp/, unofficial ebook is also available}."
  428. msgstr ""
  429. #. type: Plain text
  430. #: guix-git/doc/guix-cookbook.texi:302
  431. msgid "You'll find more books, tutorials and other resources at @url{https://schemers.org/}."
  432. msgstr ""
  433. #. type: cindex
  434. #: guix-git/doc/guix-cookbook.texi:308
  435. #, no-wrap
  436. msgid "packaging"
  437. msgstr ""
  438. #. type: Plain text
  439. #: guix-git/doc/guix-cookbook.texi:314
  440. msgid "This chapter is dedicated to teaching you how to add packages to the collection of packages that come with GNU Guix. This involves writing package definitions in Guile Scheme, organizing them in package modules, and building them."
  441. msgstr ""
  442. #. type: menuentry
  443. #: guix-git/doc/guix-cookbook.texi:317
  444. msgid "A tutorial on how to add packages to Guix."
  445. msgstr ""
  446. #. type: Plain text
  447. #: guix-git/doc/guix-cookbook.texi:328
  448. msgid "GNU Guix stands out as the @emph{hackable} package manager, mostly because it uses @uref{https://www.gnu.org/software/guile/, GNU Guile}, a powerful high-level programming language, one of the @uref{https://en.wikipedia.org/wiki/Scheme_%28programming_language%29, Scheme} dialects from the @uref{https://en.wikipedia.org/wiki/Lisp_%28programming_language%29, Lisp family}."
  449. msgstr ""
  450. #. type: Plain text
  451. #: guix-git/doc/guix-cookbook.texi:332
  452. msgid "Package definitions are also written in Scheme, which empowers Guix in some very unique ways, unlike most other package managers that use shell scripts or simple languages."
  453. msgstr ""
  454. #. type: itemize
  455. #: guix-git/doc/guix-cookbook.texi:337
  456. msgid "Use functions, structures, macros and all of Scheme expressiveness for your package definitions."
  457. msgstr ""
  458. #. type: itemize
  459. #: guix-git/doc/guix-cookbook.texi:341
  460. msgid "Inheritance makes it easy to customize a package by inheriting from it and modifying only what is needed."
  461. msgstr ""
  462. #. type: itemize
  463. #: guix-git/doc/guix-cookbook.texi:351
  464. msgid "Batch processing: the whole package collection can be parsed, filtered and processed. Building a headless server with all graphical interfaces stripped out? It's possible. Want to rebuild everything from source using specific compiler optimization flags? Pass the @code{#:make-flags \"...\"} argument to the list of packages. It wouldn't be a stretch to think @uref{https://wiki.gentoo.org/wiki/USE_flag, Gentoo USE flags} here, but this goes even further: the changes don't have to be thought out beforehand by the packager, they can be @emph{programmed} by the user!"
  465. msgstr ""
  466. #. type: Plain text
  467. #: guix-git/doc/guix-cookbook.texi:357
  468. msgid "The following tutorial covers all the basics around package creation with Guix. It does not assume much knowledge of the Guix system nor of the Lisp language. The reader is only expected to be familiar with the command line and to have some basic programming knowledge."
  469. msgstr ""
  470. #. type: subsection
  471. #: guix-git/doc/guix-cookbook.texi:358 guix-git/doc/guix-cookbook.texi:359
  472. #, no-wrap
  473. msgid "A ``Hello World'' package"
  474. msgstr ""
  475. #. type: Plain text
  476. #: guix-git/doc/guix-cookbook.texi:364
  477. msgid "The ``Defining Packages'' section of the manual introduces the basics of Guix packaging (@pxref{Defining Packages,,, guix, GNU Guix Reference Manual}). In the following section, we will partly go over those basics again."
  478. msgstr ""
  479. #. type: Plain text
  480. #: guix-git/doc/guix-cookbook.texi:370
  481. msgid "GNU@tie{}Hello is a dummy project that serves as an idiomatic example for packaging. It uses the GNU build system (@code{./configure && make && make install}). Guix already provides a package definition which is a perfect example to start with. You can look up its declaration with @code{guix edit hello} from the command line. Let's see how it looks:"
  482. msgstr ""
  483. #. type: lisp
  484. #: guix-git/doc/guix-cookbook.texi:391
  485. #, no-wrap
  486. msgid ""
  487. "(define-public hello\n"
  488. " (package\n"
  489. " (name \"hello\")\n"
  490. " (version \"2.10\")\n"
  491. " (source (origin\n"
  492. " (method url-fetch)\n"
  493. " (uri (string-append \"mirror://gnu/hello/hello-\" version\n"
  494. " \".tar.gz\"))\n"
  495. " (sha256\n"
  496. " (base32\n"
  497. " \"0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i\"))))\n"
  498. " (build-system gnu-build-system)\n"
  499. " (synopsis \"Hello, GNU world: An example GNU package\")\n"
  500. " (description\n"
  501. " \"GNU Hello prints the message \\\"Hello, world!\\\" and then exits. It\n"
  502. "serves as an example of standard GNU coding practices. As such, it supports\n"
  503. "command-line arguments, multiple languages, and so on.\")\n"
  504. " (home-page \"https://www.gnu.org/software/hello/\")\n"
  505. " (license gpl3+)))\n"
  506. msgstr ""
  507. #. type: Plain text
  508. #: guix-git/doc/guix-cookbook.texi:395
  509. msgid "As you can see, most of it is rather straightforward. But let's review the fields together:"
  510. msgstr ""
  511. #. type: item
  512. #: guix-git/doc/guix-cookbook.texi:397
  513. #, no-wrap
  514. msgid "name"
  515. msgstr ""
  516. #. type: table
  517. #: guix-git/doc/guix-cookbook.texi:400
  518. msgid "The project name. Using Scheme conventions, we prefer to keep it lower case, without underscore and using dash-separated words."
  519. msgstr ""
  520. #. type: item
  521. #: guix-git/doc/guix-cookbook.texi:401
  522. #, no-wrap
  523. msgid "source"
  524. msgstr ""
  525. #. type: table
  526. #: guix-git/doc/guix-cookbook.texi:404
  527. msgid "This field contains a description of the source code origin. The @code{origin} record contains these fields:"
  528. msgstr ""
  529. #. type: item
  530. #: guix-git/doc/guix-cookbook.texi:406
  531. #, no-wrap
  532. msgid "The method, here @code{url-fetch} to download via HTTP/FTP, but other methods"
  533. msgstr ""
  534. #. type: enumerate
  535. #: guix-git/doc/guix-cookbook.texi:408
  536. msgid "exist, such as @code{git-fetch} for Git repositories."
  537. msgstr ""
  538. #. type: item
  539. #: guix-git/doc/guix-cookbook.texi:408
  540. #, no-wrap
  541. msgid "The URI, which is typically some @code{https://} location for @code{url-fetch}. Here"
  542. msgstr ""
  543. #. type: enumerate
  544. #: guix-git/doc/guix-cookbook.texi:411
  545. msgid "the special `mirror://gnu` refers to a set of well known locations, all of which can be used by Guix to fetch the source, should some of them fail."
  546. msgstr ""
  547. #. type: item
  548. #: guix-git/doc/guix-cookbook.texi:411
  549. #, no-wrap
  550. msgid "The @code{sha256} checksum of the requested file. This is essential to ensure"
  551. msgstr ""
  552. #. type: enumerate
  553. #: guix-git/doc/guix-cookbook.texi:414
  554. msgid "the source is not corrupted. Note that Guix works with base32 strings, hence the call to the @code{base32} function."
  555. msgstr ""
  556. #. type: item
  557. #: guix-git/doc/guix-cookbook.texi:416
  558. #, no-wrap
  559. msgid "build-system"
  560. msgstr ""
  561. #. type: table
  562. #: guix-git/doc/guix-cookbook.texi:425
  563. msgid "This is where the power of abstraction provided by the Scheme language really shines: in this case, the @code{gnu-build-system} abstracts away the famous @code{./configure && make && make install} shell invocations. Other build systems include the @code{trivial-build-system} which does not do anything and requires from the packager to program all the build steps, the @code{python-build-system}, the @code{emacs-build-system}, and many more (@pxref{Build Systems,,, guix, GNU Guix Reference Manual})."
  564. msgstr ""
  565. #. type: item
  566. #: guix-git/doc/guix-cookbook.texi:426
  567. #, no-wrap
  568. msgid "synopsis"
  569. msgstr ""
  570. #. type: table
  571. #: guix-git/doc/guix-cookbook.texi:429
  572. msgid "It should be a concise summary of what the package does. For many packages a tagline from the project's home page can be used as the synopsis."
  573. msgstr ""
  574. #. type: item
  575. #: guix-git/doc/guix-cookbook.texi:430
  576. #, no-wrap
  577. msgid "description"
  578. msgstr ""
  579. #. type: table
  580. #: guix-git/doc/guix-cookbook.texi:433
  581. msgid "Same as for the synopsis, it's fine to re-use the project description from the homepage. Note that Guix uses Texinfo syntax."
  582. msgstr ""
  583. #. type: item
  584. #: guix-git/doc/guix-cookbook.texi:434
  585. #, no-wrap
  586. msgid "home-page"
  587. msgstr ""
  588. #. type: table
  589. #: guix-git/doc/guix-cookbook.texi:436
  590. msgid "Use HTTPS if available."
  591. msgstr ""
  592. #. type: item
  593. #: guix-git/doc/guix-cookbook.texi:437
  594. #, no-wrap
  595. msgid "license"
  596. msgstr ""
  597. #. type: table
  598. #: guix-git/doc/guix-cookbook.texi:440
  599. msgid "See @code{guix/licenses.scm} in the project source for a full list of available licenses."
  600. msgstr ""
  601. #. type: Plain text
  602. #: guix-git/doc/guix-cookbook.texi:444
  603. msgid "Time to build our first package! Nothing fancy here for now: we will stick to a dummy @code{my-hello}, a copy of the above declaration."
  604. msgstr ""
  605. #. type: Plain text
  606. #: guix-git/doc/guix-cookbook.texi:448
  607. msgid "As with the ritualistic ``Hello World'' taught with most programming languages, this will possibly be the most ``manual'' approach. We will work out an ideal setup later; for now we will go the simplest route."
  608. msgstr ""
  609. #. type: Plain text
  610. #: guix-git/doc/guix-cookbook.texi:450
  611. msgid "Save the following to a file @file{my-hello.scm}."
  612. msgstr ""
  613. #. type: lisp
  614. #: guix-git/doc/guix-cookbook.texi:456
  615. #, no-wrap
  616. msgid ""
  617. "(use-modules (guix packages)\n"
  618. " (guix download)\n"
  619. " (guix build-system gnu)\n"
  620. " (guix licenses))\n"
  621. "\n"
  622. msgstr ""
  623. #. type: lisp
  624. #: guix-git/doc/guix-cookbook.texi:475
  625. #, no-wrap
  626. msgid ""
  627. "(package\n"
  628. " (name \"my-hello\")\n"
  629. " (version \"2.10\")\n"
  630. " (source (origin\n"
  631. " (method url-fetch)\n"
  632. " (uri (string-append \"mirror://gnu/hello/hello-\" version\n"
  633. " \".tar.gz\"))\n"
  634. " (sha256\n"
  635. " (base32\n"
  636. " \"0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i\"))))\n"
  637. " (build-system gnu-build-system)\n"
  638. " (synopsis \"Hello, Guix world: An example custom Guix package\")\n"
  639. " (description\n"
  640. " \"GNU Hello prints the message \\\"Hello, world!\\\" and then exits. It\n"
  641. "serves as an example of standard GNU coding practices. As such, it supports\n"
  642. "command-line arguments, multiple languages, and so on.\")\n"
  643. " (home-page \"https://www.gnu.org/software/hello/\")\n"
  644. " (license gpl3+))\n"
  645. msgstr ""
  646. #. type: Plain text
  647. #: guix-git/doc/guix-cookbook.texi:478
  648. msgid "We will explain the extra code in a moment."
  649. msgstr ""
  650. #. type: Plain text
  651. #: guix-git/doc/guix-cookbook.texi:485
  652. msgid "Feel free to play with the different values of the various fields. If you change the source, you'll need to update the checksum. Indeed, Guix refuses to build anything if the given checksum does not match the computed checksum of the source code. To obtain the correct checksum of the package declaration, we need to download the source, compute the sha256 checksum and convert it to base32."
  653. msgstr ""
  654. #. type: Plain text
  655. #: guix-git/doc/guix-cookbook.texi:488
  656. msgid "Thankfully, Guix can automate this task for us; all we need is to provide the URI:"
  657. msgstr ""
  658. #. type: example
  659. #: guix-git/doc/guix-cookbook.texi:492
  660. #, no-wrap
  661. msgid ""
  662. "$ guix download mirror://gnu/hello/hello-2.10.tar.gz\n"
  663. "\n"
  664. msgstr ""
  665. #. type: example
  666. #: guix-git/doc/guix-cookbook.texi:499
  667. #, no-wrap
  668. msgid ""
  669. "Starting download of /tmp/guix-file.JLYgL7\n"
  670. "From https://ftpmirror.gnu.org/gnu/hello/hello-2.10.tar.gz...\n"
  671. "following redirection to `https://mirror.ibcp.fr/pub/gnu/hello/hello-2.10.tar.gz'...\n"
  672. " …10.tar.gz 709KiB 2.5MiB/s 00:00 [##################] 100.0%\n"
  673. "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz\n"
  674. "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i\n"
  675. msgstr ""
  676. #. type: Plain text
  677. #: guix-git/doc/guix-cookbook.texi:504
  678. msgid "In this specific case the output tells us which mirror was chosen. If the result of the above command is not the same as in the above snippet, update your @code{my-hello} declaration accordingly."
  679. msgstr ""
  680. #. type: Plain text
  681. #: guix-git/doc/guix-cookbook.texi:508
  682. msgid "Note that GNU package tarballs come with an OpenPGP signature, so you should definitely check the signature of this tarball with `gpg` to authenticate it before going further:"
  683. msgstr ""
  684. #. type: example
  685. #: guix-git/doc/guix-cookbook.texi:512
  686. #, no-wrap
  687. msgid ""
  688. "$ guix download mirror://gnu/hello/hello-2.10.tar.gz.sig\n"
  689. "\n"
  690. msgstr ""
  691. #. type: example
  692. #: guix-git/doc/guix-cookbook.texi:527
  693. #, no-wrap
  694. msgid ""
  695. "Starting download of /tmp/guix-file.03tFfb\n"
  696. "From https://ftpmirror.gnu.org/gnu/hello/hello-2.10.tar.gz.sig...\n"
  697. "following redirection to `https://ftp.igh.cnrs.fr/pub/gnu/hello/hello-2.10.tar.gz.sig'...\n"
  698. " ….tar.gz.sig 819B 1.2MiB/s 00:00 [##################] 100.0%\n"
  699. "/gnu/store/rzs8wba9ka7grrmgcpfyxvs58mly0sx6-hello-2.10.tar.gz.sig\n"
  700. "0q0v86n3y38z17rl146gdakw9xc4mcscpk8dscs412j22glrv9jf\n"
  701. "$ gpg --verify /gnu/store/rzs8wba9ka7grrmgcpfyxvs58mly0sx6-hello-2.10.tar.gz.sig /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz\n"
  702. "gpg: Signature made Sun 16 Nov 2014 01:08:37 PM CET\n"
  703. "gpg: using RSA key A9553245FDE9B739\n"
  704. "gpg: Good signature from \"Sami Kerola <kerolasa@@iki.fi>\" [unknown]\n"
  705. "gpg: aka \"Sami Kerola (http://www.iki.fi/kerolasa/) <kerolasa@@iki.fi>\" [unknown]\n"
  706. "gpg: WARNING: This key is not certified with a trusted signature!\n"
  707. "gpg: There is no indication that the signature belongs to the owner.\n"
  708. "Primary key fingerprint: 8ED3 96E3 7E38 D471 A005 30D3 A955 3245 FDE9 B739\n"
  709. msgstr ""
  710. #. type: Plain text
  711. #: guix-git/doc/guix-cookbook.texi:530
  712. msgid "You can then happily run"
  713. msgstr ""
  714. #. type: example
  715. #: guix-git/doc/guix-cookbook.texi:534
  716. #, no-wrap
  717. msgid "$ guix package --install-from-file=my-hello.scm\n"
  718. msgstr ""
  719. #. type: Plain text
  720. #: guix-git/doc/guix-cookbook.texi:537
  721. msgid "You should now have @code{my-hello} in your profile!"
  722. msgstr ""
  723. #. type: example
  724. #: guix-git/doc/guix-cookbook.texi:543
  725. #, no-wrap
  726. msgid ""
  727. "$ guix package --list-installed=my-hello\n"
  728. "my-hello\t2.10\tout\n"
  729. "/gnu/store/f1db2mfm8syb8qvc357c53slbvf1g9m9-my-hello-2.10\n"
  730. msgstr ""
  731. #. type: Plain text
  732. #: guix-git/doc/guix-cookbook.texi:548
  733. msgid "We've gone as far as we could without any knowledge of Scheme. Before moving on to more complex packages, now is the right time to brush up on your Scheme knowledge. @pxref{A Scheme Crash Course} to get up to speed."
  734. msgstr ""
  735. #. type: subsection
  736. #: guix-git/doc/guix-cookbook.texi:549 guix-git/doc/guix-cookbook.texi:550
  737. #, no-wrap
  738. msgid "Setup"
  739. msgstr ""
  740. #. type: Plain text
  741. #: guix-git/doc/guix-cookbook.texi:555
  742. msgid "In the rest of this chapter we will rely on some basic Scheme programming knowledge. Now let's detail the different possible setups for working on Guix packages."
  743. msgstr ""
  744. #. type: Plain text
  745. #: guix-git/doc/guix-cookbook.texi:557
  746. msgid "There are several ways to set up a Guix packaging environment."
  747. msgstr ""
  748. #. type: Plain text
  749. #: guix-git/doc/guix-cookbook.texi:560
  750. msgid "We recommend you work directly on the Guix source checkout since it makes it easier for everyone to contribute to the project."
  751. msgstr ""
  752. #. type: Plain text
  753. #: guix-git/doc/guix-cookbook.texi:562
  754. msgid "But first, let's look at other possibilities."
  755. msgstr ""
  756. #. type: subsubsection
  757. #: guix-git/doc/guix-cookbook.texi:563 guix-git/doc/guix-cookbook.texi:564
  758. #, no-wrap
  759. msgid "Local file"
  760. msgstr ""
  761. #. type: Plain text
  762. #: guix-git/doc/guix-cookbook.texi:569
  763. msgid "This is what we previously did with @samp{my-hello}. With the Scheme basics we've covered, we are now able to explain the leading chunks. As stated in @code{guix package --help}:"
  764. msgstr ""
  765. #. type: example
  766. #: guix-git/doc/guix-cookbook.texi:574
  767. #, no-wrap
  768. msgid ""
  769. " -f, --install-from-file=FILE\n"
  770. " install the package that the code within FILE\n"
  771. " evaluates to\n"
  772. msgstr ""
  773. #. type: Plain text
  774. #: guix-git/doc/guix-cookbook.texi:578
  775. msgid "Thus the last expression @emph{must} return a package, which is the case in our earlier example."
  776. msgstr ""
  777. #. type: Plain text
  778. #: guix-git/doc/guix-cookbook.texi:582
  779. msgid "The @code{use-modules} expression tells which of the modules we need in the file. Modules are a collection of values and procedures. They are commonly called ``libraries'' or ``packages'' in other programming languages."
  780. msgstr ""
  781. #. type: node
  782. #: guix-git/doc/guix-cookbook.texi:583
  783. #, no-wrap
  784. msgid "@samp{GUIX_PACKAGE_PATH}"
  785. msgstr ""
  786. #. type: samp{#1}
  787. #: guix-git/doc/guix-cookbook.texi:584
  788. #, no-wrap
  789. msgid "GUIX_PACKAGE_PATH"
  790. msgstr ""
  791. #. type: emph{#1}
  792. #: guix-git/doc/guix-cookbook.texi:588
  793. msgid "Note: Starting from Guix 0.16, the more flexible Guix @dfn{channels} are the preferred way and supersede @samp{GUIX_PACKAGE_PATH}. See next section."
  794. msgstr ""
  795. #. type: Plain text
  796. #: guix-git/doc/guix-cookbook.texi:592
  797. msgid "It can be tedious to specify the file from the command line instead of simply calling @code{guix package --install my-hello} as you would do with the official packages."
  798. msgstr ""
  799. #. type: Plain text
  800. #: guix-git/doc/guix-cookbook.texi:595
  801. msgid "Guix makes it possible to streamline the process by adding as many ``package declaration directories'' as you want."
  802. msgstr ""
  803. #. type: Plain text
  804. #: guix-git/doc/guix-cookbook.texi:598
  805. msgid "Create a directory, say @file{~/guix-packages} and add it to the @samp{GUIX_PACKAGE_PATH} environment variable:"
  806. msgstr ""
  807. #. type: example
  808. #: guix-git/doc/guix-cookbook.texi:602
  809. #, no-wrap
  810. msgid ""
  811. "$ mkdir ~/guix-packages\n"
  812. "$ export GUIX_PACKAGE_PATH=~/guix-packages\n"
  813. msgstr ""
  814. #. type: Plain text
  815. #: guix-git/doc/guix-cookbook.texi:605
  816. msgid "To add several directories, separate them with a colon (@code{:})."
  817. msgstr ""
  818. #. type: Plain text
  819. #: guix-git/doc/guix-cookbook.texi:607
  820. msgid "Our previous @samp{my-hello} needs some adjustments though:"
  821. msgstr ""
  822. #. type: lisp
  823. #: guix-git/doc/guix-cookbook.texi:614
  824. #, no-wrap
  825. msgid ""
  826. "(define-module (my-hello)\n"
  827. " #:use-module (guix licenses)\n"
  828. " #:use-module (guix packages)\n"
  829. " #:use-module (guix build-system gnu)\n"
  830. " #:use-module (guix download))\n"
  831. "\n"
  832. msgstr ""
  833. #. type: lisp
  834. #: guix-git/doc/guix-cookbook.texi:634
  835. #, no-wrap
  836. msgid ""
  837. "(define-public my-hello\n"
  838. " (package\n"
  839. " (name \"my-hello\")\n"
  840. " (version \"2.10\")\n"
  841. " (source (origin\n"
  842. " (method url-fetch)\n"
  843. " (uri (string-append \"mirror://gnu/hello/hello-\" version\n"
  844. " \".tar.gz\"))\n"
  845. " (sha256\n"
  846. " (base32\n"
  847. " \"0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i\"))))\n"
  848. " (build-system gnu-build-system)\n"
  849. " (synopsis \"Hello, Guix world: An example custom Guix package\")\n"
  850. " (description\n"
  851. " \"GNU Hello prints the message \\\"Hello, world!\\\" and then exits. It\n"
  852. "serves as an example of standard GNU coding practices. As such, it supports\n"
  853. "command-line arguments, multiple languages, and so on.\")\n"
  854. " (home-page \"https://www.gnu.org/software/hello/\")\n"
  855. " (license gpl3+)))\n"
  856. msgstr ""
  857. #. type: Plain text
  858. #: guix-git/doc/guix-cookbook.texi:640
  859. msgid "Note that we have assigned the package value to an exported variable name with @code{define-public}. This is effectively assigning the package to the @code{my-hello} variable so that it can be referenced, among other as dependency of other packages."
  860. msgstr ""
  861. #. type: Plain text
  862. #: guix-git/doc/guix-cookbook.texi:645
  863. msgid "If you use @code{guix package --install-from-file=my-hello.scm} on the above file, it will fail because the last expression, @code{define-public}, does not return a package. If you want to use @code{define-public} in this use-case nonetheless, make sure the file ends with an evaluation of @code{my-hello}:"
  864. msgstr ""
  865. #. type: lisp
  866. #: guix-git/doc/guix-cookbook.texi:651
  867. #, no-wrap
  868. msgid ""
  869. "; ...\n"
  870. "(define-public my-hello\n"
  871. " ; ...\n"
  872. " )\n"
  873. "\n"
  874. msgstr ""
  875. #. type: lisp
  876. #: guix-git/doc/guix-cookbook.texi:653
  877. #, no-wrap
  878. msgid "my-hello\n"
  879. msgstr ""
  880. #. type: Plain text
  881. #: guix-git/doc/guix-cookbook.texi:656
  882. msgid "This last example is not very typical."
  883. msgstr ""
  884. #. type: Plain text
  885. #: guix-git/doc/guix-cookbook.texi:659
  886. msgid "Now @samp{my-hello} should be part of the package collection like all other official packages. You can verify this with:"
  887. msgstr ""
  888. #. type: example
  889. #: guix-git/doc/guix-cookbook.texi:662
  890. #, no-wrap
  891. msgid "$ guix package --show=my-hello\n"
  892. msgstr ""
  893. #. type: subsubsection
  894. #: guix-git/doc/guix-cookbook.texi:664 guix-git/doc/guix-cookbook.texi:665
  895. #, no-wrap
  896. msgid "Guix channels"
  897. msgstr ""
  898. #. type: Plain text
  899. #: guix-git/doc/guix-cookbook.texi:671
  900. msgid "Guix 0.16 features channels, which is very similar to @samp{GUIX_PACKAGE_PATH} but provides better integration and provenance tracking. Channels are not necessarily local, they can be maintained as a public Git repository for instance. Of course, several channels can be used at the same time."
  901. msgstr ""
  902. #. type: Plain text
  903. #: guix-git/doc/guix-cookbook.texi:673
  904. msgid "@xref{Channels,,, guix, GNU Guix Reference Manual} for setup details."
  905. msgstr ""
  906. #. type: subsubsection
  907. #: guix-git/doc/guix-cookbook.texi:674 guix-git/doc/guix-cookbook.texi:675
  908. #, no-wrap
  909. msgid "Direct checkout hacking"
  910. msgstr ""
  911. #. type: Plain text
  912. #: guix-git/doc/guix-cookbook.texi:680
  913. msgid "Working directly on the Guix project is recommended: it reduces the friction when the time comes to submit your changes upstream to let the community benefit from your hard work!"
  914. msgstr ""
  915. #. type: Plain text
  916. #: guix-git/doc/guix-cookbook.texi:686
  917. msgid "Unlike most software distributions, the Guix repository holds in one place both the tooling (including the package manager) and the package definitions. This choice was made so that it would give developers the flexibility to modify the API without breakage by updating all packages at the same time. This reduces development inertia."
  918. msgstr ""
  919. #. type: Plain text
  920. #: guix-git/doc/guix-cookbook.texi:688
  921. msgid "Check out the official @uref{https://git-scm.com/, Git} repository:"
  922. msgstr ""
  923. #. type: example
  924. #: guix-git/doc/guix-cookbook.texi:691
  925. #, no-wrap
  926. msgid "$ git clone https://git.savannah.gnu.org/git/guix.git\n"
  927. msgstr ""
  928. #. type: Plain text
  929. #: guix-git/doc/guix-cookbook.texi:695
  930. msgid "In the rest of this article, we use @samp{$GUIX_CHECKOUT} to refer to the location of the checkout."
  931. msgstr ""
  932. #. type: Plain text
  933. #: guix-git/doc/guix-cookbook.texi:699
  934. msgid "Follow the instructions in the manual (@pxref{Contributing,,, guix, GNU Guix Reference Manual}) to set up the repository environment."
  935. msgstr ""
  936. #. type: Plain text
  937. #: guix-git/doc/guix-cookbook.texi:702
  938. msgid "Once ready, you should be able to use the package definitions from the repository environment."
  939. msgstr ""
  940. #. type: Plain text
  941. #: guix-git/doc/guix-cookbook.texi:704
  942. msgid "Feel free to edit package definitions found in @samp{$GUIX_CHECKOUT/gnu/packages}."
  943. msgstr ""
  944. #. type: Plain text
  945. #: guix-git/doc/guix-cookbook.texi:708
  946. msgid "The @samp{$GUIX_CHECKOUT/pre-inst-env} script lets you use @samp{guix} over the package collection of the repository (@pxref{Running Guix Before It Is Installed,,, guix, GNU Guix Reference Manual})."
  947. msgstr ""
  948. #. type: itemize
  949. #: guix-git/doc/guix-cookbook.texi:712
  950. msgid "Search packages, such as Ruby:"
  951. msgstr ""
  952. #. type: example
  953. #: guix-git/doc/guix-cookbook.texi:719
  954. #, no-wrap
  955. msgid ""
  956. " $ cd $GUIX_CHECKOUT\n"
  957. " $ ./pre-inst-env guix package --list-available=ruby\n"
  958. " ruby 1.8.7-p374 out gnu/packages/ruby.scm:119:2\n"
  959. " ruby 2.1.6 out gnu/packages/ruby.scm:91:2\n"
  960. " ruby 2.2.2 out gnu/packages/ruby.scm:39:2\n"
  961. msgstr ""
  962. #. type: itemize
  963. #: guix-git/doc/guix-cookbook.texi:723
  964. msgid "Build a package, here Ruby version 2.1:"
  965. msgstr ""
  966. #. type: example
  967. #: guix-git/doc/guix-cookbook.texi:727
  968. #, no-wrap
  969. msgid ""
  970. " $ ./pre-inst-env guix build --keep-failed ruby@@2.1\n"
  971. " /gnu/store/c13v73jxmj2nir2xjqaz5259zywsa9zi-ruby-2.1.6\n"
  972. msgstr ""
  973. #. type: itemize
  974. #: guix-git/doc/guix-cookbook.texi:731
  975. msgid "Install it to your user profile:"
  976. msgstr ""
  977. #. type: example
  978. #: guix-git/doc/guix-cookbook.texi:734
  979. #, no-wrap
  980. msgid " $ ./pre-inst-env guix package --install ruby@@2.1\n"
  981. msgstr ""
  982. #. type: itemize
  983. #: guix-git/doc/guix-cookbook.texi:738
  984. msgid "Check for common mistakes:"
  985. msgstr ""
  986. #. type: example
  987. #: guix-git/doc/guix-cookbook.texi:741
  988. #, no-wrap
  989. msgid " $ ./pre-inst-env guix lint ruby@@2.1\n"
  990. msgstr ""
  991. #. type: Plain text
  992. #: guix-git/doc/guix-cookbook.texi:746
  993. msgid "Guix strives at maintaining a high packaging standard; when contributing to the Guix project, remember to"
  994. msgstr ""
  995. #. type: itemize
  996. #: guix-git/doc/guix-cookbook.texi:750
  997. msgid "follow the coding style (@pxref{Coding Style,,, guix, GNU Guix Reference Manual}),"
  998. msgstr ""
  999. #. type: itemize
  1000. #: guix-git/doc/guix-cookbook.texi:752
  1001. msgid "and review the check list from the manual (@pxref{Submitting Patches,,, guix, GNU Guix Reference Manual})."
  1002. msgstr ""
  1003. #. type: Plain text
  1004. #: guix-git/doc/guix-cookbook.texi:756
  1005. msgid "Once you are happy with the result, you are welcome to send your contribution to make it part of Guix. This process is also detailed in the manual. (@pxref{Contributing,,, guix, GNU Guix Reference Manual})"
  1006. msgstr ""
  1007. #. type: Plain text
  1008. #: guix-git/doc/guix-cookbook.texi:759
  1009. msgid "It's a community effort so the more join in, the better Guix becomes!"
  1010. msgstr ""
  1011. #. type: subsection
  1012. #: guix-git/doc/guix-cookbook.texi:760 guix-git/doc/guix-cookbook.texi:761
  1013. #, no-wrap
  1014. msgid "Extended example"
  1015. msgstr ""
  1016. #. type: Plain text
  1017. #: guix-git/doc/guix-cookbook.texi:766
  1018. msgid "The above ``Hello World'' example is as simple as it goes. Packages can be more complex than that and Guix can handle more advanced scenarios. Let's look at another, more sophisticated package (slightly modified from the source):"
  1019. msgstr ""
  1020. #. type: lisp
  1021. #: guix-git/doc/guix-cookbook.texi:780
  1022. #, no-wrap
  1023. msgid ""
  1024. "(define-module (gnu packages version-control)\n"
  1025. " #:use-module ((guix licenses) #:prefix license:)\n"
  1026. " #:use-module (guix utils)\n"
  1027. " #:use-module (guix packages)\n"
  1028. " #:use-module (guix git-download)\n"
  1029. " #:use-module (guix build-system cmake)\n"
  1030. " #:use-module (gnu packages ssh)\n"
  1031. " #:use-module (gnu packages web)\n"
  1032. " #:use-module (gnu packages pkg-config)\n"
  1033. " #:use-module (gnu packages python)\n"
  1034. " #:use-module (gnu packages compression)\n"
  1035. " #:use-module (gnu packages tls))\n"
  1036. "\n"
  1037. msgstr ""
  1038. #. type: lisp
  1039. #: guix-git/doc/guix-cookbook.texi:834
  1040. #, no-wrap
  1041. msgid ""
  1042. "(define-public my-libgit2\n"
  1043. " (let ((commit \"e98d0a37c93574d2c6107bf7f31140b548c6a7bf\")\n"
  1044. " (revision \"1\"))\n"
  1045. " (package\n"
  1046. " (name \"my-libgit2\")\n"
  1047. " (version (git-version \"0.26.6\" revision commit))\n"
  1048. " (source (origin\n"
  1049. " (method git-fetch)\n"
  1050. " (uri (git-reference\n"
  1051. " (url \"https://github.com/libgit2/libgit2/\")\n"
  1052. " (commit commit)))\n"
  1053. " (file-name (git-file-name name version))\n"
  1054. " (sha256\n"
  1055. " (base32\n"
  1056. " \"17pjvprmdrx4h6bb1hhc98w9qi6ki7yl57f090n9kbhswxqfs7s3\"))\n"
  1057. " (patches (search-patches \"libgit2-mtime-0.patch\"))\n"
  1058. " (modules '((guix build utils)))\n"
  1059. " ;; Remove bundled software.\n"
  1060. " (snippet '(delete-file-recursively \"deps\"))))\n"
  1061. " (build-system cmake-build-system)\n"
  1062. " (outputs '(\"out\" \"debug\"))\n"
  1063. " (arguments\n"
  1064. " `(#:tests? #true ; Run the test suite (this is the default)\n"
  1065. " #:configure-flags '(\"-DUSE_SHA1DC=ON\") ; SHA-1 collision detection\n"
  1066. " #:phases\n"
  1067. " (modify-phases %standard-phases\n"
  1068. " (add-after 'unpack 'fix-hardcoded-paths\n"
  1069. " (lambda _\n"
  1070. " (substitute* \"tests/repo/init.c\"\n"
  1071. " ((\"#!/bin/sh\") (string-append \"#!\" (which \"sh\"))))\n"
  1072. " (substitute* \"tests/clar/fs.h\"\n"
  1073. " ((\"/bin/cp\") (which \"cp\"))\n"
  1074. " ((\"/bin/rm\") (which \"rm\")))))\n"
  1075. " ;; Run checks more verbosely.\n"
  1076. " (replace 'check\n"
  1077. " (lambda _ (invoke \"./libgit2_clar\" \"-v\" \"-Q\")))\n"
  1078. " (add-after 'unpack 'make-files-writable-for-tests\n"
  1079. " (lambda _ (for-each make-file-writable (find-files \".\" \".*\")))))))\n"
  1080. " (inputs\n"
  1081. " (list libssh2 http-parser python-wrapper))\n"
  1082. " (native-inputs\n"
  1083. " (list pkg-config))\n"
  1084. " (propagated-inputs\n"
  1085. " ;; These two libraries are in 'Requires.private' in libgit2.pc.\n"
  1086. " (list openssl zlib))\n"
  1087. " (home-page \"https://libgit2.github.com/\")\n"
  1088. " (synopsis \"Library providing Git core methods\")\n"
  1089. " (description\n"
  1090. " \"Libgit2 is a portable, pure C implementation of the Git core methods\n"
  1091. "provided as a re-entrant linkable library with a solid API, allowing you to\n"
  1092. "write native speed custom Git applications in any language with bindings.\")\n"
  1093. " ;; GPLv2 with linking exception\n"
  1094. " (license license:gpl2))))\n"
  1095. msgstr ""
  1096. #. type: Plain text
  1097. #: guix-git/doc/guix-cookbook.texi:839
  1098. msgid "(In those cases were you only want to tweak a few fields from a package definition, you should rely on inheritance instead of copy-pasting everything. See below.)"
  1099. msgstr ""
  1100. #. type: Plain text
  1101. #: guix-git/doc/guix-cookbook.texi:841
  1102. msgid "Let's discuss those fields in depth."
  1103. msgstr ""
  1104. #. type: subsubsection
  1105. #: guix-git/doc/guix-cookbook.texi:842
  1106. #, no-wrap
  1107. msgid "@code{git-fetch} method"
  1108. msgstr ""
  1109. #. type: Plain text
  1110. #: guix-git/doc/guix-cookbook.texi:849
  1111. msgid "Unlike the @code{url-fetch} method, @code{git-fetch} expects a @code{git-reference} which takes a Git repository and a commit. The commit can be any Git reference such as tags, so if the @code{version} is tagged, then it can be used directly. Sometimes the tag is prefixed with a @code{v}, in which case you'd use @code{(commit (string-append \"v\" version))}."
  1112. msgstr ""
  1113. #. type: Plain text
  1114. #: guix-git/doc/guix-cookbook.texi:853
  1115. msgid "To ensure that the source code from the Git repository is stored in a directory with a descriptive name, we use @code{(file-name (git-file-name name version))}."
  1116. msgstr ""
  1117. #. type: Plain text
  1118. #: guix-git/doc/guix-cookbook.texi:858
  1119. msgid "The @code{git-version} procedure can be used to derive the version when packaging programs for a specific commit, following the Guix contributor guidelines (@pxref{Version Numbers,,, guix, GNU Guix Reference Manual})."
  1120. msgstr ""
  1121. #. type: Plain text
  1122. #: guix-git/doc/guix-cookbook.texi:862
  1123. msgid "How does one obtain the @code{sha256} hash that's in there, you ask? By invoking @command{guix hash} on a checkout of the desired commit, along these lines:"
  1124. msgstr ""
  1125. #. type: example
  1126. #: guix-git/doc/guix-cookbook.texi:868
  1127. #, no-wrap
  1128. msgid ""
  1129. "git clone https://github.com/libgit2/libgit2/\n"
  1130. "cd libgit2\n"
  1131. "git checkout v0.26.6\n"
  1132. "guix hash -rx .\n"
  1133. msgstr ""
  1134. #. type: Plain text
  1135. #: guix-git/doc/guix-cookbook.texi:873
  1136. msgid "@command{guix hash -rx} computes a SHA256 hash over the whole directory, excluding the @file{.git} sub-directory (@pxref{Invoking guix hash,,, guix, GNU Guix Reference Manual})."
  1137. msgstr ""
  1138. #. type: Plain text
  1139. #: guix-git/doc/guix-cookbook.texi:876
  1140. msgid "In the future, @command{guix download} will hopefully be able to do these steps for you, just like it does for regular downloads."
  1141. msgstr ""
  1142. #. type: subsubsection
  1143. #: guix-git/doc/guix-cookbook.texi:877
  1144. #, no-wrap
  1145. msgid "Snippets"
  1146. msgstr ""
  1147. #. type: Plain text
  1148. #: guix-git/doc/guix-cookbook.texi:883
  1149. msgid "Snippets are quoted (i.e. non-evaluated) Scheme code that are a means of patching the source. They are a Guix-y alternative to the traditional @file{.patch} files. Because of the quote, the code in only evaluated when passed to the Guix daemon for building. There can be as many snippets as needed."
  1150. msgstr ""
  1151. #. type: Plain text
  1152. #: guix-git/doc/guix-cookbook.texi:886
  1153. msgid "Snippets might need additional Guile modules which can be imported from the @code{modules} field."
  1154. msgstr ""
  1155. #. type: subsubsection
  1156. #: guix-git/doc/guix-cookbook.texi:887
  1157. #, no-wrap
  1158. msgid "Inputs"
  1159. msgstr ""
  1160. #. type: Plain text
  1161. #: guix-git/doc/guix-cookbook.texi:890
  1162. msgid "There are 3 different input types. In short:"
  1163. msgstr ""
  1164. #. type: item
  1165. #: guix-git/doc/guix-cookbook.texi:892
  1166. #, no-wrap
  1167. msgid "native-inputs"
  1168. msgstr ""
  1169. #. type: table
  1170. #: guix-git/doc/guix-cookbook.texi:895
  1171. msgid "Required for building but not runtime -- installing a package through a substitute won't install these inputs."
  1172. msgstr ""
  1173. #. type: item
  1174. #: guix-git/doc/guix-cookbook.texi:895
  1175. #, no-wrap
  1176. msgid "inputs"
  1177. msgstr ""
  1178. #. type: table
  1179. #: guix-git/doc/guix-cookbook.texi:898
  1180. msgid "Installed in the store but not in the profile, as well as being present at build time."
  1181. msgstr ""
  1182. #. type: item
  1183. #: guix-git/doc/guix-cookbook.texi:898
  1184. #, no-wrap
  1185. msgid "propagated-inputs"
  1186. msgstr ""
  1187. #. type: table
  1188. #: guix-git/doc/guix-cookbook.texi:901
  1189. msgid "Installed in the store and in the profile, as well as being present at build time."
  1190. msgstr ""
  1191. #. type: Plain text
  1192. #: guix-git/doc/guix-cookbook.texi:904
  1193. msgid "@xref{Package Reference,,, guix, GNU Guix Reference Manual} for more details."
  1194. msgstr ""
  1195. #. type: Plain text
  1196. #: guix-git/doc/guix-cookbook.texi:908
  1197. msgid "The distinction between the various inputs is important: if a dependency can be handled as an @emph{input} instead of a @emph{propagated input}, it should be done so, or else it ``pollutes'' the user profile for no good reason."
  1198. msgstr ""
  1199. #. type: Plain text
  1200. #: guix-git/doc/guix-cookbook.texi:915
  1201. msgid "For instance, a user installing a graphical program that depends on a command line tool might only be interested in the graphical part, so there is no need to force the command line tool into the user profile. The dependency is a concern to the package, not to the user. @emph{Inputs} make it possible to handle dependencies without bugging the user by adding undesired executable files (or libraries) to their profile."
  1202. msgstr ""
  1203. #. type: Plain text
  1204. #: guix-git/doc/guix-cookbook.texi:921
  1205. msgid "Same goes for @emph{native-inputs}: once the program is installed, build-time dependencies can be safely garbage-collected. It also matters when a substitute is available, in which case only the @emph{inputs} and @emph{propagated inputs} will be fetched: the @emph{native inputs} are not required to install a package from a substitute."
  1206. msgstr ""
  1207. #. type: quotation
  1208. #: guix-git/doc/guix-cookbook.texi:922 guix-git/doc/guix-cookbook.texi:1892
  1209. #, no-wrap
  1210. msgid "Note"
  1211. msgstr ""
  1212. #. type: quotation
  1213. #: guix-git/doc/guix-cookbook.texi:925
  1214. msgid "You may see here and there snippets where package inputs are written quite differently, like so:"
  1215. msgstr ""
  1216. #. type: lisp
  1217. #: guix-git/doc/guix-cookbook.texi:932
  1218. #, no-wrap
  1219. msgid ""
  1220. ";; The \"old style\" for inputs.\n"
  1221. "(inputs\n"
  1222. " `((\"libssh2\" ,libssh2)\n"
  1223. " (\"http-parser\" ,http-parser)\n"
  1224. " (\"python\" ,python-wrapper)))\n"
  1225. msgstr ""
  1226. #. type: quotation
  1227. #: guix-git/doc/guix-cookbook.texi:938
  1228. msgid "This is the ``old style'', where each input in the list is explicitly given a label (a string). It is still supported but we recommend using the style above instead. @xref{package Reference,,, guix, GNU Guix Reference Manual}, for more info."
  1229. msgstr ""
  1230. #. type: subsubsection
  1231. #: guix-git/doc/guix-cookbook.texi:940
  1232. #, no-wrap
  1233. msgid "Outputs"
  1234. msgstr ""
  1235. #. type: Plain text
  1236. #: guix-git/doc/guix-cookbook.texi:944
  1237. msgid "Just like how a package can have multiple inputs, it can also produce multiple outputs."
  1238. msgstr ""
  1239. #. type: Plain text
  1240. #: guix-git/doc/guix-cookbook.texi:946
  1241. msgid "Each output corresponds to a separate directory in the store."
  1242. msgstr ""
  1243. #. type: Plain text
  1244. #: guix-git/doc/guix-cookbook.texi:949
  1245. msgid "The user can choose which output to install; this is useful to save space or to avoid polluting the user profile with unwanted executables or libraries."
  1246. msgstr ""
  1247. #. type: Plain text
  1248. #: guix-git/doc/guix-cookbook.texi:952
  1249. msgid "Output separation is optional. When the @code{outputs} field is left out, the default and only output (the complete package) is referred to as @code{\"out\"}."
  1250. msgstr ""
  1251. #. type: Plain text
  1252. #: guix-git/doc/guix-cookbook.texi:954
  1253. msgid "Typical separate output names include @code{debug} and @code{doc}."
  1254. msgstr ""
  1255. #. type: Plain text
  1256. #: guix-git/doc/guix-cookbook.texi:958
  1257. msgid "It's advised to separate outputs only when you've shown it's worth it: if the output size is significant (compare with @code{guix size}) or in case the package is modular."
  1258. msgstr ""
  1259. #. type: subsubsection
  1260. #: guix-git/doc/guix-cookbook.texi:959
  1261. #, no-wrap
  1262. msgid "Build system arguments"
  1263. msgstr ""
  1264. #. type: Plain text
  1265. #: guix-git/doc/guix-cookbook.texi:962
  1266. msgid "The @code{arguments} is a keyword-value list used to configure the build process."
  1267. msgstr ""
  1268. #. type: Plain text
  1269. #: guix-git/doc/guix-cookbook.texi:967
  1270. msgid "The simplest argument @code{#:tests?} can be used to disable the test suite when building the package. This is mostly useful when the package does not feature any test suite. It's strongly recommended to keep the test suite on if there is one."
  1271. msgstr ""
  1272. #. type: Plain text
  1273. #: guix-git/doc/guix-cookbook.texi:971
  1274. msgid "Another common argument is @code{:make-flags}, which specifies a list of flags to append when running make, as you would from the command line. For instance, the following flags"
  1275. msgstr ""
  1276. #. type: lisp
  1277. #: guix-git/doc/guix-cookbook.texi:975
  1278. #, no-wrap
  1279. msgid ""
  1280. "#:make-flags (list (string-append \"prefix=\" (assoc-ref %outputs \"out\"))\n"
  1281. " \"CC=gcc\")\n"
  1282. msgstr ""
  1283. #. type: Plain text
  1284. #: guix-git/doc/guix-cookbook.texi:978
  1285. msgid "translate into"
  1286. msgstr ""
  1287. #. type: example
  1288. #: guix-git/doc/guix-cookbook.texi:981
  1289. #, no-wrap
  1290. msgid "$ make CC=gcc prefix=/gnu/store/...-<out>\n"
  1291. msgstr ""
  1292. #. type: Plain text
  1293. #: guix-git/doc/guix-cookbook.texi:987
  1294. msgid "This sets the C compiler to @code{gcc} and the @code{prefix} variable (the installation directory in Make parlance) to @code{(assoc-ref %outputs \"out\")}, which is a build-stage global variable pointing to the destination directory in the store (something like @file{/gnu/store/...-my-libgit2-20180408})."
  1295. msgstr ""
  1296. #. type: Plain text
  1297. #: guix-git/doc/guix-cookbook.texi:989
  1298. msgid "Similarly, it's possible to set the configure flags:"
  1299. msgstr ""
  1300. #. type: lisp
  1301. #: guix-git/doc/guix-cookbook.texi:992
  1302. #, no-wrap
  1303. msgid "#:configure-flags '(\"-DUSE_SHA1DC=ON\")\n"
  1304. msgstr ""
  1305. #. type: Plain text
  1306. #: guix-git/doc/guix-cookbook.texi:996
  1307. msgid "The @code{%build-inputs} variable is also generated in scope. It's an association table that maps the input names to their store directories."
  1308. msgstr ""
  1309. #. type: Plain text
  1310. #: guix-git/doc/guix-cookbook.texi:1001
  1311. msgid "The @code{phases} keyword lists the sequential steps of the build system. Typically phases include @code{unpack}, @code{configure}, @code{build}, @code{install} and @code{check}. To know more about those phases, you need to work out the appropriate build system definition in @samp{$GUIX_CHECKOUT/guix/build/gnu-build-system.scm}:"
  1312. msgstr ""
  1313. #. type: lisp
  1314. #: guix-git/doc/guix-cookbook.texi:1020
  1315. #, no-wrap
  1316. msgid ""
  1317. "(define %standard-phases\n"
  1318. " ;; Standard build phases, as a list of symbol/procedure pairs.\n"
  1319. " (let-syntax ((phases (syntax-rules ()\n"
  1320. " ((_ p ...) `((p . ,p) ...)))))\n"
  1321. " (phases set-SOURCE-DATE-EPOCH set-paths install-locale unpack\n"
  1322. " bootstrap\n"
  1323. " patch-usr-bin-file\n"
  1324. " patch-source-shebangs configure patch-generated-file-shebangs\n"
  1325. " build check install\n"
  1326. " patch-shebangs strip\n"
  1327. " validate-runpath\n"
  1328. " validate-documentation-location\n"
  1329. " delete-info-dir-file\n"
  1330. " patch-dot-desktop-files\n"
  1331. " install-license-files\n"
  1332. " reset-gzip-timestamps\n"
  1333. " compress-documentation)))\n"
  1334. msgstr ""
  1335. #. type: Plain text
  1336. #: guix-git/doc/guix-cookbook.texi:1023
  1337. msgid "Or from the REPL:"
  1338. msgstr ""
  1339. #. type: lisp
  1340. #: guix-git/doc/guix-cookbook.texi:1029
  1341. #, no-wrap
  1342. msgid ""
  1343. "(add-to-load-path \"/path/to/guix/checkout\")\n"
  1344. ",use (guix build gnu-build-system)\n"
  1345. "(map first %standard-phases)\n"
  1346. "@result{} (set-SOURCE-DATE-EPOCH set-paths install-locale unpack bootstrap patch-usr-bin-file patch-source-shebangs configure patch-generated-file-shebangs build check install patch-shebangs strip validate-runpath validate-documentation-location delete-info-dir-file patch-dot-desktop-files install-license-files reset-gzip-timestamps compress-documentation)\n"
  1347. msgstr ""
  1348. #. type: Plain text
  1349. #: guix-git/doc/guix-cookbook.texi:1033
  1350. msgid "If you want to know more about what happens during those phases, consult the associated procedures."
  1351. msgstr ""
  1352. #. type: Plain text
  1353. #: guix-git/doc/guix-cookbook.texi:1036
  1354. msgid "For instance, as of this writing the definition of @code{unpack} for the GNU build system is:"
  1355. msgstr ""
  1356. #. type: lisp
  1357. #: guix-git/doc/guix-cookbook.texi:1046
  1358. #, no-wrap
  1359. msgid ""
  1360. "(define* (unpack #:key source #:allow-other-keys)\n"
  1361. " \"Unpack SOURCE in the working directory, and change directory within the\n"
  1362. "source. When SOURCE is a directory, copy it in a sub-directory of the current\n"
  1363. "working directory.\"\n"
  1364. " (if (file-is-directory? source)\n"
  1365. " (begin\n"
  1366. " (mkdir \"source\")\n"
  1367. " (chdir \"source\")\n"
  1368. "\n"
  1369. msgstr ""
  1370. #. type: lisp
  1371. #: guix-git/doc/guix-cookbook.texi:1057
  1372. #, no-wrap
  1373. msgid ""
  1374. " ;; Preserve timestamps (set to the Epoch) on the copied tree so that\n"
  1375. " ;; things work deterministically.\n"
  1376. " (copy-recursively source \".\"\n"
  1377. " #:keep-mtime? #true))\n"
  1378. " (begin\n"
  1379. " (if (string-suffix? \".zip\" source)\n"
  1380. " (invoke \"unzip\" source)\n"
  1381. " (invoke \"tar\" \"xvf\" source))\n"
  1382. " (chdir (first-subdirectory \".\"))))\n"
  1383. " #true)\n"
  1384. msgstr ""
  1385. #. type: Plain text
  1386. #: guix-git/doc/guix-cookbook.texi:1065
  1387. msgid "Note the @code{chdir} call: it changes the working directory to where the source was unpacked. Thus every phase following the @code{unpack} will use the source as a working directory, which is why we can directly work on the source files. That is to say, unless a later phase changes the working directory to something else."
  1388. msgstr ""
  1389. #. type: Plain text
  1390. #: guix-git/doc/guix-cookbook.texi:1069
  1391. msgid "We modify the list of @code{%standard-phases} of the build system with the @code{modify-phases} macro as per the list of specified modifications, which may have the following forms:"
  1392. msgstr ""
  1393. #. type: itemize
  1394. #: guix-git/doc/guix-cookbook.texi:1073
  1395. msgid "@code{(add-before @var{phase} @var{new-phase} @var{procedure})}: Run @var{procedure} named @var{new-phase} before @var{phase}."
  1396. msgstr ""
  1397. #. type: itemize
  1398. #: guix-git/doc/guix-cookbook.texi:1075
  1399. msgid "@code{(add-after @var{phase} @var{new-phase} @var{procedure})}: Same, but afterwards."
  1400. msgstr ""
  1401. #. type: itemize
  1402. #: guix-git/doc/guix-cookbook.texi:1077
  1403. msgid "@code{(replace @var{phase} @var{procedure})}."
  1404. msgstr ""
  1405. #. type: itemize
  1406. #: guix-git/doc/guix-cookbook.texi:1079
  1407. msgid "@code{(delete @var{phase})}."
  1408. msgstr ""
  1409. #. type: Plain text
  1410. #: guix-git/doc/guix-cookbook.texi:1086
  1411. msgid "The @var{procedure} supports the keyword arguments @code{inputs} and @code{outputs}. Each input (whether @emph{native}, @emph{propagated} or not) and output directory is referenced by their name in those variables. Thus @code{(assoc-ref outputs \"out\")} is the store directory of the main output of the package. A phase procedure may look like this:"
  1412. msgstr ""
  1413. #. type: lisp
  1414. #: guix-git/doc/guix-cookbook.texi:1094
  1415. #, no-wrap
  1416. msgid ""
  1417. "(lambda* (#:key inputs outputs #:allow-other-keys)\n"
  1418. " (let ((bash-directory (assoc-ref inputs \"bash\"))\n"
  1419. " (output-directory (assoc-ref outputs \"out\"))\n"
  1420. " (doc-directory (assoc-ref outputs \"doc\")))\n"
  1421. " ;; ...\n"
  1422. " #true))\n"
  1423. msgstr ""
  1424. #. type: Plain text
  1425. #: guix-git/doc/guix-cookbook.texi:1100
  1426. msgid "The procedure must return @code{#true} on success. It's brittle to rely on the return value of the last expression used to tweak the phase because there is no guarantee it would be a @code{#true}. Hence the trailing @code{#true} to ensure the right value is returned on success."
  1427. msgstr ""
  1428. #. type: subsubsection
  1429. #: guix-git/doc/guix-cookbook.texi:1101
  1430. #, no-wrap
  1431. msgid "Code staging"
  1432. msgstr ""
  1433. #. type: Plain text
  1434. #: guix-git/doc/guix-cookbook.texi:1107
  1435. msgid "The astute reader may have noticed the quasi-quote and comma syntax in the argument field. Indeed, the build code in the package declaration should not be evaluated on the client side, but only when passed to the Guix daemon. This mechanism of passing code around two running processes is called @uref{https://arxiv.org/abs/1709.00833, code staging}."
  1436. msgstr ""
  1437. #. type: subsubsection
  1438. #: guix-git/doc/guix-cookbook.texi:1108
  1439. #, no-wrap
  1440. msgid "Utility functions"
  1441. msgstr ""
  1442. #. type: Plain text
  1443. #: guix-git/doc/guix-cookbook.texi:1113
  1444. msgid "When customizing @code{phases}, we often need to write code that mimics the equivalent system invocations (@code{make}, @code{mkdir}, @code{cp}, etc.)@: commonly used during regular ``Unix-style'' installations."
  1445. msgstr ""
  1446. #. type: Plain text
  1447. #: guix-git/doc/guix-cookbook.texi:1116
  1448. msgid "Some like @code{chmod} are native to Guile. @xref{,,, guile, Guile reference manual} for a complete list."
  1449. msgstr ""
  1450. #. type: Plain text
  1451. #: guix-git/doc/guix-cookbook.texi:1119
  1452. msgid "Guix provides additional helper functions which prove especially handy in the context of package management."
  1453. msgstr ""
  1454. #. type: Plain text
  1455. #: guix-git/doc/guix-cookbook.texi:1123
  1456. msgid "Some of those functions can be found in @samp{$GUIX_CHECKOUT/guix/guix/build/utils.scm}. Most of them mirror the behaviour of the traditional Unix system commands:"
  1457. msgstr ""
  1458. #. type: item
  1459. #: guix-git/doc/guix-cookbook.texi:1125
  1460. #, no-wrap
  1461. msgid "which"
  1462. msgstr ""
  1463. #. type: table
  1464. #: guix-git/doc/guix-cookbook.texi:1127
  1465. msgid "Like the @samp{which} system command."
  1466. msgstr ""
  1467. #. type: item
  1468. #: guix-git/doc/guix-cookbook.texi:1127
  1469. #, no-wrap
  1470. msgid "find-files"
  1471. msgstr ""
  1472. #. type: table
  1473. #: guix-git/doc/guix-cookbook.texi:1129
  1474. msgid "Akin to the @samp{find} system command."
  1475. msgstr ""
  1476. #. type: item
  1477. #: guix-git/doc/guix-cookbook.texi:1129
  1478. #, no-wrap
  1479. msgid "mkdir-p"
  1480. msgstr ""
  1481. #. type: table
  1482. #: guix-git/doc/guix-cookbook.texi:1131
  1483. msgid "Like @samp{mkdir -p}, which creates all parents as needed."
  1484. msgstr ""
  1485. #. type: item
  1486. #: guix-git/doc/guix-cookbook.texi:1131
  1487. #, no-wrap
  1488. msgid "install-file"
  1489. msgstr ""
  1490. #. type: table
  1491. #: guix-git/doc/guix-cookbook.texi:1135
  1492. msgid "Similar to @samp{install} when installing a file to a (possibly non-existing) directory. Guile has @code{copy-file} which works like @samp{cp}."
  1493. msgstr ""
  1494. #. type: item
  1495. #: guix-git/doc/guix-cookbook.texi:1135
  1496. #, no-wrap
  1497. msgid "copy-recursively"
  1498. msgstr ""
  1499. #. type: table
  1500. #: guix-git/doc/guix-cookbook.texi:1137
  1501. msgid "Like @samp{cp -r}."
  1502. msgstr ""
  1503. #. type: item
  1504. #: guix-git/doc/guix-cookbook.texi:1137
  1505. #, no-wrap
  1506. msgid "delete-file-recursively"
  1507. msgstr ""
  1508. #. type: table
  1509. #: guix-git/doc/guix-cookbook.texi:1139
  1510. msgid "Like @samp{rm -rf}."
  1511. msgstr ""
  1512. #. type: item
  1513. #: guix-git/doc/guix-cookbook.texi:1139
  1514. #, no-wrap
  1515. msgid "invoke"
  1516. msgstr ""
  1517. #. type: table
  1518. #: guix-git/doc/guix-cookbook.texi:1141
  1519. msgid "Run an executable. This should be used instead of @code{system*}."
  1520. msgstr ""
  1521. #. type: item
  1522. #: guix-git/doc/guix-cookbook.texi:1141
  1523. #, no-wrap
  1524. msgid "with-directory-excursion"
  1525. msgstr ""
  1526. #. type: table
  1527. #: guix-git/doc/guix-cookbook.texi:1144
  1528. msgid "Run the body in a different working directory, then restore the previous working directory."
  1529. msgstr ""
  1530. #. type: item
  1531. #: guix-git/doc/guix-cookbook.texi:1144
  1532. #, no-wrap
  1533. msgid "substitute*"
  1534. msgstr ""
  1535. #. type: table
  1536. #: guix-git/doc/guix-cookbook.texi:1146
  1537. msgid "A ``@command{sed}-like'' function."
  1538. msgstr ""
  1539. #. type: Plain text
  1540. #: guix-git/doc/guix-cookbook.texi:1150
  1541. msgid "@xref{Build Utilities,,, guix, GNU Guix Reference Manual}, for more information on these utilities."
  1542. msgstr ""
  1543. #. type: subsubsection
  1544. #: guix-git/doc/guix-cookbook.texi:1151
  1545. #, no-wrap
  1546. msgid "Module prefix"
  1547. msgstr ""
  1548. #. type: Plain text
  1549. #: guix-git/doc/guix-cookbook.texi:1161
  1550. msgid "The license in our last example needs a prefix: this is because of how the @code{license} module was imported in the package, as @code{#:use-module ((guix licenses) #:prefix license:)}. The Guile module import mechanism (@pxref{Using Guile Modules,,, guile, Guile reference manual}) gives the user full control over namespacing: this is needed to avoid clashes between, say, the @samp{zlib} variable from @samp{licenses.scm} (a @emph{license} value) and the @samp{zlib} variable from @samp{compression.scm} (a @emph{package} value)."
  1551. msgstr ""
  1552. #. type: subsection
  1553. #: guix-git/doc/guix-cookbook.texi:1162 guix-git/doc/guix-cookbook.texi:1163
  1554. #, no-wrap
  1555. msgid "Other build systems"
  1556. msgstr ""
  1557. #. type: Plain text
  1558. #: guix-git/doc/guix-cookbook.texi:1170
  1559. msgid "What we've seen so far covers the majority of packages using a build system other than the @code{trivial-build-system}. The latter does not automate anything and leaves you to build everything manually. This can be more demanding and we won't cover it here for now, but thankfully it is rarely necessary to fall back on this system."
  1560. msgstr ""
  1561. #. type: Plain text
  1562. #: guix-git/doc/guix-cookbook.texi:1174
  1563. msgid "For the other build systems, such as ASDF, Emacs, Perl, Ruby and many more, the process is very similar to the GNU build system except for a few specialized arguments."
  1564. msgstr ""
  1565. #. type: Plain text
  1566. #: guix-git/doc/guix-cookbook.texi:1179
  1567. msgid "@xref{Build Systems,,, guix, GNU Guix Reference Manual}, for more information on build systems, or check the source code in the @samp{$GUIX_CHECKOUT/guix/build} and @samp{$GUIX_CHECKOUT/guix/build-system} directories."
  1568. msgstr ""
  1569. #. type: subsection
  1570. #: guix-git/doc/guix-cookbook.texi:1180 guix-git/doc/guix-cookbook.texi:1181
  1571. #, no-wrap
  1572. msgid "Programmable and automated package definition"
  1573. msgstr ""
  1574. #. type: Plain text
  1575. #: guix-git/doc/guix-cookbook.texi:1185
  1576. msgid "We can't repeat it enough: having a full-fledged programming language at hand empowers us in ways that reach far beyond traditional package management."
  1577. msgstr ""
  1578. #. type: Plain text
  1579. #: guix-git/doc/guix-cookbook.texi:1187
  1580. msgid "Let's illustrate this with some awesome features of Guix!"
  1581. msgstr ""
  1582. #. type: subsubsection
  1583. #: guix-git/doc/guix-cookbook.texi:1188 guix-git/doc/guix-cookbook.texi:1189
  1584. #, no-wrap
  1585. msgid "Recursive importers"
  1586. msgstr ""
  1587. #. type: Plain text
  1588. #: guix-git/doc/guix-cookbook.texi:1196
  1589. msgid "You might find some build systems good enough that there is little to do at all to write a package, to the point that it becomes repetitive and tedious after a while. A @emph{raison d'être} of computers is to replace human beings at those boring tasks. So let's tell Guix to do this for us and create the package definition of an R package from CRAN (the output is trimmed for conciseness):"
  1590. msgstr ""
  1591. #. type: example
  1592. #: guix-git/doc/guix-cookbook.texi:1199
  1593. #, no-wrap
  1594. msgid ""
  1595. "$ guix import cran --recursive walrus\n"
  1596. "\n"
  1597. msgstr ""
  1598. #. type: example
  1599. #: guix-git/doc/guix-cookbook.texi:1203
  1600. #, no-wrap
  1601. msgid ""
  1602. "(define-public r-mc2d\n"
  1603. " ; ...\n"
  1604. " (license gpl2+)))\n"
  1605. "\n"
  1606. msgstr ""
  1607. #. type: example
  1608. #: guix-git/doc/guix-cookbook.texi:1207
  1609. #, no-wrap
  1610. msgid ""
  1611. "(define-public r-jmvcore\n"
  1612. " ; ...\n"
  1613. " (license gpl2+)))\n"
  1614. "\n"
  1615. msgstr ""
  1616. #. type: example
  1617. #: guix-git/doc/guix-cookbook.texi:1211
  1618. #, no-wrap
  1619. msgid ""
  1620. "(define-public r-wrs2\n"
  1621. " ; ...\n"
  1622. " (license gpl3)))\n"
  1623. "\n"
  1624. msgstr ""
  1625. #. type: example
  1626. #: guix-git/doc/guix-cookbook.texi:1237
  1627. #, no-wrap
  1628. msgid ""
  1629. "(define-public r-walrus\n"
  1630. " (package\n"
  1631. " (name \"r-walrus\")\n"
  1632. " (version \"1.0.3\")\n"
  1633. " (source\n"
  1634. " (origin\n"
  1635. " (method url-fetch)\n"
  1636. " (uri (cran-uri \"walrus\" version))\n"
  1637. " (sha256\n"
  1638. " (base32\n"
  1639. " \"1nk2glcvy4hyksl5ipq2mz8jy4fss90hx6cq98m3w96kzjni6jjj\"))))\n"
  1640. " (build-system r-build-system)\n"
  1641. " (propagated-inputs\n"
  1642. " (list r-ggplot2 r-jmvcore r-r6 r-wrs2))\n"
  1643. " (home-page \"https://github.com/jamovi/walrus\")\n"
  1644. " (synopsis \"Robust Statistical Methods\")\n"
  1645. " (description\n"
  1646. " \"This package provides a toolbox of common robust statistical\n"
  1647. "tests, including robust descriptives, robust t-tests, and robust ANOVA.\n"
  1648. "It is also available as a module for 'jamovi' (see\n"
  1649. "<https://www.jamovi.org> for more information). Walrus is based on the\n"
  1650. "WRS2 package by Patrick Mair, which is in turn based on the scripts and\n"
  1651. "work of Rand Wilcox. These analyses are described in depth in the book\n"
  1652. "'Introduction to Robust Estimation & Hypothesis Testing'.\")\n"
  1653. " (license gpl3)))\n"
  1654. msgstr ""
  1655. #. type: Plain text
  1656. #: guix-git/doc/guix-cookbook.texi:1241
  1657. msgid "The recursive importer won't import packages for which Guix already has package definitions, except for the very first."
  1658. msgstr ""
  1659. #. type: Plain text
  1660. #: guix-git/doc/guix-cookbook.texi:1246
  1661. msgid "Not all applications can be packaged this way, only those relying on a select number of supported systems. Read about the full list of importers in the guix import section of the manual (@pxref{Invoking guix import,,, guix, GNU Guix Reference Manual})."
  1662. msgstr ""
  1663. #. type: subsubsection
  1664. #: guix-git/doc/guix-cookbook.texi:1247 guix-git/doc/guix-cookbook.texi:1248
  1665. #, no-wrap
  1666. msgid "Automatic update"
  1667. msgstr ""
  1668. #. type: Plain text
  1669. #: guix-git/doc/guix-cookbook.texi:1252
  1670. msgid "Guix can be smart enough to check for updates on systems it knows. It can report outdated package definitions with"
  1671. msgstr ""
  1672. #. type: example
  1673. #: guix-git/doc/guix-cookbook.texi:1255
  1674. #, no-wrap
  1675. msgid "$ guix refresh hello\n"
  1676. msgstr ""
  1677. #. type: Plain text
  1678. #: guix-git/doc/guix-cookbook.texi:1260
  1679. msgid "In most cases, updating a package to a newer version requires little more than changing the version number and the checksum. Guix can do that automatically as well:"
  1680. msgstr ""
  1681. #. type: example
  1682. #: guix-git/doc/guix-cookbook.texi:1263
  1683. #, no-wrap
  1684. msgid "$ guix refresh hello --update\n"
  1685. msgstr ""
  1686. #. type: subsubsection
  1687. #: guix-git/doc/guix-cookbook.texi:1265 guix-git/doc/guix-cookbook.texi:1266
  1688. #, no-wrap
  1689. msgid "Inheritance"
  1690. msgstr ""
  1691. #. type: Plain text
  1692. #: guix-git/doc/guix-cookbook.texi:1270
  1693. msgid "If you've started browsing the existing package definitions, you might have noticed that a significant number of them have a @code{inherit} field:"
  1694. msgstr ""
  1695. #. type: lisp
  1696. #: guix-git/doc/guix-cookbook.texi:1285
  1697. #, no-wrap
  1698. msgid ""
  1699. "(define-public adwaita-icon-theme\n"
  1700. " (package (inherit gnome-icon-theme)\n"
  1701. " (name \"adwaita-icon-theme\")\n"
  1702. " (version \"3.26.1\")\n"
  1703. " (source (origin\n"
  1704. " (method url-fetch)\n"
  1705. " (uri (string-append \"mirror://gnome/sources/\" name \"/\"\n"
  1706. " (version-major+minor version) \"/\"\n"
  1707. " name \"-\" version \".tar.xz\"))\n"
  1708. " (sha256\n"
  1709. " (base32\n"
  1710. " \"17fpahgh5dyckgz7rwqvzgnhx53cx9kr2xw0szprc6bnqy977fi8\"))))\n"
  1711. " (native-inputs (list `(,gtk+ \"bin\")))))\n"
  1712. msgstr ""
  1713. #. type: Plain text
  1714. #: guix-git/doc/guix-cookbook.texi:1290
  1715. msgid "All unspecified fields are inherited from the parent package. This is very convenient to create alternative packages, for instance with different source, version or compilation options."
  1716. msgstr ""
  1717. #. type: subsection
  1718. #: guix-git/doc/guix-cookbook.texi:1291 guix-git/doc/guix-cookbook.texi:1292
  1719. #, no-wrap
  1720. msgid "Getting help"
  1721. msgstr ""
  1722. #. type: Plain text
  1723. #: guix-git/doc/guix-cookbook.texi:1298
  1724. msgid "Sadly, some applications can be tough to package. Sometimes they need a patch to work with the non-standard file system hierarchy enforced by the store. Sometimes the tests won't run properly. (They can be skipped but this is not recommended.) Other times the resulting package won't be reproducible."
  1725. msgstr ""
  1726. #. type: Plain text
  1727. #: guix-git/doc/guix-cookbook.texi:1301
  1728. msgid "Should you be stuck, unable to figure out how to fix any sort of packaging issue, don't hesitate to ask the community for help."
  1729. msgstr ""
  1730. #. type: Plain text
  1731. #: guix-git/doc/guix-cookbook.texi:1303
  1732. msgid "See the @uref{https://www.gnu.org/software/guix/contact/, Guix homepage} for information on the mailing lists, IRC, etc."
  1733. msgstr ""
  1734. #. type: subsection
  1735. #: guix-git/doc/guix-cookbook.texi:1304 guix-git/doc/guix-cookbook.texi:1305
  1736. #, no-wrap
  1737. msgid "Conclusion"
  1738. msgstr ""
  1739. #. type: Plain text
  1740. #: guix-git/doc/guix-cookbook.texi:1311
  1741. msgid "This tutorial was a showcase of the sophisticated package management that Guix boasts. At this point we have mostly restricted this introduction to the @code{gnu-build-system} which is a core abstraction layer on which more advanced abstractions are based."
  1742. msgstr ""
  1743. #. type: Plain text
  1744. #: guix-git/doc/guix-cookbook.texi:1316
  1745. msgid "Where do we go from here? Next we ought to dissect the innards of the build system by removing all abstractions, using the @code{trivial-build-system}: this should give us a thorough understanding of the process before investigating some more advanced packaging techniques and edge cases."
  1746. msgstr ""
  1747. #. type: Plain text
  1748. #: guix-git/doc/guix-cookbook.texi:1319
  1749. msgid "Other features worth exploring are the interactive editing and debugging capabilities of Guix provided by the Guile REPL@."
  1750. msgstr ""
  1751. #. type: Plain text
  1752. #: guix-git/doc/guix-cookbook.texi:1324
  1753. msgid "Those fancy features are completely optional and can wait; now is a good time to take a well-deserved break. With what we've introduced here you should be well armed to package lots of programs. You can get started right away and hopefully we will see your contributions soon!"
  1754. msgstr ""
  1755. #. type: subsection
  1756. #: guix-git/doc/guix-cookbook.texi:1325 guix-git/doc/guix-cookbook.texi:1326
  1757. #, no-wrap
  1758. msgid "References"
  1759. msgstr ""
  1760. #. type: itemize
  1761. #: guix-git/doc/guix-cookbook.texi:1331
  1762. msgid "The @uref{https://www.gnu.org/software/guix/manual/en/html_node/Defining-Packages.html, package reference in the manual}"
  1763. msgstr ""
  1764. #. type: itemize
  1765. #: guix-git/doc/guix-cookbook.texi:1334
  1766. msgid "@uref{https://gitlab.com/pjotrp/guix-notes/blob/master/HACKING.org, Pjotr’s hacking guide to GNU Guix}"
  1767. msgstr ""
  1768. #. type: itemize
  1769. #: guix-git/doc/guix-cookbook.texi:1337
  1770. msgid "@uref{https://www.gnu.org/software/guix/guix-ghm-andreas-20130823.pdf, ``GNU Guix: Package without a scheme!''}, by Andreas Enge"
  1771. msgstr ""
  1772. #. type: Plain text
  1773. #: guix-git/doc/guix-cookbook.texi:1346
  1774. msgid "Guix offers a flexible language for declaratively configuring your Guix System. This flexibility can at times be overwhelming. The purpose of this chapter is to demonstrate some advanced configuration concepts."
  1775. msgstr ""
  1776. #. type: Plain text
  1777. #: guix-git/doc/guix-cookbook.texi:1349
  1778. msgid "@pxref{System Configuration,,, guix, GNU Guix Reference Manual} for a complete reference."
  1779. msgstr ""
  1780. #. type: section
  1781. #: guix-git/doc/guix-cookbook.texi:1360 guix-git/doc/guix-cookbook.texi:1645
  1782. #: guix-git/doc/guix-cookbook.texi:1646
  1783. #, no-wrap
  1784. msgid "Guix System Image API"
  1785. msgstr ""
  1786. #. type: menuentry
  1787. #: guix-git/doc/guix-cookbook.texi:1360
  1788. msgid "Customizing images to target specific platforms."
  1789. msgstr ""
  1790. #. type: section
  1791. #: guix-git/doc/guix-cookbook.texi:1360 guix-git/doc/guix-cookbook.texi:1856
  1792. #: guix-git/doc/guix-cookbook.texi:1857
  1793. #, no-wrap
  1794. msgid "Connecting to Wireguard VPN"
  1795. msgstr ""
  1796. #. type: menuentry
  1797. #: guix-git/doc/guix-cookbook.texi:1360
  1798. msgid "Connecting to a Wireguard VPN."
  1799. msgstr ""
  1800. #. type: section
  1801. #: guix-git/doc/guix-cookbook.texi:1360 guix-git/doc/guix-cookbook.texi:1933
  1802. #: guix-git/doc/guix-cookbook.texi:1934
  1803. #, no-wrap
  1804. msgid "Customizing a Window Manager"
  1805. msgstr ""
  1806. #. type: menuentry
  1807. #: guix-git/doc/guix-cookbook.texi:1360
  1808. msgid "Handle customization of a Window manager on Guix System."
  1809. msgstr ""
  1810. #. type: section
  1811. #: guix-git/doc/guix-cookbook.texi:1360 guix-git/doc/guix-cookbook.texi:2024
  1812. #: guix-git/doc/guix-cookbook.texi:2025
  1813. #, no-wrap
  1814. msgid "Running Guix on a Linode Server"
  1815. msgstr ""
  1816. #. type: section
  1817. #: guix-git/doc/guix-cookbook.texi:1360 guix-git/doc/guix-cookbook.texi:2267
  1818. #: guix-git/doc/guix-cookbook.texi:2268
  1819. #, no-wrap
  1820. msgid "Setting up a bind mount"
  1821. msgstr ""
  1822. #. type: menuentry
  1823. #: guix-git/doc/guix-cookbook.texi:1360
  1824. msgid "Setting up a bind mount in the file-systems definition."
  1825. msgstr ""
  1826. #. type: section
  1827. #: guix-git/doc/guix-cookbook.texi:1360 guix-git/doc/guix-cookbook.texi:2316
  1828. #: guix-git/doc/guix-cookbook.texi:2317
  1829. #, no-wrap
  1830. msgid "Getting substitutes from Tor"
  1831. msgstr ""
  1832. #. type: menuentry
  1833. #: guix-git/doc/guix-cookbook.texi:1360
  1834. msgid "Configuring Guix daemon to get substitutes through Tor."
  1835. msgstr ""
  1836. #. type: section
  1837. #: guix-git/doc/guix-cookbook.texi:1360 guix-git/doc/guix-cookbook.texi:2378
  1838. #: guix-git/doc/guix-cookbook.texi:2379
  1839. #, no-wrap
  1840. msgid "Setting up NGINX with Lua"
  1841. msgstr ""
  1842. #. type: menuentry
  1843. #: guix-git/doc/guix-cookbook.texi:1360
  1844. msgid "Configuring NGINX web-server to load Lua modules."
  1845. msgstr ""
  1846. #. type: Plain text
  1847. #: guix-git/doc/guix-cookbook.texi:1372
  1848. msgid "While the Guix manual explains auto-login one user to @emph{all} TTYs ( @pxref{auto-login to TTY,,, guix, GNU Guix Reference Manual}), some might prefer a situation, in which one user is logged into one TTY with the other TTYs either configured to login different users or no one at all. Note that one can auto-login one user to any TTY, but it is usually advisable to avoid @code{tty1}, which, by default, is used to log warnings and errors."
  1849. msgstr ""
  1850. #. type: Plain text
  1851. #: guix-git/doc/guix-cookbook.texi:1374
  1852. msgid "Here is how one might set up auto login for one user to one tty:"
  1853. msgstr ""
  1854. #. type: lisp
  1855. #: guix-git/doc/guix-cookbook.texi:1382
  1856. #, no-wrap
  1857. msgid ""
  1858. "(define (auto-login-to-tty config tty user)\n"
  1859. " (if (string=? tty (mingetty-configuration-tty config))\n"
  1860. " (mingetty-configuration\n"
  1861. " (inherit config)\n"
  1862. " (auto-login user))\n"
  1863. " config))\n"
  1864. "\n"
  1865. msgstr ""
  1866. #. type: lisp
  1867. #: guix-git/doc/guix-cookbook.texi:1389
  1868. #, no-wrap
  1869. msgid ""
  1870. "(define %my-services\n"
  1871. " (modify-services %base-services\n"
  1872. " ;; @dots{}\n"
  1873. " (mingetty-service-type config =>\n"
  1874. " (auto-login-to-tty\n"
  1875. " config \"tty3\" \"alice\"))))\n"
  1876. "\n"
  1877. msgstr ""
  1878. #. type: lisp
  1879. #: guix-git/doc/guix-cookbook.texi:1393
  1880. #, no-wrap
  1881. msgid ""
  1882. "(operating-system\n"
  1883. " ;; @dots{}\n"
  1884. " (services %my-services))\n"
  1885. msgstr ""
  1886. #. type: Plain text
  1887. #: guix-git/doc/guix-cookbook.texi:1398
  1888. msgid "One could also @code{compose} (@pxref{Higher-Order Functions,,, guile, The Guile Reference Manual}) @code{auto-login-to-tty} to login multiple users to multiple ttys."
  1889. msgstr ""
  1890. #. type: Plain text
  1891. #: guix-git/doc/guix-cookbook.texi:1405
  1892. msgid "Finally, here is a note of caution. Setting up auto login to a TTY, means that anyone can turn on your computer and run commands as your regular user. However, if you have an encrypted root partition, and thus already need to enter a passphrase when the system boots, auto-login might be a convenient option."
  1893. msgstr ""
  1894. #. type: Plain text
  1895. #: guix-git/doc/guix-cookbook.texi:1417
  1896. msgid "Guix is, at its core, a source based distribution with substitutes (@pxref{Substitutes,,, guix, GNU Guix Reference Manual}), and as such building packages from their source code is an expected part of regular package installations and upgrades. Given this starting point, it makes sense that efforts are made to reduce the amount of time spent compiling packages, and recent changes and upgrades to the building and distribution of substitutes continues to be a topic of discussion within Guix."
  1897. msgstr ""
  1898. #. type: Plain text
  1899. #: guix-git/doc/guix-cookbook.texi:1423
  1900. msgid "The kernel, while not requiring an overabundance of RAM to build, does take a rather long time on an average machine. The official kernel configuration, as is the case with many GNU/Linux distributions, errs on the side of inclusiveness, and this is really what causes the build to take such a long time when the kernel is built from source."
  1901. msgstr ""
  1902. #. type: Plain text
  1903. #: guix-git/doc/guix-cookbook.texi:1428
  1904. msgid "The Linux kernel, however, can also just be described as a regular old package, and as such can be customized just like any other package. The procedure is a little bit different, although this is primarily due to the nature of how the package definition is written."
  1905. msgstr ""
  1906. #. type: Plain text
  1907. #: guix-git/doc/guix-cookbook.texi:1431
  1908. msgid "The @code{linux-libre} kernel package definition is actually a procedure which creates a package."
  1909. msgstr ""
  1910. #. type: lisp
  1911. #: guix-git/doc/guix-cookbook.texi:1442
  1912. #, no-wrap
  1913. msgid ""
  1914. "(define* (make-linux-libre* version gnu-revision source supported-systems\n"
  1915. " #:key\n"
  1916. " (extra-version #f)\n"
  1917. " ;; A function that takes an arch and a variant.\n"
  1918. " ;; See kernel-config for an example.\n"
  1919. " (configuration-file #f)\n"
  1920. " (defconfig \"defconfig\")\n"
  1921. " (extra-options %default-extra-linux-options))\n"
  1922. " ...)\n"
  1923. msgstr ""
  1924. #. type: Plain text
  1925. #: guix-git/doc/guix-cookbook.texi:1446
  1926. msgid "The current @code{linux-libre} package is for the 5.15.x series, and is declared like this:"
  1927. msgstr ""
  1928. #. type: lisp
  1929. #: guix-git/doc/guix-cookbook.texi:1454
  1930. #, no-wrap
  1931. msgid ""
  1932. "(define-public linux-libre-5.15\n"
  1933. " (make-linux-libre* linux-libre-5.15-version\n"
  1934. " linux-libre-5.15-gnu-revision\n"
  1935. " linux-libre-5.15-source\n"
  1936. " '(\"x86_64-linux\" \"i686-linux\" \"armhf-linux\" \"aarch64-linux\" \"riscv64-linux\")\n"
  1937. " #:configuration-file kernel-config))\n"
  1938. msgstr ""
  1939. #. type: Plain text
  1940. #: guix-git/doc/guix-cookbook.texi:1461
  1941. msgid "Any keys which are not assigned values inherit their default value from the @code{make-linux-libre} definition. When comparing the two snippets above, notice the code comment that refers to @code{#:configuration-file}. Because of this, it is not actually easy to include a custom kernel configuration from the definition, but don't worry, there are other ways to work with what we do have."
  1942. msgstr ""
  1943. #. type: Plain text
  1944. #: guix-git/doc/guix-cookbook.texi:1467
  1945. msgid "There are two ways to create a kernel with a custom kernel configuration. The first is to provide a standard @file{.config} file during the build process by including an actual @file{.config} file as a native input to our custom kernel. The following is a snippet from the custom @code{'configure} phase of the @code{make-linux-libre} package definition:"
  1946. msgstr ""
  1947. #. type: lisp
  1948. #: guix-git/doc/guix-cookbook.texi:1471
  1949. #, no-wrap
  1950. msgid ""
  1951. "(let ((build (assoc-ref %standard-phases 'build))\n"
  1952. " (config (assoc-ref (or native-inputs inputs) \"kconfig\")))\n"
  1953. "\n"
  1954. msgstr ""
  1955. #. type: lisp
  1956. #: guix-git/doc/guix-cookbook.texi:1479
  1957. #, no-wrap
  1958. msgid ""
  1959. " ;; Use a custom kernel configuration file or a default\n"
  1960. " ;; configuration file.\n"
  1961. " (if config\n"
  1962. " (begin\n"
  1963. " (copy-file config \".config\")\n"
  1964. " (chmod \".config\" #o666))\n"
  1965. " (invoke \"make\" ,defconfig)))\n"
  1966. msgstr ""
  1967. #. type: Plain text
  1968. #: guix-git/doc/guix-cookbook.texi:1484
  1969. msgid "Below is a sample kernel package. The @code{linux-libre} package is nothing special and can be inherited from and have its fields overridden like any other package:"
  1970. msgstr ""
  1971. #. type: lisp
  1972. #: guix-git/doc/guix-cookbook.texi:1493
  1973. #, no-wrap
  1974. msgid ""
  1975. "(define-public linux-libre/E2140\n"
  1976. " (package\n"
  1977. " (inherit linux-libre)\n"
  1978. " (native-inputs\n"
  1979. " `((\"kconfig\" ,(local-file \"E2140.config\"))\n"
  1980. " ,@@(alist-delete \"kconfig\"\n"
  1981. " (package-native-inputs linux-libre))))))\n"
  1982. msgstr ""
  1983. #. type: Plain text
  1984. #: guix-git/doc/guix-cookbook.texi:1500
  1985. msgid "In the same directory as the file defining @code{linux-libre-E2140} is a file named @file{E2140.config}, which is an actual kernel configuration file. The @code{defconfig} keyword of @code{make-linux-libre} is left blank here, so the only kernel configuration in the package is the one which was included in the @code{native-inputs} field."
  1986. msgstr ""
  1987. #. type: Plain text
  1988. #: guix-git/doc/guix-cookbook.texi:1505
  1989. msgid "The second way to create a custom kernel is to pass a new value to the @code{extra-options} keyword of the @code{make-linux-libre} procedure. The @code{extra-options} keyword works with another function defined right below it:"
  1990. msgstr ""
  1991. #. type: lisp
  1992. #: guix-git/doc/guix-cookbook.texi:1521
  1993. #, no-wrap
  1994. msgid ""
  1995. "(define %default-extra-linux-options\n"
  1996. " `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html\n"
  1997. " (\"CONFIG_DEVPTS_MULTIPLE_INSTANCES\" . #true)\n"
  1998. " ;; Modules required for initrd:\n"
  1999. " (\"CONFIG_NET_9P\" . m)\n"
  2000. " (\"CONFIG_NET_9P_VIRTIO\" . m)\n"
  2001. " (\"CONFIG_VIRTIO_BLK\" . m)\n"
  2002. " (\"CONFIG_VIRTIO_NET\" . m)\n"
  2003. " (\"CONFIG_VIRTIO_PCI\" . m)\n"
  2004. " (\"CONFIG_VIRTIO_BALLOON\" . m)\n"
  2005. " (\"CONFIG_VIRTIO_MMIO\" . m)\n"
  2006. " (\"CONFIG_FUSE_FS\" . m)\n"
  2007. " (\"CONFIG_CIFS\" . m)\n"
  2008. " (\"CONFIG_9P_FS\" . m)))\n"
  2009. "\n"
  2010. msgstr ""
  2011. #. type: lisp
  2012. #: guix-git/doc/guix-cookbook.texi:1532
  2013. #, no-wrap
  2014. msgid ""
  2015. "(define (config->string options)\n"
  2016. " (string-join (map (match-lambda\n"
  2017. " ((option . 'm)\n"
  2018. " (string-append option \"=m\"))\n"
  2019. " ((option . #true)\n"
  2020. " (string-append option \"=y\"))\n"
  2021. " ((option . #false)\n"
  2022. " (string-append option \"=n\")))\n"
  2023. " options)\n"
  2024. " \"\\n\"))\n"
  2025. msgstr ""
  2026. #. type: Plain text
  2027. #: guix-git/doc/guix-cookbook.texi:1535
  2028. msgid "And in the custom configure script from the `make-linux-libre` package:"
  2029. msgstr ""
  2030. #. type: lisp
  2031. #: guix-git/doc/guix-cookbook.texi:1543
  2032. #, no-wrap
  2033. msgid ""
  2034. ";; Appending works even when the option wasn't in the\n"
  2035. ";; file. The last one prevails if duplicated.\n"
  2036. "(let ((port (open-file \".config\" \"a\"))\n"
  2037. " (extra-configuration ,(config->string extra-options)))\n"
  2038. " (display extra-configuration port)\n"
  2039. " (close-port port))\n"
  2040. "\n"
  2041. msgstr ""
  2042. #. type: lisp
  2043. #: guix-git/doc/guix-cookbook.texi:1545
  2044. #, no-wrap
  2045. msgid "(invoke \"make\" \"oldconfig\")\n"
  2046. msgstr ""
  2047. #. type: Plain text
  2048. #: guix-git/doc/guix-cookbook.texi:1550
  2049. msgid "So by not providing a configuration-file the @file{.config} starts blank, and then we write into it the collection of flags that we want. Here's another custom kernel:"
  2050. msgstr ""
  2051. #. type: lisp
  2052. #: guix-git/doc/guix-cookbook.texi:1558
  2053. #, no-wrap
  2054. msgid ""
  2055. "(define %macbook41-full-config\n"
  2056. " (append %macbook41-config-options\n"
  2057. " %file-systems\n"
  2058. " %efi-support\n"
  2059. " %emulation\n"
  2060. " (@@@@ (gnu packages linux) %default-extra-linux-options)))\n"
  2061. "\n"
  2062. msgstr ""
  2063. #. type: lisp
  2064. #: guix-git/doc/guix-cookbook.texi:1569
  2065. #, no-wrap
  2066. msgid ""
  2067. "(define-public linux-libre-macbook41\n"
  2068. " ;; XXX: Access the internal 'make-linux-libre*' procedure, which is\n"
  2069. " ;; private and unexported, and is liable to change in the future.\n"
  2070. " ((@@@@ (gnu packages linux) make-linux-libre*)\n"
  2071. " (@@@@ (gnu packages linux) linux-libre-version)\n"
  2072. " (@@@@ (gnu packages linux) linux-libre-gnu-revision)\n"
  2073. " (@@@@ (gnu packages linux) linux-libre-source)\n"
  2074. " '(\"x86_64-linux\")\n"
  2075. " #:extra-version \"macbook41\"\n"
  2076. " #:extra-options %macbook41-config-options))\n"
  2077. msgstr ""
  2078. #. type: Plain text
  2079. #: guix-git/doc/guix-cookbook.texi:1576
  2080. msgid "In the above example @code{%file-systems} is a collection of flags enabling different file system support, @code{%efi-support} enables EFI support and @code{%emulation} enables a x86_64-linux machine to act in 32-bit mode also. @code{%default-extra-linux-options} are the ones quoted above, which had to be added in since they were replaced in the @code{extra-options} keyword."
  2081. msgstr ""
  2082. #. type: Plain text
  2083. #: guix-git/doc/guix-cookbook.texi:1585
  2084. msgid "This all sounds like it should be doable, but how does one even know which modules are required for a particular system? Two places that can be helpful in trying to answer this question is the @uref{https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel, Gentoo Handbook} and the @uref{https://www.kernel.org/doc/html/latest/admin-guide/README.html?highlight=localmodconfig, documentation from the kernel itself}. From the kernel documentation, it seems that @code{make localmodconfig} is the command we want."
  2085. msgstr ""
  2086. #. type: Plain text
  2087. #: guix-git/doc/guix-cookbook.texi:1588
  2088. msgid "In order to actually run @code{make localmodconfig} we first need to get and unpack the kernel source code:"
  2089. msgstr ""
  2090. #. type: example
  2091. #: guix-git/doc/guix-cookbook.texi:1591
  2092. #, no-wrap
  2093. msgid "tar xf $(guix build linux-libre --source)\n"
  2094. msgstr ""
  2095. #. type: Plain text
  2096. #: guix-git/doc/guix-cookbook.texi:1598
  2097. msgid "Once inside the directory containing the source code run @code{touch .config} to create an initial, empty @file{.config} to start with. @code{make localmodconfig} works by seeing what you already have in @file{.config} and letting you know what you're missing. If the file is blank then you're missing everything. The next step is to run:"
  2098. msgstr ""
  2099. #. type: example
  2100. #: guix-git/doc/guix-cookbook.texi:1601
  2101. #, no-wrap
  2102. msgid "guix environment linux-libre -- make localmodconfig\n"
  2103. msgstr ""
  2104. #. type: Plain text
  2105. #: guix-git/doc/guix-cookbook.texi:1606
  2106. msgid "and note the output. Do note that the @file{.config} file is still empty. The output generally contains two types of warnings. The first start with \"WARNING\" and can actually be ignored in our case. The second read:"
  2107. msgstr ""
  2108. #. type: example
  2109. #: guix-git/doc/guix-cookbook.texi:1609
  2110. #, no-wrap
  2111. msgid "module pcspkr did not have configs CONFIG_INPUT_PCSPKR\n"
  2112. msgstr ""
  2113. #. type: Plain text
  2114. #: guix-git/doc/guix-cookbook.texi:1614
  2115. msgid "For each of these lines, copy the @code{CONFIG_XXXX_XXXX} portion into the @file{.config} in the directory, and append @code{=m}, so in the end it looks like this:"
  2116. msgstr ""
  2117. #. type: example
  2118. #: guix-git/doc/guix-cookbook.texi:1618
  2119. #, no-wrap
  2120. msgid ""
  2121. "CONFIG_INPUT_PCSPKR=m\n"
  2122. "CONFIG_VIRTIO=m\n"
  2123. msgstr ""
  2124. #. type: Plain text
  2125. #: guix-git/doc/guix-cookbook.texi:1627
  2126. msgid "After copying all the configuration options, run @code{make localmodconfig} again to make sure that you don't have any output starting with ``module''. After all of these machine specific modules there are a couple more left that are also needed. @code{CONFIG_MODULES} is necessary so that you can build and load modules separately and not have everything built into the kernel. @code{CONFIG_BLK_DEV_SD} is required for reading from hard drives. It is possible that there are other modules which you will need."
  2127. msgstr ""
  2128. #. type: Plain text
  2129. #: guix-git/doc/guix-cookbook.texi:1631
  2130. msgid "This post does not aim to be a guide to configuring your own kernel however, so if you do decide to build a custom kernel you'll have to seek out other guides to create a kernel which is just right for your needs."
  2131. msgstr ""
  2132. #. type: Plain text
  2133. #: guix-git/doc/guix-cookbook.texi:1639
  2134. msgid "The second way to setup the kernel configuration makes more use of Guix's features and allows you to share configuration segments between different kernels. For example, all machines using EFI to boot have a number of EFI configuration flags that they need. It is likely that all the kernels will share a list of file systems to support. By using variables it is easier to see at a glance what features are enabled and to make sure you don't have features in one kernel but missing in another."
  2135. msgstr ""
  2136. #. type: Plain text
  2137. #: guix-git/doc/guix-cookbook.texi:1644
  2138. msgid "Left undiscussed however, is Guix's initrd and its customization. It is likely that you'll need to modify the initrd on a machine using a custom kernel, since certain modules which are expected to be built may not be available for inclusion into the initrd."
  2139. msgstr ""
  2140. #. type: Plain text
  2141. #: guix-git/doc/guix-cookbook.texi:1651
  2142. msgid "Historically, Guix System is centered around an @code{operating-system} structure. This structure contains various fields ranging from the bootloader and kernel declaration to the services to install."
  2143. msgstr ""
  2144. #. type: Plain text
  2145. #: guix-git/doc/guix-cookbook.texi:1657
  2146. msgid "Depending on the target machine, that can go from a standard @code{x86_64} machine to a small ARM single board computer such as the Pine64, the image constraints can vary a lot. The hardware manufacturers will impose different image formats with various partition sizes and offsets."
  2147. msgstr ""
  2148. #. type: Plain text
  2149. #: guix-git/doc/guix-cookbook.texi:1662
  2150. msgid "To create images suitable for all those machines, a new abstraction is necessary: that's the goal of the @code{image} record. This record contains all the required information to be transformed into a standalone image, that can be directly booted on any target machine."
  2151. msgstr ""
  2152. #. type: lisp
  2153. #: guix-git/doc/guix-cookbook.texi:1684
  2154. #, no-wrap
  2155. msgid ""
  2156. "(define-record-type* <image>\n"
  2157. " image make-image\n"
  2158. " image?\n"
  2159. " (name image-name ;symbol\n"
  2160. " (default #f))\n"
  2161. " (format image-format) ;symbol\n"
  2162. " (target image-target\n"
  2163. " (default #f))\n"
  2164. " (size image-size ;size in bytes as integer\n"
  2165. " (default 'guess))\n"
  2166. " (operating-system image-operating-system ;<operating-system>\n"
  2167. " (default #f))\n"
  2168. " (partitions image-partitions ;list of <partition>\n"
  2169. " (default '()))\n"
  2170. " (compression? image-compression? ;boolean\n"
  2171. " (default #t))\n"
  2172. " (volatile-root? image-volatile-root? ;boolean\n"
  2173. " (default #t))\n"
  2174. " (substitutable? image-substitutable? ;boolean\n"
  2175. " (default #t)))\n"
  2176. msgstr ""
  2177. #. type: Plain text
  2178. #: guix-git/doc/guix-cookbook.texi:1690
  2179. msgid "This record contains the operating-system to instantiate. The @code{format} field defines the image type and can be @code{efi-raw}, @code{qcow2} or @code{iso9660} for instance. In the future, it could be extended to @code{docker} or other image types."
  2180. msgstr ""
  2181. #. type: Plain text
  2182. #: guix-git/doc/guix-cookbook.texi:1693
  2183. msgid "A new directory in the Guix sources is dedicated to images definition. For now there are four files:"
  2184. msgstr ""
  2185. #. type: file{#1}
  2186. #: guix-git/doc/guix-cookbook.texi:1695
  2187. #, no-wrap
  2188. msgid "gnu/system/images/hurd.scm"
  2189. msgstr ""
  2190. #. type: file{#1}
  2191. #: guix-git/doc/guix-cookbook.texi:1696
  2192. #, no-wrap
  2193. msgid "gnu/system/images/pine64.scm"
  2194. msgstr ""
  2195. #. type: file{#1}
  2196. #: guix-git/doc/guix-cookbook.texi:1697
  2197. #, no-wrap
  2198. msgid "gnu/system/images/novena.scm"
  2199. msgstr ""
  2200. #. type: file{#1}
  2201. #: guix-git/doc/guix-cookbook.texi:1698
  2202. #, no-wrap
  2203. msgid "gnu/system/images/pinebook-pro.scm"
  2204. msgstr ""
  2205. #. type: Plain text
  2206. #: guix-git/doc/guix-cookbook.texi:1704
  2207. msgid "Let's have a look to @file{pine64.scm}. It contains the @code{pine64-barebones-os} variable which is a minimal definition of an operating-system dedicated to the @b{Pine A64 LTS} board."
  2208. msgstr ""
  2209. #. type: lisp
  2210. #: guix-git/doc/guix-cookbook.texi:1728
  2211. #, no-wrap
  2212. msgid ""
  2213. "(define pine64-barebones-os\n"
  2214. " (operating-system\n"
  2215. " (host-name \"vignemale\")\n"
  2216. " (timezone \"Europe/Paris\")\n"
  2217. " (locale \"en_US.utf8\")\n"
  2218. " (bootloader (bootloader-configuration\n"
  2219. " (bootloader u-boot-pine64-lts-bootloader)\n"
  2220. " (targets '(\"/dev/vda\"))))\n"
  2221. " (initrd-modules '())\n"
  2222. " (kernel linux-libre-arm64-generic)\n"
  2223. " (file-systems (cons (file-system\n"
  2224. " (device (file-system-label \"my-root\"))\n"
  2225. " (mount-point \"/\")\n"
  2226. " (type \"ext4\"))\n"
  2227. " %base-file-systems))\n"
  2228. " (services (cons (service agetty-service-type\n"
  2229. " (agetty-configuration\n"
  2230. " (extra-options '(\"-L\")) ; no carrier detect\n"
  2231. " (baud-rate \"115200\")\n"
  2232. " (term \"vt100\")\n"
  2233. " (tty \"ttyS0\")))\n"
  2234. " %base-services))))\n"
  2235. msgstr ""
  2236. #. type: Plain text
  2237. #: guix-git/doc/guix-cookbook.texi:1732
  2238. msgid "The @code{kernel} and @code{bootloader} fields are pointing to packages dedicated to this board."
  2239. msgstr ""
  2240. #. type: Plain text
  2241. #: guix-git/doc/guix-cookbook.texi:1734
  2242. msgid "Right below, the @code{pine64-image-type} variable is also defined."
  2243. msgstr ""
  2244. #. type: lisp
  2245. #: guix-git/doc/guix-cookbook.texi:1740
  2246. #, no-wrap
  2247. msgid ""
  2248. "(define pine64-image-type\n"
  2249. " (image-type\n"
  2250. " (name 'pine64-raw)\n"
  2251. " (constructor (cut image-with-os arm64-disk-image <>))))\n"
  2252. msgstr ""
  2253. #. type: Plain text
  2254. #: guix-git/doc/guix-cookbook.texi:1744
  2255. msgid "It's using a record we haven't talked about yet, the @code{image-type} record, defined this way:"
  2256. msgstr ""
  2257. #. type: lisp
  2258. #: guix-git/doc/guix-cookbook.texi:1751
  2259. #, no-wrap
  2260. msgid ""
  2261. "(define-record-type* <image-type>\n"
  2262. " image-type make-image-type\n"
  2263. " image-type?\n"
  2264. " (name image-type-name) ;symbol\n"
  2265. " (constructor image-type-constructor)) ;<operating-system> -> <image>\n"
  2266. msgstr ""
  2267. #. type: Plain text
  2268. #: guix-git/doc/guix-cookbook.texi:1757
  2269. msgid "The main purpose of this record is to associate a name to a procedure transforming an @code{operating-system} to an image. To understand why it is necessary, let's have a look to the command producing an image from an @code{operating-system} configuration file:"
  2270. msgstr ""
  2271. #. type: example
  2272. #: guix-git/doc/guix-cookbook.texi:1760
  2273. #, no-wrap
  2274. msgid "guix system image my-os.scm\n"
  2275. msgstr ""
  2276. #. type: Plain text
  2277. #: guix-git/doc/guix-cookbook.texi:1766
  2278. msgid "This command expects an @code{operating-system} configuration but how should we indicate that we want an image targeting a Pine64 board? We need to provide an extra information, the @code{image-type}, by passing the @code{--image-type} or @code{-t} flag, this way:"
  2279. msgstr ""
  2280. #. type: example
  2281. #: guix-git/doc/guix-cookbook.texi:1769
  2282. #, no-wrap
  2283. msgid "guix system image --image-type=pine64-raw my-os.scm\n"
  2284. msgstr ""
  2285. #. type: Plain text
  2286. #: guix-git/doc/guix-cookbook.texi:1775
  2287. msgid "This @code{image-type} parameter points to the @code{pine64-image-type} defined above. Hence, the @code{operating-system} declared in @code{my-os.scm} will be applied the @code{(cut image-with-os arm64-disk-image <>)} procedure to turn it into an image."
  2288. msgstr ""
  2289. #. type: Plain text
  2290. #: guix-git/doc/guix-cookbook.texi:1777
  2291. msgid "The resulting image looks like:"
  2292. msgstr ""
  2293. #. type: lisp
  2294. #: guix-git/doc/guix-cookbook.texi:1787
  2295. #, no-wrap
  2296. msgid ""
  2297. "(image\n"
  2298. " (format 'disk-image)\n"
  2299. " (target \"aarch64-linux-gnu\")\n"
  2300. " (operating-system my-os)\n"
  2301. " (partitions\n"
  2302. " (list (partition\n"
  2303. " (inherit root-partition)\n"
  2304. " (offset root-offset)))))\n"
  2305. msgstr ""
  2306. #. type: Plain text
  2307. #: guix-git/doc/guix-cookbook.texi:1791
  2308. msgid "which is the aggregation of the @code{operating-system} defined in @code{my-os.scm} to the @code{arm64-disk-image} record."
  2309. msgstr ""
  2310. #. type: Plain text
  2311. #: guix-git/doc/guix-cookbook.texi:1793
  2312. msgid "But enough Scheme madness. What does this image API bring to the Guix user?"
  2313. msgstr ""
  2314. #. type: Plain text
  2315. #: guix-git/doc/guix-cookbook.texi:1795
  2316. msgid "One can run:"
  2317. msgstr ""
  2318. #. type: example
  2319. #: guix-git/doc/guix-cookbook.texi:1799
  2320. #, no-wrap
  2321. msgid ""
  2322. "mathieu@@cervin:~$ guix system --list-image-types\n"
  2323. "The available image types are:\n"
  2324. "\n"
  2325. msgstr ""
  2326. #. type: example
  2327. #: guix-git/doc/guix-cookbook.texi:1811
  2328. #, no-wrap
  2329. msgid ""
  2330. " - pinebook-pro-raw\n"
  2331. " - pine64-raw\n"
  2332. " - novena-raw\n"
  2333. " - hurd-raw\n"
  2334. " - hurd-qcow2\n"
  2335. " - qcow2\n"
  2336. " - uncompressed-iso9660\n"
  2337. " - efi-raw\n"
  2338. " - arm64-raw\n"
  2339. " - arm32-raw\n"
  2340. " - iso9660\n"
  2341. msgstr ""
  2342. #. type: Plain text
  2343. #: guix-git/doc/guix-cookbook.texi:1816
  2344. msgid "and by writing an @code{operating-system} file based on @code{pine64-barebones-os}, you can customize your image to your preferences in a file (@file{my-pine-os.scm}) like this:"
  2345. msgstr ""
  2346. #. type: lisp
  2347. #: guix-git/doc/guix-cookbook.texi:1820
  2348. #, no-wrap
  2349. msgid ""
  2350. "(use-modules (gnu services linux)\n"
  2351. " (gnu system images pine64))\n"
  2352. "\n"
  2353. msgstr ""
  2354. #. type: lisp
  2355. #: guix-git/doc/guix-cookbook.texi:1831
  2356. #, no-wrap
  2357. msgid ""
  2358. "(let ((base-os pine64-barebones-os))\n"
  2359. " (operating-system\n"
  2360. " (inherit base-os)\n"
  2361. " (timezone \"America/Indiana/Indianapolis\")\n"
  2362. " (services\n"
  2363. " (cons\n"
  2364. " (service earlyoom-service-type\n"
  2365. " (earlyoom-configuration\n"
  2366. " (prefer-regexp \"icecat|chromium\")))\n"
  2367. " (operating-system-user-services base-os)))))\n"
  2368. msgstr ""
  2369. #. type: Plain text
  2370. #: guix-git/doc/guix-cookbook.texi:1834
  2371. msgid "run:"
  2372. msgstr ""
  2373. #. type: example
  2374. #: guix-git/doc/guix-cookbook.texi:1837
  2375. #, no-wrap
  2376. msgid "guix system image --image-type=pine64-raw my-pine-os.scm\n"
  2377. msgstr ""
  2378. #. type: Plain text
  2379. #: guix-git/doc/guix-cookbook.texi:1840
  2380. msgid "or,"
  2381. msgstr ""
  2382. #. type: example
  2383. #: guix-git/doc/guix-cookbook.texi:1843
  2384. #, no-wrap
  2385. msgid "guix system image --image-type=hurd-raw my-hurd-os.scm\n"
  2386. msgstr ""
  2387. #. type: Plain text
  2388. #: guix-git/doc/guix-cookbook.texi:1847
  2389. msgid "to get an image that can be written directly to a hard drive and booted from."
  2390. msgstr ""
  2391. #. type: Plain text
  2392. #: guix-git/doc/guix-cookbook.texi:1849
  2393. msgid "Without changing anything to @code{my-hurd-os.scm}, calling:"
  2394. msgstr ""
  2395. #. type: example
  2396. #: guix-git/doc/guix-cookbook.texi:1852
  2397. #, no-wrap
  2398. msgid "guix system image --image-type=hurd-qcow2 my-hurd-os.scm\n"
  2399. msgstr ""
  2400. #. type: Plain text
  2401. #: guix-git/doc/guix-cookbook.texi:1855
  2402. msgid "will instead produce a Hurd QEMU image."
  2403. msgstr ""
  2404. #. type: Plain text
  2405. #: guix-git/doc/guix-cookbook.texi:1862
  2406. msgid "To connect to a Wireguard VPN server you need the kernel module to be loaded in memory and a package providing networking tools that support it (e.g. @code{wireguard-tools} or @code{network-manager})."
  2407. msgstr ""
  2408. #. type: Plain text
  2409. #: guix-git/doc/guix-cookbook.texi:1866
  2410. msgid "Here is a configuration example for Linux-Libre < 5.6, where the module is out of tree and need to be loaded manually---following revisions of the kernel have it built-in and so don't need such configuration:"
  2411. msgstr ""
  2412. #. type: lisp
  2413. #: guix-git/doc/guix-cookbook.texi:1871
  2414. #, no-wrap
  2415. msgid ""
  2416. "(use-modules (gnu))\n"
  2417. "(use-service-modules desktop)\n"
  2418. "(use-package-modules vpn)\n"
  2419. "\n"
  2420. msgstr ""
  2421. #. type: lisp
  2422. #: guix-git/doc/guix-cookbook.texi:1880
  2423. #, no-wrap
  2424. msgid ""
  2425. "(operating-system\n"
  2426. " ;; …\n"
  2427. " (services (cons (simple-service 'wireguard-module\n"
  2428. " kernel-module-loader-service-type\n"
  2429. " '(\"wireguard\"))\n"
  2430. " %desktop-services))\n"
  2431. " (packages (cons wireguard-tools %base-packages))\n"
  2432. " (kernel-loadable-modules (list wireguard-linux-compat)))\n"
  2433. msgstr ""
  2434. #. type: Plain text
  2435. #: guix-git/doc/guix-cookbook.texi:1884
  2436. msgid "After reconfiguring and restarting your system you can either use Wireguard tools or NetworkManager to connect to a VPN server."
  2437. msgstr ""
  2438. #. type: subsection
  2439. #: guix-git/doc/guix-cookbook.texi:1885
  2440. #, no-wrap
  2441. msgid "Using Wireguard tools"
  2442. msgstr ""
  2443. #. type: Plain text
  2444. #: guix-git/doc/guix-cookbook.texi:1891
  2445. msgid "To test your Wireguard setup it is convenient to use @command{wg-quick}. Just give it a configuration file @command{wg-quick up ./wg0.conf}; or put that file in @file{/etc/wireguard} and run @command{wg-quick up wg0} instead."
  2446. msgstr ""
  2447. #. type: quotation
  2448. #: guix-git/doc/guix-cookbook.texi:1895
  2449. msgid "Be warned that the author described this command as a: “[…] very quick and dirty bash script […]”."
  2450. msgstr ""
  2451. #. type: subsection
  2452. #: guix-git/doc/guix-cookbook.texi:1897
  2453. #, no-wrap
  2454. msgid "Using NetworkManager"
  2455. msgstr ""
  2456. #. type: Plain text
  2457. #: guix-git/doc/guix-cookbook.texi:1905
  2458. msgid "Thanks to NetworkManager support for Wireguard we can connect to our VPN using @command{nmcli} command. Up to this point this guide assumes that you're using Network Manager service provided by @code{%desktop-services}. Ortherwise you need to adjust your services list to load @code{network-manager-service-type} and reconfigure your Guix system."
  2459. msgstr ""
  2460. #. type: Plain text
  2461. #: guix-git/doc/guix-cookbook.texi:1907
  2462. msgid "To import your VPN configuration execute nmcli import command:"
  2463. msgstr ""
  2464. #. type: example
  2465. #: guix-git/doc/guix-cookbook.texi:1911
  2466. #, no-wrap
  2467. msgid ""
  2468. "# nmcli connection import type wireguard file wg0.conf\n"
  2469. "Connection 'wg0' (edbee261-aa5a-42db-b032-6c7757c60fde) successfully added\n"
  2470. msgstr ""
  2471. #. type: Plain text
  2472. #: guix-git/doc/guix-cookbook.texi:1916
  2473. msgid "This will create a configuration file in @file{/etc/NetworkManager/wg0.nmconnection}. Next connect to the Wireguard server:"
  2474. msgstr ""
  2475. #. type: example
  2476. #: guix-git/doc/guix-cookbook.texi:1920
  2477. #, no-wrap
  2478. msgid ""
  2479. "$ nmcli connection up wg0\n"
  2480. "Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6)\n"
  2481. msgstr ""
  2482. #. type: Plain text
  2483. #: guix-git/doc/guix-cookbook.texi:1924
  2484. msgid "By default NetworkManager will connect automatically on system boot. To change that behaviour you need to edit your config:"
  2485. msgstr ""
  2486. #. type: example
  2487. #: guix-git/doc/guix-cookbook.texi:1927
  2488. #, no-wrap
  2489. msgid "# nmcli connection modify wg0 connection.autoconnect no\n"
  2490. msgstr ""
  2491. #. type: Plain text
  2492. #: guix-git/doc/guix-cookbook.texi:1932
  2493. msgid "For more specific information about NetworkManager and wireguard @uref{https://blogs.gnome.org/thaller/2019/03/15/wireguard-in-networkmanager/,see this post by thaller}."
  2494. msgstr ""
  2495. #. type: cindex
  2496. #: guix-git/doc/guix-cookbook.texi:1935
  2497. #, no-wrap
  2498. msgid "wm"
  2499. msgstr ""
  2500. #. type: subsection
  2501. #: guix-git/doc/guix-cookbook.texi:1937 guix-git/doc/guix-cookbook.texi:1938
  2502. #, no-wrap
  2503. msgid "StumpWM"
  2504. msgstr ""
  2505. #. type: cindex
  2506. #: guix-git/doc/guix-cookbook.texi:1939
  2507. #, no-wrap
  2508. msgid "stumpwm"
  2509. msgstr ""
  2510. #. type: Plain text
  2511. #: guix-git/doc/guix-cookbook.texi:1944
  2512. msgid "You could install StumpWM with a Guix system by adding @code{stumpwm} and optionally @code{`(,stumpwm \"lib\")} packages to a system configuration file, e.g.@: @file{/etc/config.scm}."
  2513. msgstr ""
  2514. #. type: Plain text
  2515. #: guix-git/doc/guix-cookbook.texi:1946
  2516. msgid "An example configuration can look like this:"
  2517. msgstr ""
  2518. #. type: lisp
  2519. #: guix-git/doc/guix-cookbook.texi:1950
  2520. #, no-wrap
  2521. msgid ""
  2522. "(use-modules (gnu))\n"
  2523. "(use-package-modules wm)\n"
  2524. "\n"
  2525. msgstr ""
  2526. #. type: lisp
  2527. #: guix-git/doc/guix-cookbook.texi:1955
  2528. #, no-wrap
  2529. msgid ""
  2530. "(operating-system\n"
  2531. " ;; …\n"
  2532. " (packages (append (list sbcl stumpwm `(,stumpwm \"lib\"))\n"
  2533. " %base-packages)))\n"
  2534. msgstr ""
  2535. #. type: cindex
  2536. #: guix-git/doc/guix-cookbook.texi:1957
  2537. #, no-wrap
  2538. msgid "stumpwm fonts"
  2539. msgstr ""
  2540. #. type: Plain text
  2541. #: guix-git/doc/guix-cookbook.texi:1961
  2542. msgid "By default StumpWM uses X11 fonts, which could be small or pixelated on your system. You could fix this by installing StumpWM contrib Lisp module @code{sbcl-ttf-fonts}, adding it to Guix system packages:"
  2543. msgstr ""
  2544. #. type: lisp
  2545. #: guix-git/doc/guix-cookbook.texi:1965
  2546. #, no-wrap
  2547. msgid ""
  2548. "(use-modules (gnu))\n"
  2549. "(use-package-modules fonts wm)\n"
  2550. "\n"
  2551. msgstr ""
  2552. #. type: lisp
  2553. #: guix-git/doc/guix-cookbook.texi:1970
  2554. #, no-wrap
  2555. msgid ""
  2556. "(operating-system\n"
  2557. " ;; …\n"
  2558. " (packages (append (list sbcl stumpwm `(,stumpwm \"lib\"))\n"
  2559. " sbcl-ttf-fonts font-dejavu %base-packages)))\n"
  2560. msgstr ""
  2561. #. type: Plain text
  2562. #: guix-git/doc/guix-cookbook.texi:1974
  2563. msgid "Then you need to add the following code to a StumpWM configuration file @file{~/.stumpwm.d/init.lisp}:"
  2564. msgstr ""
  2565. #. type: lisp
  2566. #: guix-git/doc/guix-cookbook.texi:1981
  2567. #, no-wrap
  2568. msgid ""
  2569. "(require :ttf-fonts)\n"
  2570. "(setf xft:*font-dirs* '(\"/run/current-system/profile/share/fonts/\"))\n"
  2571. "(setf clx-truetype:+font-cache-filename+ (concat (getenv \"HOME\") \"/.fonts/font-cache.sexp\"))\n"
  2572. "(xft:cache-fonts)\n"
  2573. "(set-font (make-instance 'xft:font :family \"DejaVu Sans Mono\" :subfamily \"Book\" :size 11))\n"
  2574. msgstr ""
  2575. #. type: subsection
  2576. #: guix-git/doc/guix-cookbook.texi:1983 guix-git/doc/guix-cookbook.texi:1984
  2577. #, no-wrap
  2578. msgid "Session lock"
  2579. msgstr ""
  2580. #. type: cindex
  2581. #: guix-git/doc/guix-cookbook.texi:1985
  2582. #, no-wrap
  2583. msgid "sessionlock"
  2584. msgstr ""
  2585. #. type: Plain text
  2586. #: guix-git/doc/guix-cookbook.texi:1991
  2587. msgid "Depending on your environment, locking the screen of your session might come built in or it might be something you have to set up yourself. If you use a desktop environment like GNOME or KDE, it's usually built in. If you use a plain window manager like StumpWM or EXWM, you might have to set it up yourself."
  2588. msgstr ""
  2589. #. type: subsubsection
  2590. #: guix-git/doc/guix-cookbook.texi:1992 guix-git/doc/guix-cookbook.texi:1993
  2591. #, no-wrap
  2592. msgid "Xorg"
  2593. msgstr ""
  2594. #. type: Plain text
  2595. #: guix-git/doc/guix-cookbook.texi:1999
  2596. msgid "If you use Xorg, you can use the utility @uref{https://www.mankier.com/1/xss-lock, xss-lock} to lock the screen of your session. xss-lock is triggered by DPMS which since Xorg 1.8 is auto-detected and enabled if ACPI is also enabled at kernel runtime."
  2597. msgstr ""
  2598. #. type: Plain text
  2599. #: guix-git/doc/guix-cookbook.texi:2002
  2600. msgid "To use xss-lock, you can simple execute it and put it into the background before you start your window manager from e.g. your @file{~/.xsession}:"
  2601. msgstr ""
  2602. #. type: example
  2603. #: guix-git/doc/guix-cookbook.texi:2006
  2604. #, no-wrap
  2605. msgid ""
  2606. "xss-lock -- slock &\n"
  2607. "exec stumpwm\n"
  2608. msgstr ""
  2609. #. type: Plain text
  2610. #: guix-git/doc/guix-cookbook.texi:2010
  2611. msgid "In this example, xss-lock uses @code{slock} to do the actual locking of the screen when it determines it's appropriate, like when you suspend your device."
  2612. msgstr ""
  2613. #. type: Plain text
  2614. #: guix-git/doc/guix-cookbook.texi:2014
  2615. msgid "For slock to be allowed to be a screen locker for the graphical session, it needs to be made setuid-root so it can authenticate users, and it needs a PAM service. This can be achieved by adding the following service to your @file{config.scm}:"
  2616. msgstr ""
  2617. #. type: lisp
  2618. #: guix-git/doc/guix-cookbook.texi:2017
  2619. #, no-wrap
  2620. msgid "(screen-locker-service slock)\n"
  2621. msgstr ""
  2622. #. type: Plain text
  2623. #: guix-git/doc/guix-cookbook.texi:2023
  2624. msgid "If you manually lock your screen, e.g. by directly calling slock when you want to lock your screen but not suspend it, it's a good idea to notify xss-lock about this so no confusion occurs. This can be done by executing @code{xset s activate} immediately before you execute slock."
  2625. msgstr ""
  2626. #. type: cindex
  2627. #: guix-git/doc/guix-cookbook.texi:2026
  2628. #, no-wrap
  2629. msgid "linode, Linode"
  2630. msgstr ""
  2631. #. type: Plain text
  2632. #: guix-git/doc/guix-cookbook.texi:2031
  2633. msgid "To run Guix on a server hosted by @uref{https://www.linode.com, Linode}, start with a recommended Debian server. We recommend using the default distro as a way to bootstrap Guix. Create your SSH keys."
  2634. msgstr ""
  2635. #. type: example
  2636. #: guix-git/doc/guix-cookbook.texi:2034
  2637. #, no-wrap
  2638. msgid "ssh-keygen\n"
  2639. msgstr ""
  2640. #. type: Plain text
  2641. #: guix-git/doc/guix-cookbook.texi:2040
  2642. msgid "Be sure to add your SSH key for easy login to the remote server. This is trivially done via Linode's graphical interface for adding SSH keys. Go to your profile and click add SSH Key. Copy into it the output of:"
  2643. msgstr ""
  2644. #. type: example
  2645. #: guix-git/doc/guix-cookbook.texi:2043
  2646. #, no-wrap
  2647. msgid "cat ~/.ssh/<username>_rsa.pub\n"
  2648. msgstr ""
  2649. #. type: Plain text
  2650. #: guix-git/doc/guix-cookbook.texi:2046
  2651. msgid "Power the Linode down."
  2652. msgstr ""
  2653. #. type: Plain text
  2654. #: guix-git/doc/guix-cookbook.texi:2050
  2655. msgid "In the Linode's Storage tab, resize the Debian disk to be smaller. 30 GB free space is recommended. Then click \"Add a disk\", and fill out the form with the following:"
  2656. msgstr ""
  2657. #. type: itemize
  2658. #: guix-git/doc/guix-cookbook.texi:2054
  2659. msgid "Label: \"Guix\""
  2660. msgstr ""
  2661. #. type: itemize
  2662. #: guix-git/doc/guix-cookbook.texi:2057
  2663. msgid "Filesystem: ext4"
  2664. msgstr ""
  2665. #. type: itemize
  2666. #: guix-git/doc/guix-cookbook.texi:2060
  2667. msgid "Set it to the remaining size"
  2668. msgstr ""
  2669. #. type: Plain text
  2670. #: guix-git/doc/guix-cookbook.texi:2065
  2671. msgid "In the Configurations tab, press \"Edit\" on the default Debian profile. Under \"Block Device Assignment\" click \"Add a Device\". It should be @file{/dev/sdc} and you can select the \"Guix\" disk. Save Changes."
  2672. msgstr ""
  2673. #. type: Plain text
  2674. #: guix-git/doc/guix-cookbook.texi:2067
  2675. msgid "Now \"Add a Configuration\", with the following:"
  2676. msgstr ""
  2677. #. type: itemize
  2678. #: guix-git/doc/guix-cookbook.texi:2070
  2679. msgid "Label: Guix"
  2680. msgstr ""
  2681. #. type: itemize
  2682. #: guix-git/doc/guix-cookbook.texi:2073
  2683. msgid "Kernel:GRUB 2 (it's at the bottom! This step is @b{IMPORTANT!})"
  2684. msgstr ""
  2685. #. type: itemize
  2686. #: guix-git/doc/guix-cookbook.texi:2076
  2687. msgid "Block device assignment:"
  2688. msgstr ""
  2689. #. type: itemize
  2690. #: guix-git/doc/guix-cookbook.texi:2079
  2691. msgid "@file{/dev/sda}: Guix"
  2692. msgstr ""
  2693. #. type: itemize
  2694. #: guix-git/doc/guix-cookbook.texi:2082
  2695. msgid "@file{/dev/sdb}: swap"
  2696. msgstr ""
  2697. #. type: itemize
  2698. #: guix-git/doc/guix-cookbook.texi:2085
  2699. msgid "Root device: @file{/dev/sda}"
  2700. msgstr ""
  2701. #. type: itemize
  2702. #: guix-git/doc/guix-cookbook.texi:2088
  2703. msgid "Turn off all the filesystem/boot helpers"
  2704. msgstr ""
  2705. #. type: Plain text
  2706. #: guix-git/doc/guix-cookbook.texi:2095
  2707. msgid "Now power it back up, booting with the Debian configuration. Once it's running, ssh to your server via @code{ssh root@@@var{<your-server-IP-here>}}. (You can find your server IP address in your Linode Summary section.) Now you can run the \"install guix from @pxref{Binary Installation,,, guix, GNU Guix}\" steps:"
  2708. msgstr ""
  2709. #. type: example
  2710. #: guix-git/doc/guix-cookbook.texi:2103
  2711. #, no-wrap
  2712. msgid ""
  2713. "sudo apt-get install gpg\n"
  2714. "wget https://sv.gnu.org/people/viewgpg.php?user_id=15145 -qO - | gpg --import -\n"
  2715. "wget https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh\n"
  2716. "chmod +x guix-install.sh\n"
  2717. "./guix-install.sh\n"
  2718. "guix pull\n"
  2719. msgstr ""
  2720. #. type: Plain text
  2721. #: guix-git/doc/guix-cookbook.texi:2107
  2722. msgid "Now it's time to write out a config for the server. The key information is below. Save the resulting file as @file{guix-config.scm}."
  2723. msgstr ""
  2724. #. type: lisp
  2725. #: guix-git/doc/guix-cookbook.texi:2118
  2726. #, no-wrap
  2727. msgid ""
  2728. "(use-modules (gnu)\n"
  2729. " (guix modules))\n"
  2730. "(use-service-modules networking\n"
  2731. " ssh)\n"
  2732. "(use-package-modules admin\n"
  2733. " certs\n"
  2734. " package-management\n"
  2735. " ssh\n"
  2736. " tls)\n"
  2737. "\n"
  2738. msgstr ""
  2739. #. type: lisp
  2740. #: guix-git/doc/guix-cookbook.texi:2135
  2741. #, no-wrap
  2742. msgid ""
  2743. "(operating-system\n"
  2744. " (host-name \"my-server\")\n"
  2745. " (timezone \"America/New_York\")\n"
  2746. " (locale \"en_US.UTF-8\")\n"
  2747. " ;; This goofy code will generate the grub.cfg\n"
  2748. " ;; without installing the grub bootloader on disk.\n"
  2749. " (bootloader (bootloader-configuration\n"
  2750. " (bootloader\n"
  2751. " (bootloader\n"
  2752. " (inherit grub-bootloader)\n"
  2753. " (installer #~(const #true))))))\n"
  2754. " (file-systems (cons (file-system\n"
  2755. " (device \"/dev/sda\")\n"
  2756. " (mount-point \"/\")\n"
  2757. " (type \"ext4\"))\n"
  2758. " %base-file-systems))\n"
  2759. "\n"
  2760. msgstr ""
  2761. #. type: lisp
  2762. #: guix-git/doc/guix-cookbook.texi:2138
  2763. #, no-wrap
  2764. msgid ""
  2765. " (swap-devices (list \"/dev/sdb\"))\n"
  2766. "\n"
  2767. msgstr ""
  2768. #. type: lisp
  2769. #: guix-git/doc/guix-cookbook.texi:2142
  2770. #, no-wrap
  2771. msgid ""
  2772. " (initrd-modules (cons \"virtio_scsi\" ; Needed to find the disk\n"
  2773. " %base-initrd-modules))\n"
  2774. "\n"
  2775. msgstr ""
  2776. #. type: lisp
  2777. #: guix-git/doc/guix-cookbook.texi:2151
  2778. #, no-wrap
  2779. msgid ""
  2780. " (users (cons (user-account\n"
  2781. " (name \"janedoe\")\n"
  2782. " (group \"users\")\n"
  2783. " ;; Adding the account to the \"wheel\" group\n"
  2784. " ;; makes it a sudoer.\n"
  2785. " (supplementary-groups '(\"wheel\"))\n"
  2786. " (home-directory \"/home/janedoe\"))\n"
  2787. " %base-user-accounts))\n"
  2788. "\n"
  2789. msgstr ""
  2790. #. type: lisp
  2791. #: guix-git/doc/guix-cookbook.texi:2155
  2792. #, no-wrap
  2793. msgid ""
  2794. " (packages (cons* nss-certs ;for HTTPS access\n"
  2795. " openssh-sans-x\n"
  2796. " %base-packages))\n"
  2797. "\n"
  2798. msgstr ""
  2799. #. type: lisp
  2800. #: guix-git/doc/guix-cookbook.texi:2166
  2801. #, no-wrap
  2802. msgid ""
  2803. " (services (cons*\n"
  2804. " (service dhcp-client-service-type)\n"
  2805. " (service openssh-service-type\n"
  2806. " (openssh-configuration\n"
  2807. " (openssh openssh-sans-x)\n"
  2808. " (password-authentication? #false)\n"
  2809. " (authorized-keys\n"
  2810. " `((\"janedoe\" ,(local-file \"janedoe_rsa.pub\"))\n"
  2811. " (\"root\" ,(local-file \"janedoe_rsa.pub\"))))))\n"
  2812. " %base-services)))\n"
  2813. msgstr ""
  2814. #. type: Plain text
  2815. #: guix-git/doc/guix-cookbook.texi:2169
  2816. msgid "Replace the following fields in the above configuration:"
  2817. msgstr ""
  2818. #. type: lisp
  2819. #: guix-git/doc/guix-cookbook.texi:2177
  2820. #, no-wrap
  2821. msgid ""
  2822. "(host-name \"my-server\") ; replace with your server name\n"
  2823. "; if you chose a linode server outside the U.S., then\n"
  2824. "; use tzselect to find a correct timezone string\n"
  2825. "(timezone \"America/New_York\") ; if needed replace timezone\n"
  2826. "(name \"janedoe\") ; replace with your username\n"
  2827. "(\"janedoe\" ,(local-file \"janedoe_rsa.pub\")) ; replace with your ssh key\n"
  2828. "(\"root\" ,(local-file \"janedoe_rsa.pub\")) ; replace with your ssh key\n"
  2829. msgstr ""
  2830. #. type: Plain text
  2831. #: guix-git/doc/guix-cookbook.texi:2184
  2832. msgid "The last line in the above example lets you log into the server as root and set the initial root password (see the note at the end of this recipe about root login). After you have done this, you may delete that line from your configuration and reconfigure to prevent root login."
  2833. msgstr ""
  2834. #. type: Plain text
  2835. #: guix-git/doc/guix-cookbook.texi:2189
  2836. msgid "Copy your ssh public key (eg: @file{~/.ssh/id_rsa.pub}) as @file{@var{<your-username-here>}_rsa.pub} and put @file{guix-config.scm} in the same directory. In a new terminal run these commands."
  2837. msgstr ""
  2838. #. type: example
  2839. #: guix-git/doc/guix-cookbook.texi:2194
  2840. #, no-wrap
  2841. msgid ""
  2842. "sftp root@@<remote server ip address>\n"
  2843. "put /path/to/files/<username>_rsa.pub .\n"
  2844. "put /path/to/files/guix-config.scm .\n"
  2845. msgstr ""
  2846. #. type: Plain text
  2847. #: guix-git/doc/guix-cookbook.texi:2197
  2848. msgid "In your first terminal, mount the guix drive:"
  2849. msgstr ""
  2850. #. type: example
  2851. #: guix-git/doc/guix-cookbook.texi:2201
  2852. #, no-wrap
  2853. msgid ""
  2854. "mkdir /mnt/guix\n"
  2855. "mount /dev/sdc /mnt/guix\n"
  2856. msgstr ""
  2857. #. type: Plain text
  2858. #: guix-git/doc/guix-cookbook.texi:2206
  2859. msgid "Due to the way we set up the bootloader section of the guix-config.scm, only the grub configuration file will be installed. So, we need to copy over some of the other GRUB stuff already installed on the Debian system:"
  2860. msgstr ""
  2861. #. type: example
  2862. #: guix-git/doc/guix-cookbook.texi:2210
  2863. #, no-wrap
  2864. msgid ""
  2865. "mkdir -p /mnt/guix/boot/grub\n"
  2866. "cp -r /boot/grub/* /mnt/guix/boot/grub/\n"
  2867. msgstr ""
  2868. #. type: Plain text
  2869. #: guix-git/doc/guix-cookbook.texi:2213
  2870. msgid "Now initialize the Guix installation:"
  2871. msgstr ""
  2872. #. type: example
  2873. #: guix-git/doc/guix-cookbook.texi:2216
  2874. #, no-wrap
  2875. msgid "guix system init guix-config.scm /mnt/guix\n"
  2876. msgstr ""
  2877. #. type: Plain text
  2878. #: guix-git/doc/guix-cookbook.texi:2220
  2879. msgid "Ok, power it down! Now from the Linode console, select boot and select \"Guix\"."
  2880. msgstr ""
  2881. #. type: Plain text
  2882. #: guix-git/doc/guix-cookbook.texi:2223
  2883. msgid "Once it boots, you should be able to log in via SSH! (The server config will have changed though.) You may encounter an error like:"
  2884. msgstr ""
  2885. #. type: example
  2886. #: guix-git/doc/guix-cookbook.texi:2239
  2887. #, no-wrap
  2888. msgid ""
  2889. "$ ssh root@@<server ip address>\n"
  2890. "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
  2891. "@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\n"
  2892. "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
  2893. "IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\n"
  2894. "Someone could be eavesdropping on you right now (man-in-the-middle attack)!\n"
  2895. "It is also possible that a host key has just been changed.\n"
  2896. "The fingerprint for the ECDSA key sent by the remote host is\n"
  2897. "SHA256:0B+wp33w57AnKQuHCvQP0+ZdKaqYrI/kyU7CfVbS7R4.\n"
  2898. "Please contact your system administrator.\n"
  2899. "Add correct host key in /home/joshua/.ssh/known_hosts to get rid of this message.\n"
  2900. "Offending ECDSA key in /home/joshua/.ssh/known_hosts:3\n"
  2901. "ECDSA host key for 198.58.98.76 has changed and you have requested strict checking.\n"
  2902. "Host key verification failed.\n"
  2903. msgstr ""
  2904. #. type: Plain text
  2905. #: guix-git/doc/guix-cookbook.texi:2243
  2906. msgid "Either delete @file{~/.ssh/known_hosts} file, or delete the offending line starting with your server IP address."
  2907. msgstr ""
  2908. #. type: Plain text
  2909. #: guix-git/doc/guix-cookbook.texi:2245
  2910. msgid "Be sure to set your password and root's password."
  2911. msgstr ""
  2912. #. type: example
  2913. #: guix-git/doc/guix-cookbook.texi:2250
  2914. #, no-wrap
  2915. msgid ""
  2916. "ssh root@@<remote ip address>\n"
  2917. "passwd ; for the root password\n"
  2918. "passwd <username> ; for the user password\n"
  2919. msgstr ""
  2920. #. type: Plain text
  2921. #: guix-git/doc/guix-cookbook.texi:2257
  2922. msgid "You may not be able to run the above commands at this point. If you have issues remotely logging into your linode box via SSH, then you may still need to set your root and user password initially by clicking on the ``Launch Console'' option in your linode. Choose the ``Glish'' instead of ``Weblish''. Now you should be able to ssh into the machine."
  2923. msgstr ""
  2924. #. type: Plain text
  2925. #: guix-git/doc/guix-cookbook.texi:2261
  2926. msgid "Hooray! At this point you can shut down the server, delete the Debian disk, and resize the Guix to the rest of the size. Congratulations!"
  2927. msgstr ""
  2928. #. type: Plain text
  2929. #: guix-git/doc/guix-cookbook.texi:2266
  2930. msgid "By the way, if you save it as a disk image right at this point, you'll have an easy time spinning up new Guix images! You may need to down-size the Guix image to 6144MB, to save it as an image. Then you can resize it again to the max size."
  2931. msgstr ""
  2932. #. type: Plain text
  2933. #: guix-git/doc/guix-cookbook.texi:2275
  2934. msgid "To bind mount a file system, one must first set up some definitions before the @code{operating-system} section of the system definition. In this example we will bind mount a folder from a spinning disk drive to @file{/tmp}, to save wear and tear on the primary SSD, without dedicating an entire partition to be mounted as @file{/tmp}."
  2935. msgstr ""
  2936. #. type: Plain text
  2937. #: guix-git/doc/guix-cookbook.texi:2278
  2938. msgid "First, the source drive that hosts the folder we wish to bind mount should be defined, so that the bind mount can depend on it."
  2939. msgstr ""
  2940. #. type: lisp
  2941. #: guix-git/doc/guix-cookbook.texi:2285
  2942. #, no-wrap
  2943. msgid ""
  2944. "(define source-drive ;; \"source-drive\" can be named anything you want.\n"
  2945. " (file-system\n"
  2946. " (device (uuid \"UUID goes here\"))\n"
  2947. " (mount-point \"/path-to-spinning-disk-goes-here\")\n"
  2948. " (type \"ext4\"))) ;; Make sure to set this to the appropriate type for your drive.\n"
  2949. msgstr ""
  2950. #. type: Plain text
  2951. #: guix-git/doc/guix-cookbook.texi:2289
  2952. msgid "The source folder must also be defined, so that guix will know it's not a regular block device, but a folder."
  2953. msgstr ""
  2954. #. type: lisp
  2955. #: guix-git/doc/guix-cookbook.texi:2291
  2956. #, no-wrap
  2957. msgid "(define (%source-directory) \"/path-to-spinning-disk-goes-here/tmp\") ;; \"source-directory\" can be named any valid variable name.\n"
  2958. msgstr ""
  2959. #. type: Plain text
  2960. #: guix-git/doc/guix-cookbook.texi:2295
  2961. msgid "Finally, inside the @code{file-systems} definition, we must add the mount itself."
  2962. msgstr ""
  2963. #. type: lisp
  2964. #: guix-git/doc/guix-cookbook.texi:2298
  2965. #, no-wrap
  2966. msgid ""
  2967. "(file-systems (cons*\n"
  2968. "\n"
  2969. msgstr ""
  2970. #. type: lisp
  2971. #: guix-git/doc/guix-cookbook.texi:2300
  2972. #, no-wrap
  2973. msgid ""
  2974. " ...<other drives omitted for clarity>...\n"
  2975. "\n"
  2976. msgstr ""
  2977. #. type: lisp
  2978. #: guix-git/doc/guix-cookbook.texi:2302
  2979. #, no-wrap
  2980. msgid ""
  2981. " source-drive ;; Must match the name you gave the source drive in the earlier definition.\n"
  2982. "\n"
  2983. msgstr ""
  2984. #. type: lisp
  2985. #: guix-git/doc/guix-cookbook.texi:2310
  2986. #, no-wrap
  2987. msgid ""
  2988. " (file-system\n"
  2989. " (device (%source-directory)) ;; Make sure \"source-directory\" matches your earlier definition.\n"
  2990. " (mount-point \"/tmp\")\n"
  2991. " (type \"none\") ;; We are mounting a folder, not a partition, so this type needs to be \"none\"\n"
  2992. " (flags '(bind-mount))\n"
  2993. " (dependencies (list source-drive)) ;; Ensure \"source-drive\" matches what you've named the variable for the drive.\n"
  2994. " )\n"
  2995. "\n"
  2996. msgstr ""
  2997. #. type: lisp
  2998. #: guix-git/doc/guix-cookbook.texi:2312
  2999. #, no-wrap
  3000. msgid ""
  3001. " ...<other drives omitted for clarity>...\n"
  3002. "\n"
  3003. msgstr ""
  3004. #. type: lisp
  3005. #: guix-git/doc/guix-cookbook.texi:2314
  3006. #, no-wrap
  3007. msgid " ))\n"
  3008. msgstr ""
  3009. #. type: Plain text
  3010. #: guix-git/doc/guix-cookbook.texi:2321
  3011. msgid "Guix daemon can use a HTTP proxy to get substitutes, here we are configuring it to get them via Tor."
  3012. msgstr ""
  3013. #. type: quotation
  3014. #: guix-git/doc/guix-cookbook.texi:2322
  3015. #, no-wrap
  3016. msgid "Warning"
  3017. msgstr ""
  3018. #. type: quotation
  3019. #: guix-git/doc/guix-cookbook.texi:2328
  3020. msgid "@emph{Not all} Guix daemon's traffic will go through Tor! Only HTTP/HTTPS will get proxied; FTP, Git protocol, SSH, etc connections will still go through the clearnet. Again, this configuration isn't foolproof some of your traffic won't get routed by Tor at all. Use it at your own risk."
  3021. msgstr ""
  3022. #. type: quotation
  3023. #: guix-git/doc/guix-cookbook.texi:2334
  3024. msgid "Also note that the procedure described here applies only to package substitution. When you update your guix distribution with @command{guix pull}, you still need to use @command{torsocks} if you want to route the connection to guix's git repository servers through Tor."
  3025. msgstr ""
  3026. #. type: Plain text
  3027. #: guix-git/doc/guix-cookbook.texi:2339
  3028. msgid "Guix's substitute server is available as a Onion service, if you want to use it to get your substitutes through Tor configure your system as follow:"
  3029. msgstr ""
  3030. #. type: lisp
  3031. #: guix-git/doc/guix-cookbook.texi:2343
  3032. #, no-wrap
  3033. msgid ""
  3034. "(use-modules (gnu))\n"
  3035. "(use-service-module base networking)\n"
  3036. "\n"
  3037. msgstr ""
  3038. #. type: lisp
  3039. #: guix-git/doc/guix-cookbook.texi:2359
  3040. #, no-wrap
  3041. msgid ""
  3042. "(operating-system\n"
  3043. " …\n"
  3044. " (services\n"
  3045. " (cons\n"
  3046. " (service tor-service-type\n"
  3047. " (tor-configuration\n"
  3048. " (config-file (plain-file \"tor-config\"\n"
  3049. " \"HTTPTunnelPort 127.0.0.1:9250\"))))\n"
  3050. " (modify-services %base-services\n"
  3051. " (guix-service-type\n"
  3052. " config => (guix-configuration\n"
  3053. " (inherit config)\n"
  3054. " ;; ci.guix.gnu.org's Onion service\n"
  3055. " (substitute-urls \"https://bp7o7ckwlewr4slm.onion\")\n"
  3056. " (http-proxy \"http://localhost:9250\")))))))\n"
  3057. msgstr ""
  3058. #. type: Plain text
  3059. #: guix-git/doc/guix-cookbook.texi:2368
  3060. msgid "This will keep a tor process running that provides a HTTP CONNECT tunnel which will be used by @command{guix-daemon}. The daemon can use other protocols than HTTP(S) to get remote resources, request using those protocols won't go through Tor since we are only setting a HTTP tunnel here. Note that @code{substitutes-urls} is using HTTPS and not HTTP or it won't work, that's a limitation of Tor's tunnel; you may want to use @command{privoxy} instead to avoid such limitations."
  3061. msgstr ""
  3062. #. type: Plain text
  3063. #: guix-git/doc/guix-cookbook.texi:2372
  3064. msgid "If you don't want to always get substitutes through Tor but using it just some of the times, then skip the @code{guix-configuration}. When you want to get a substitute from the Tor tunnel run:"
  3065. msgstr ""
  3066. #. type: example
  3067. #: guix-git/doc/guix-cookbook.texi:2376
  3068. #, no-wrap
  3069. msgid ""
  3070. "sudo herd set-http-proxy guix-daemon http://localhost:9250\n"
  3071. "guix build --substitute-urls=https://bp7o7ckwlewr4slm.onion …\n"
  3072. msgstr ""
  3073. #. type: cindex
  3074. #: guix-git/doc/guix-cookbook.texi:2380
  3075. #, no-wrap
  3076. msgid "nginx, lua, openresty, resty"
  3077. msgstr ""
  3078. #. type: Plain text
  3079. #: guix-git/doc/guix-cookbook.texi:2383
  3080. msgid "NGINX could be extended with Lua scripts."
  3081. msgstr ""
  3082. #. type: Plain text
  3083. #: guix-git/doc/guix-cookbook.texi:2386
  3084. msgid "Guix provides NGINX service with ability to load Lua module and specific Lua packages, and reply to requests by evaluating Lua scripts."
  3085. msgstr ""
  3086. #. type: Plain text
  3087. #: guix-git/doc/guix-cookbook.texi:2390
  3088. msgid "The following example demonstrates system definition with configuration to evaluate @file{index.lua} Lua script on HTTP request to @uref{http://localhost/hello} endpoint:"
  3089. msgstr ""
  3090. #. type: example
  3091. #: guix-git/doc/guix-cookbook.texi:2393
  3092. #, no-wrap
  3093. msgid ""
  3094. "local shell = require \"resty.shell\"\n"
  3095. "\n"
  3096. msgstr ""
  3097. #. type: example
  3098. #: guix-git/doc/guix-cookbook.texi:2397
  3099. #, no-wrap
  3100. msgid ""
  3101. "local stdin = \"\"\n"
  3102. "local timeout = 1000 -- ms\n"
  3103. "local max_size = 4096 -- byte\n"
  3104. "\n"
  3105. msgstr ""
  3106. #. type: example
  3107. #: guix-git/doc/guix-cookbook.texi:2400
  3108. #, no-wrap
  3109. msgid ""
  3110. "local ok, stdout, stderr, reason, status =\n"
  3111. " shell.run([[/run/current-system/profile/bin/ls /tmp]], stdin, timeout, max_size)\n"
  3112. "\n"
  3113. msgstr ""
  3114. #. type: example
  3115. #: guix-git/doc/guix-cookbook.texi:2402
  3116. #, no-wrap
  3117. msgid "ngx.say(stdout)\n"
  3118. msgstr ""
  3119. #. type: lisp
  3120. #: guix-git/doc/guix-cookbook.texi:2433
  3121. #, no-wrap
  3122. msgid ""
  3123. "(use-modules (gnu))\n"
  3124. "(use-service-modules #;… web)\n"
  3125. "(use-package-modules #;… lua)\n"
  3126. "(operating-system\n"
  3127. " ;; …\n"
  3128. " (services\n"
  3129. " ;; …\n"
  3130. " (service nginx-service-type\n"
  3131. " (nginx-configuration\n"
  3132. " (modules\n"
  3133. " (list\n"
  3134. " (file-append nginx-lua-module \"/etc/nginx/modules/ngx_http_lua_module.so\")))\n"
  3135. " (lua-package-path (list lua-resty-core\n"
  3136. " lua-resty-lrucache\n"
  3137. " lua-resty-signal\n"
  3138. " lua-tablepool\n"
  3139. " lua-resty-shell))\n"
  3140. " (lua-package-cpath (list lua-resty-signal))\n"
  3141. " (server-blocks\n"
  3142. " (list (nginx-server-configuration\n"
  3143. " (server-name '(\"localhost\"))\n"
  3144. " (listen '(\"80\"))\n"
  3145. " (root \"/etc\")\n"
  3146. " (locations (list\n"
  3147. " (nginx-location-configuration\n"
  3148. " (uri \"/hello\")\n"
  3149. " (body (list #~(format #f \"content_by_lua_file ~s;\"\n"
  3150. " #$(local-file \"index.lua\"))))))))))))))\n"
  3151. msgstr ""
  3152. #. type: Plain text
  3153. #: guix-git/doc/guix-cookbook.texi:2444
  3154. msgid "Guix is a functional package manager that offers many features beyond what more traditional package managers can do. To the uninitiated, those features might not have obvious use cases at first. The purpose of this chapter is to demonstrate some advanced package management concepts."
  3155. msgstr ""
  3156. #. type: Plain text
  3157. #: guix-git/doc/guix-cookbook.texi:2447
  3158. msgid "@pxref{Package Management,,, guix, GNU Guix Reference Manual} for a complete reference."
  3159. msgstr ""
  3160. #. type: section
  3161. #: guix-git/doc/guix-cookbook.texi:2450 guix-git/doc/guix-cookbook.texi:2452
  3162. #: guix-git/doc/guix-cookbook.texi:2453
  3163. #, no-wrap
  3164. msgid "Guix Profiles in Practice"
  3165. msgstr ""
  3166. #. type: menuentry
  3167. #: guix-git/doc/guix-cookbook.texi:2450
  3168. msgid "Strategies for multiple profiles and manifests."
  3169. msgstr ""
  3170. #. type: Plain text
  3171. #: guix-git/doc/guix-cookbook.texi:2458
  3172. msgid "Guix provides a very useful feature that may be quite foreign to newcomers: @emph{profiles}. They are a way to group package installations together and all users on the same system are free to use as many profiles as they want."
  3173. msgstr ""
  3174. #. type: Plain text
  3175. #: guix-git/doc/guix-cookbook.texi:2463
  3176. msgid "Whether you're a developer or not, you may find that multiple profiles bring you great power and flexibility. While they shift the paradigm somewhat compared to @emph{traditional package managers}, they are very convenient to use once you've understood how to set them up."
  3177. msgstr ""
  3178. #. type: Plain text
  3179. #: guix-git/doc/guix-cookbook.texi:2469
  3180. msgid "If you are familiar with Python's @samp{virtualenv}, you can think of a profile as a kind of universal @samp{virtualenv} that can hold any kind of software whatsoever, not just Python software. Furthermore, profiles are self-sufficient: they capture all the runtime dependencies which guarantees that all programs within a profile will always work at any point in time."
  3181. msgstr ""
  3182. #. type: Plain text
  3183. #: guix-git/doc/guix-cookbook.texi:2471
  3184. msgid "Multiple profiles have many benefits:"
  3185. msgstr ""
  3186. #. type: itemize
  3187. #: guix-git/doc/guix-cookbook.texi:2475
  3188. msgid "Clean semantic separation of the various packages a user needs for different contexts."
  3189. msgstr ""
  3190. #. type: itemize
  3191. #: guix-git/doc/guix-cookbook.texi:2479
  3192. msgid "Multiple profiles can be made available into the environment either on login or within a dedicated shell."
  3193. msgstr ""
  3194. #. type: itemize
  3195. #: guix-git/doc/guix-cookbook.texi:2483
  3196. msgid "Profiles can be loaded on demand. For instance, the user can use multiple shells, each of them running different profiles."
  3197. msgstr ""
  3198. #. type: itemize
  3199. #: guix-git/doc/guix-cookbook.texi:2488
  3200. msgid "Isolation: Programs from one profile will not use programs from the other, and the user can even install different versions of the same programs to the two profiles without conflict."
  3201. msgstr ""
  3202. #. type: itemize
  3203. #: guix-git/doc/guix-cookbook.texi:2492
  3204. msgid "Deduplication: Profiles share dependencies that happens to be the exact same. This makes multiple profiles storage-efficient."
  3205. msgstr ""
  3206. #. type: itemize
  3207. #: guix-git/doc/guix-cookbook.texi:2500
  3208. msgid "Reproducible: when used with declarative manifests, a profile can be fully specified by the Guix commit that was active when it was set up. This means that the exact same profile can be @uref{https://guix.gnu.org/blog/2018/multi-dimensional-transactions-and-rollbacks-oh-my/, set up anywhere and anytime}, with just the commit information. See the section on @ref{Reproducible profiles}."
  3209. msgstr ""
  3210. #. type: itemize
  3211. #: guix-git/doc/guix-cookbook.texi:2504
  3212. msgid "Easier upgrades and maintenance: Multiple profiles make it easy to keep package listings at hand and make upgrades completely frictionless."
  3213. msgstr ""
  3214. #. type: Plain text
  3215. #: guix-git/doc/guix-cookbook.texi:2507
  3216. msgid "Concretely, here follows some typical profiles:"
  3217. msgstr ""
  3218. #. type: itemize
  3219. #: guix-git/doc/guix-cookbook.texi:2511
  3220. msgid "The dependencies of a project you are working on."
  3221. msgstr ""
  3222. #. type: itemize
  3223. #: guix-git/doc/guix-cookbook.texi:2514
  3224. msgid "Your favourite programming language libraries."
  3225. msgstr ""
  3226. #. type: itemize
  3227. #: guix-git/doc/guix-cookbook.texi:2517
  3228. msgid "Laptop-specific programs (like @samp{powertop}) that you don't need on a desktop."
  3229. msgstr ""
  3230. #. type: itemize
  3231. #: guix-git/doc/guix-cookbook.texi:2521
  3232. msgid "@TeX{}live (this one can be really useful when you need to install just one package for this one document you've just received over email)."
  3233. msgstr ""
  3234. #. type: itemize
  3235. #: guix-git/doc/guix-cookbook.texi:2524
  3236. msgid "Games."
  3237. msgstr ""
  3238. #. type: Plain text
  3239. #: guix-git/doc/guix-cookbook.texi:2527
  3240. msgid "Let's dive in the set up!"
  3241. msgstr ""
  3242. #. type: subsection
  3243. #: guix-git/doc/guix-cookbook.texi:2528 guix-git/doc/guix-cookbook.texi:2529
  3244. #, no-wrap
  3245. msgid "Basic setup with manifests"
  3246. msgstr ""
  3247. #. type: Plain text
  3248. #: guix-git/doc/guix-cookbook.texi:2533
  3249. msgid "A Guix profile can be set up @emph{via} a so-called @emph{manifest specification} that looks like this:"
  3250. msgstr ""
  3251. #. type: lisp
  3252. #: guix-git/doc/guix-cookbook.texi:2543
  3253. #, no-wrap
  3254. msgid ""
  3255. "(specifications->manifest\n"
  3256. " '(\"package-1\"\n"
  3257. " ;; Version 1.3 of package-2.\n"
  3258. " \"package-2@@1.3\"\n"
  3259. " ;; The \"lib\" output of package-3.\n"
  3260. " \"package-3:lib\"\n"
  3261. " ; ...\n"
  3262. " \"package-N\"))\n"
  3263. msgstr ""
  3264. #. type: Plain text
  3265. #: guix-git/doc/guix-cookbook.texi:2547
  3266. msgid "@pxref{Invoking guix package,,, guix, GNU Guix Reference Manual}, for the syntax details."
  3267. msgstr ""
  3268. #. type: Plain text
  3269. #: guix-git/doc/guix-cookbook.texi:2549
  3270. msgid "We can create a manifest specification per profile and install them this way:"
  3271. msgstr ""
  3272. #. type: example
  3273. #: guix-git/doc/guix-cookbook.texi:2554
  3274. #, no-wrap
  3275. msgid ""
  3276. "GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles\n"
  3277. "mkdir -p \"$GUIX_EXTRA_PROFILES\"/my-project # if it does not exist yet\n"
  3278. "guix package --manifest=/path/to/guix-my-project-manifest.scm --profile=\"$GUIX_EXTRA_PROFILES\"/my-project/my-project\n"
  3279. msgstr ""
  3280. #. type: Plain text
  3281. #: guix-git/doc/guix-cookbook.texi:2558
  3282. msgid "Here we set an arbitrary variable @samp{GUIX_EXTRA_PROFILES} to point to the directory where we will store our profiles in the rest of this article."
  3283. msgstr ""
  3284. #. type: Plain text
  3285. #: guix-git/doc/guix-cookbook.texi:2564
  3286. msgid "Placing all your profiles in a single directory, with each profile getting its own sub-directory, is somewhat cleaner. This way, each sub-directory will contain all the symlinks for precisely one profile. Besides, ``looping over profiles'' becomes obvious from any programming language (e.g.@: a shell script) by simply looping over the sub-directories of @samp{$GUIX_EXTRA_PROFILES}."
  3287. msgstr ""
  3288. #. type: Plain text
  3289. #: guix-git/doc/guix-cookbook.texi:2566
  3290. msgid "Note that it's also possible to loop over the output of"
  3291. msgstr ""
  3292. #. type: example
  3293. #: guix-git/doc/guix-cookbook.texi:2569
  3294. #, no-wrap
  3295. msgid "guix package --list-profiles\n"
  3296. msgstr ""
  3297. #. type: Plain text
  3298. #: guix-git/doc/guix-cookbook.texi:2572
  3299. msgid "although you'll probably have to filter out @file{~/.config/guix/current}."
  3300. msgstr ""
  3301. #. type: Plain text
  3302. #: guix-git/doc/guix-cookbook.texi:2574
  3303. msgid "To enable all profiles on login, add this to your @file{~/.bash_profile} (or similar):"
  3304. msgstr ""
  3305. #. type: example
  3306. #: guix-git/doc/guix-cookbook.texi:2584
  3307. #, no-wrap
  3308. msgid ""
  3309. "for i in $GUIX_EXTRA_PROFILES/*; do\n"
  3310. " profile=$i/$(basename \"$i\")\n"
  3311. " if [ -f \"$profile\"/etc/profile ]; then\n"
  3312. " GUIX_PROFILE=\"$profile\"\n"
  3313. " . \"$GUIX_PROFILE\"/etc/profile\n"
  3314. " fi\n"
  3315. " unset profile\n"
  3316. "done\n"
  3317. msgstr ""
  3318. #. type: Plain text
  3319. #: guix-git/doc/guix-cookbook.texi:2589
  3320. msgid "Note to Guix System users: the above reflects how your default profile @file{~/.guix-profile} is activated from @file{/etc/profile}, that latter being loaded by @file{~/.bashrc} by default."
  3321. msgstr ""
  3322. #. type: Plain text
  3323. #: guix-git/doc/guix-cookbook.texi:2591
  3324. msgid "You can obviously choose to only enable a subset of them:"
  3325. msgstr ""
  3326. #. type: example
  3327. #: guix-git/doc/guix-cookbook.texi:2601
  3328. #, no-wrap
  3329. msgid ""
  3330. "for i in \"$GUIX_EXTRA_PROFILES\"/my-project-1 \"$GUIX_EXTRA_PROFILES\"/my-project-2; do\n"
  3331. " profile=$i/$(basename \"$i\")\n"
  3332. " if [ -f \"$profile\"/etc/profile ]; then\n"
  3333. " GUIX_PROFILE=\"$profile\"\n"
  3334. " . \"$GUIX_PROFILE\"/etc/profile\n"
  3335. " fi\n"
  3336. " unset profile\n"
  3337. "done\n"
  3338. msgstr ""
  3339. #. type: Plain text
  3340. #: guix-git/doc/guix-cookbook.texi:2605
  3341. msgid "When a profile is off, it's straightforward to enable it for an individual shell without \"polluting\" the rest of the user session:"
  3342. msgstr ""
  3343. #. type: example
  3344. #: guix-git/doc/guix-cookbook.texi:2608
  3345. #, no-wrap
  3346. msgid "GUIX_PROFILE=\"path/to/my-project\" ; . \"$GUIX_PROFILE\"/etc/profile\n"
  3347. msgstr ""
  3348. #. type: Plain text
  3349. #: guix-git/doc/guix-cookbook.texi:2615
  3350. msgid "The key to enabling a profile is to @emph{source} its @samp{etc/profile} file. This file contains shell code that exports the right environment variables necessary to activate the software contained in the profile. It is built automatically by Guix and meant to be sourced. It contains the same variables you would get if you ran:"
  3351. msgstr ""
  3352. #. type: example
  3353. #: guix-git/doc/guix-cookbook.texi:2618
  3354. #, no-wrap
  3355. msgid "guix package --search-paths=prefix --profile=$my_profile\"\n"
  3356. msgstr ""
  3357. #. type: Plain text
  3358. #: guix-git/doc/guix-cookbook.texi:2622
  3359. msgid "Once again, see (@pxref{Invoking guix package,,, guix, GNU Guix Reference Manual}) for the command line options."
  3360. msgstr ""
  3361. #. type: Plain text
  3362. #: guix-git/doc/guix-cookbook.texi:2624
  3363. msgid "To upgrade a profile, simply install the manifest again:"
  3364. msgstr ""
  3365. #. type: example
  3366. #: guix-git/doc/guix-cookbook.texi:2627
  3367. #, no-wrap
  3368. msgid "guix package -m /path/to/guix-my-project-manifest.scm -p \"$GUIX_EXTRA_PROFILES\"/my-project/my-project\n"
  3369. msgstr ""
  3370. #. type: Plain text
  3371. #: guix-git/doc/guix-cookbook.texi:2633
  3372. msgid "To upgrade all profiles, it's easy enough to loop over them. For instance, assuming your manifest specifications are stored in @file{~/.guix-manifests/guix-$profile-manifest.scm}, with @samp{$profile} being the name of the profile (e.g.@: \"project1\"), you could do the following in Bourne shell:"
  3373. msgstr ""
  3374. #. type: example
  3375. #: guix-git/doc/guix-cookbook.texi:2638
  3376. #, no-wrap
  3377. msgid ""
  3378. "for profile in \"$GUIX_EXTRA_PROFILES\"/*; do\n"
  3379. " guix package --profile=\"$profile\" --manifest=\"$HOME/.guix-manifests/guix-$profile-manifest.scm\"\n"
  3380. "done\n"
  3381. msgstr ""
  3382. #. type: Plain text
  3383. #: guix-git/doc/guix-cookbook.texi:2641
  3384. msgid "Each profile has its own generations:"
  3385. msgstr ""
  3386. #. type: example
  3387. #: guix-git/doc/guix-cookbook.texi:2644
  3388. #, no-wrap
  3389. msgid "guix package -p \"$GUIX_EXTRA_PROFILES\"/my-project/my-project --list-generations\n"
  3390. msgstr ""
  3391. #. type: Plain text
  3392. #: guix-git/doc/guix-cookbook.texi:2647
  3393. msgid "You can roll-back to any generation of a given profile:"
  3394. msgstr ""
  3395. #. type: example
  3396. #: guix-git/doc/guix-cookbook.texi:2650
  3397. #, no-wrap
  3398. msgid "guix package -p \"$GUIX_EXTRA_PROFILES\"/my-project/my-project --switch-generations=17\n"
  3399. msgstr ""
  3400. #. type: Plain text
  3401. #: guix-git/doc/guix-cookbook.texi:2654
  3402. msgid "Finally, if you want to switch to a profile without inheriting from the current environment, you can activate it from an empty shell:"
  3403. msgstr ""
  3404. #. type: example
  3405. #: guix-git/doc/guix-cookbook.texi:2658
  3406. #, no-wrap
  3407. msgid ""
  3408. "env -i $(which bash) --login --noprofile --norc\n"
  3409. ". my-project/etc/profile\n"
  3410. msgstr ""
  3411. #. type: subsection
  3412. #: guix-git/doc/guix-cookbook.texi:2660 guix-git/doc/guix-cookbook.texi:2661
  3413. #, no-wrap
  3414. msgid "Required packages"
  3415. msgstr ""
  3416. #. type: Plain text
  3417. #: guix-git/doc/guix-cookbook.texi:2666
  3418. msgid "Activating a profile essentially boils down to exporting a bunch of environmental variables. This is the role of the @samp{etc/profile} within the profile."
  3419. msgstr ""
  3420. #. type: emph{#1}
  3421. #: guix-git/doc/guix-cookbook.texi:2669
  3422. msgid "Note: Only the environmental variables of the packages that consume them will be set."
  3423. msgstr ""
  3424. #. type: Plain text
  3425. #: guix-git/doc/guix-cookbook.texi:2673
  3426. msgid "For instance, @samp{MANPATH} won't be set if there is no consumer application for man pages within the profile. So if you need to transparently access man pages once the profile is loaded, you've got two options:"
  3427. msgstr ""
  3428. #. type: itemize
  3429. #: guix-git/doc/guix-cookbook.texi:2677
  3430. msgid "Either export the variable manually, e.g."
  3431. msgstr ""
  3432. #. type: example
  3433. #: guix-git/doc/guix-cookbook.texi:2679
  3434. #, no-wrap
  3435. msgid "export MANPATH=/path/to/profile$@{MANPATH:+:@}$MANPATH\n"
  3436. msgstr ""
  3437. #. type: itemize
  3438. #: guix-git/doc/guix-cookbook.texi:2683
  3439. msgid "Or include @samp{man-db} to the profile manifest."
  3440. msgstr ""
  3441. #. type: Plain text
  3442. #: guix-git/doc/guix-cookbook.texi:2687
  3443. msgid "The same is true for @samp{INFOPATH} (you can install @samp{info-reader}), @samp{PKG_CONFIG_PATH} (install @samp{pkg-config}), etc."
  3444. msgstr ""
  3445. #. type: subsection
  3446. #: guix-git/doc/guix-cookbook.texi:2688 guix-git/doc/guix-cookbook.texi:2689
  3447. #, no-wrap
  3448. msgid "Default profile"
  3449. msgstr ""
  3450. #. type: Plain text
  3451. #: guix-git/doc/guix-cookbook.texi:2692
  3452. msgid "What about the default profile that Guix keeps in @file{~/.guix-profile}?"
  3453. msgstr ""
  3454. #. type: Plain text
  3455. #: guix-git/doc/guix-cookbook.texi:2695
  3456. msgid "You can assign it the role you want. Typically you would install the manifest of the packages you want to use all the time."
  3457. msgstr ""
  3458. #. type: Plain text
  3459. #: guix-git/doc/guix-cookbook.texi:2699
  3460. msgid "Alternatively, you could keep it ``manifest-less'' for throw-away packages that you would just use for a couple of days. This way makes it convenient to run"
  3461. msgstr ""
  3462. #. type: example
  3463. #: guix-git/doc/guix-cookbook.texi:2703
  3464. #, no-wrap
  3465. msgid ""
  3466. "guix install package-foo\n"
  3467. "guix upgrade package-bar\n"
  3468. msgstr ""
  3469. #. type: Plain text
  3470. #: guix-git/doc/guix-cookbook.texi:2706
  3471. msgid "without having to specify the path to a profile."
  3472. msgstr ""
  3473. #. type: subsection
  3474. #: guix-git/doc/guix-cookbook.texi:2707 guix-git/doc/guix-cookbook.texi:2708
  3475. #, no-wrap
  3476. msgid "The benefits of manifests"
  3477. msgstr ""
  3478. #. type: Plain text
  3479. #: guix-git/doc/guix-cookbook.texi:2712
  3480. msgid "Manifests are a convenient way to keep your package lists around and, say, to synchronize them across multiple machines using a version control system."
  3481. msgstr ""
  3482. #. type: Plain text
  3483. #: guix-git/doc/guix-cookbook.texi:2716
  3484. msgid "A common complaint about manifests is that they can be slow to install when they contain large number of packages. This is especially cumbersome when you just want get an upgrade for one package within a big manifest."
  3485. msgstr ""
  3486. #. type: Plain text
  3487. #: guix-git/doc/guix-cookbook.texi:2721
  3488. msgid "This is one more reason to use multiple profiles, which happen to be just perfect to break down manifests into multiple sets of semantically connected packages. Using multiple, small profiles provides more flexibility and usability."
  3489. msgstr ""
  3490. #. type: Plain text
  3491. #: guix-git/doc/guix-cookbook.texi:2723
  3492. msgid "Manifests come with multiple benefits. In particular, they ease maintenance:"
  3493. msgstr ""
  3494. #. type: itemize
  3495. #: guix-git/doc/guix-cookbook.texi:2731
  3496. msgid "When a profile is set up from a manifest, the manifest itself is self-sufficient to keep a ``package listing'' around and reinstall the profile later or on a different system. For ad-hoc profiles, we would need to generate a manifest specification manually and maintain the package versions for the packages that don't use the default version."
  3497. msgstr ""
  3498. #. type: itemize
  3499. #: guix-git/doc/guix-cookbook.texi:2736
  3500. msgid "@code{guix package --upgrade} always tries to update the packages that have propagated inputs, even if there is nothing to do. Guix manifests remove this problem."
  3501. msgstr ""
  3502. #. type: itemize
  3503. #: guix-git/doc/guix-cookbook.texi:2742
  3504. msgid "When partially upgrading a profile, conflicts may arise (due to diverging dependencies between the updated and the non-updated packages) and they can be annoying to resolve manually. Manifests remove this problem altogether since all packages are always upgraded at once."
  3505. msgstr ""
  3506. #. type: itemize
  3507. #: guix-git/doc/guix-cookbook.texi:2748
  3508. msgid "As mentioned above, manifests allow for reproducible profiles, while the imperative @code{guix install}, @code{guix upgrade}, etc. do not, since they produce different profiles every time even when they hold the same packages. See @uref{https://issues.guix.gnu.org/issue/33285, the related discussion on the matter}."
  3509. msgstr ""
  3510. #. type: itemize
  3511. #: guix-git/doc/guix-cookbook.texi:2756
  3512. msgid "Manifest specifications are usable by other @samp{guix} commands. For example, you can run @code{guix weather -m manifest.scm} to see how many substitutes are available, which can help you decide whether you want to try upgrading today or wait a while. Another example: you can run @code{guix pack -m manifest.scm} to create a pack containing all the packages in the manifest (and their transitive references)."
  3513. msgstr ""
  3514. #. type: itemize
  3515. #: guix-git/doc/guix-cookbook.texi:2760
  3516. msgid "Finally, manifests have a Scheme representation, the @samp{<manifest>} record type. They can be manipulated in Scheme and passed to the various Guix @uref{https://en.wikipedia.org/wiki/Api, APIs}."
  3517. msgstr ""
  3518. #. type: Plain text
  3519. #: guix-git/doc/guix-cookbook.texi:2768
  3520. msgid "It's important to understand that while manifests can be used to declare profiles, they are not strictly equivalent: profiles have the side effect that they ``pin'' packages in the store, which prevents them from being garbage-collected (@pxref{Invoking guix gc,,, guix, GNU Guix Reference Manual}) and ensures that they will still be available at any point in the future."
  3521. msgstr ""
  3522. #. type: Plain text
  3523. #: guix-git/doc/guix-cookbook.texi:2770
  3524. msgid "Let's take an example:"
  3525. msgstr ""
  3526. #. type: enumerate
  3527. #: guix-git/doc/guix-cookbook.texi:2776
  3528. msgid "We have an environment for hacking on a project for which there isn't a Guix package yet. We build the environment using a manifest, and then run @code{guix environment -m manifest.scm}. So far so good."
  3529. msgstr ""
  3530. #. type: enumerate
  3531. #: guix-git/doc/guix-cookbook.texi:2782
  3532. msgid "Many weeks pass and we have run a couple of @code{guix pull} in the mean time. Maybe a dependency from our manifest has been updated; or we may have run @code{guix gc} and some packages needed by our manifest have been garbage-collected."
  3533. msgstr ""
  3534. #. type: enumerate
  3535. #: guix-git/doc/guix-cookbook.texi:2787
  3536. msgid "Eventually, we set to work on that project again, so we run @code{guix environment -m manifest.scm}. But now we have to wait for Guix to build and install stuff!"
  3537. msgstr ""
  3538. #. type: Plain text
  3539. #: guix-git/doc/guix-cookbook.texi:2793
  3540. msgid "Ideally, we could spare the rebuild time. And indeed we can, all we need is to install the manifest to a profile and use @code{GUIX_PROFILE=/the/profile; . \"$GUIX_PROFILE\"/etc/profile} as explained above: this guarantees that our hacking environment will be available at all times."
  3541. msgstr ""
  3542. #. type: Plain text
  3543. #: guix-git/doc/guix-cookbook.texi:2796
  3544. msgid "@emph{Security warning:} While keeping old profiles around can be convenient, keep in mind that outdated packages may not have received the latest security fixes."
  3545. msgstr ""
  3546. #. type: subsection
  3547. #: guix-git/doc/guix-cookbook.texi:2797 guix-git/doc/guix-cookbook.texi:2798
  3548. #, no-wrap
  3549. msgid "Reproducible profiles"
  3550. msgstr ""
  3551. #. type: Plain text
  3552. #: guix-git/doc/guix-cookbook.texi:2801
  3553. msgid "To reproduce a profile bit-for-bit, we need two pieces of information:"
  3554. msgstr ""
  3555. #. type: itemize
  3556. #: guix-git/doc/guix-cookbook.texi:2805
  3557. msgid "a manifest,"
  3558. msgstr ""
  3559. #. type: itemize
  3560. #: guix-git/doc/guix-cookbook.texi:2807
  3561. msgid "a Guix channel specification."
  3562. msgstr ""
  3563. #. type: Plain text
  3564. #: guix-git/doc/guix-cookbook.texi:2811
  3565. msgid "Indeed, manifests alone might not be enough: different Guix versions (or different channels) can produce different outputs for a given manifest."
  3566. msgstr ""
  3567. #. type: Plain text
  3568. #: guix-git/doc/guix-cookbook.texi:2815
  3569. msgid "You can output the Guix channel specification with @samp{guix describe --format=channels}. Save this to a file, say @samp{channel-specs.scm}."
  3570. msgstr ""
  3571. #. type: Plain text
  3572. #: guix-git/doc/guix-cookbook.texi:2818
  3573. msgid "On another computer, you can use the channel specification file and the manifest to reproduce the exact same profile:"
  3574. msgstr ""
  3575. #. type: example
  3576. #: guix-git/doc/guix-cookbook.texi:2822
  3577. #, no-wrap
  3578. msgid ""
  3579. "GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles\n"
  3580. "GUIX_EXTRA=$HOME/.guix-extra\n"
  3581. "\n"
  3582. msgstr ""
  3583. #. type: example
  3584. #: guix-git/doc/guix-cookbook.texi:2825
  3585. #, no-wrap
  3586. msgid ""
  3587. "mkdir \"$GUIX_EXTRA\"/my-project\n"
  3588. "guix pull --channels=channel-specs.scm --profile \"$GUIX_EXTRA/my-project/guix\"\n"
  3589. "\n"
  3590. msgstr ""
  3591. #. type: example
  3592. #: guix-git/doc/guix-cookbook.texi:2828
  3593. #, no-wrap
  3594. msgid ""
  3595. "mkdir -p \"$GUIX_EXTRA_PROFILES/my-project\"\n"
  3596. "\"$GUIX_EXTRA\"/my-project/guix/bin/guix package --manifest=/path/to/guix-my-project-manifest.scm --profile=\"$GUIX_EXTRA_PROFILES\"/my-project/my-project\n"
  3597. msgstr ""
  3598. #. type: Plain text
  3599. #: guix-git/doc/guix-cookbook.texi:2832
  3600. msgid "It's safe to delete the Guix channel profile you've just installed with the channel specification, the project profile does not depend on it."
  3601. msgstr ""
  3602. #. type: Plain text
  3603. #: guix-git/doc/guix-cookbook.texi:2839
  3604. msgid "Guix provides multiple tools to manage environment. This chapter demonstrate such utilities."
  3605. msgstr ""
  3606. #. type: section
  3607. #: guix-git/doc/guix-cookbook.texi:2842 guix-git/doc/guix-cookbook.texi:2844
  3608. #: guix-git/doc/guix-cookbook.texi:2845
  3609. #, no-wrap
  3610. msgid "Guix environment via direnv"
  3611. msgstr ""
  3612. #. type: menuentry
  3613. #: guix-git/doc/guix-cookbook.texi:2842
  3614. msgid "Setup Guix environment with direnv"
  3615. msgstr ""
  3616. #. type: Plain text
  3617. #: guix-git/doc/guix-cookbook.texi:2850
  3618. msgid "Guix provides a @samp{direnv} package, which could extend shell after directory change. This tool could be used to prepare a pure Guix environment."
  3619. msgstr ""
  3620. #. type: Plain text
  3621. #: guix-git/doc/guix-cookbook.texi:2856
  3622. msgid "The following example provides a shell function for @file{~/.direnvrc} file, which could be used from Guix Git repository in @file{~/src/guix/.envrc} file to setup a build environment similar to described in @pxref{Building from Git,,, guix, GNU Guix Reference Manual}."
  3623. msgstr ""
  3624. #. type: Plain text
  3625. #: guix-git/doc/guix-cookbook.texi:2858
  3626. msgid "Create a @file{~/.direnvrc} with a Bash code:"
  3627. msgstr ""
  3628. #. type: example
  3629. #: guix-git/doc/guix-cookbook.texi:2876
  3630. #, no-wrap
  3631. msgid ""
  3632. "# Thanks <https://github.com/direnv/direnv/issues/73#issuecomment-152284914>\n"
  3633. "export_function()\n"
  3634. "@{\n"
  3635. " local name=$1\n"
  3636. " local alias_dir=$PWD/.direnv/aliases\n"
  3637. " mkdir -p \"$alias_dir\"\n"
  3638. " PATH_add \"$alias_dir\"\n"
  3639. " local target=\"$alias_dir/$name\"\n"
  3640. " if declare -f \"$name\" >/dev/null; then\n"
  3641. " echo \"#!$SHELL\" > \"$target\"\n"
  3642. " declare -f \"$name\" >> \"$target\" 2>/dev/null\n"
  3643. " # Notice that we add shell variables to the function trigger.\n"
  3644. " echo \"$name \\$*\" >> \"$target\"\n"
  3645. " chmod +x \"$target\"\n"
  3646. " fi\n"
  3647. "@}\n"
  3648. "\n"
  3649. msgstr ""
  3650. #. type: example
  3651. #: guix-git/doc/guix-cookbook.texi:2881
  3652. #, no-wrap
  3653. msgid ""
  3654. "use_guix()\n"
  3655. "@{\n"
  3656. " # Set GitHub token.\n"
  3657. " export GUIX_GITHUB_TOKEN=\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n"
  3658. "\n"
  3659. msgstr ""
  3660. #. type: example
  3661. #: guix-git/doc/guix-cookbook.texi:2884
  3662. #, no-wrap
  3663. msgid ""
  3664. " # Unset 'GUIX_PACKAGE_PATH'.\n"
  3665. " export GUIX_PACKAGE_PATH=\"\"\n"
  3666. "\n"
  3667. msgstr ""
  3668. #. type: example
  3669. #: guix-git/doc/guix-cookbook.texi:2893
  3670. #, no-wrap
  3671. msgid ""
  3672. " # Recreate a garbage collector root.\n"
  3673. " gcroots=\"$HOME/.config/guix/gcroots\"\n"
  3674. " mkdir -p \"$gcroots\"\n"
  3675. " gcroot=\"$gcroots/guix\"\n"
  3676. " if [ -L \"$gcroot\" ]\n"
  3677. " then\n"
  3678. " rm -v \"$gcroot\"\n"
  3679. " fi\n"
  3680. "\n"
  3681. msgstr ""
  3682. #. type: example
  3683. #: guix-git/doc/guix-cookbook.texi:2908
  3684. #, no-wrap
  3685. msgid ""
  3686. " # Miscellaneous packages.\n"
  3687. " PACKAGES_MAINTENANCE=(\n"
  3688. " direnv\n"
  3689. " git\n"
  3690. " git:send-email\n"
  3691. " git-cal\n"
  3692. " gnupg\n"
  3693. " guile-colorized\n"
  3694. " guile-readline\n"
  3695. " less\n"
  3696. " ncurses\n"
  3697. " openssh\n"
  3698. " xdot\n"
  3699. " )\n"
  3700. "\n"
  3701. msgstr ""
  3702. #. type: example
  3703. #: guix-git/doc/guix-cookbook.texi:2911
  3704. #, no-wrap
  3705. msgid ""
  3706. " # Environment packages.\n"
  3707. " PACKAGES=(help2man guile-sqlite3 guile-gcrypt)\n"
  3708. "\n"
  3709. msgstr ""
  3710. #. type: example
  3711. #: guix-git/doc/guix-cookbook.texi:2914
  3712. #, no-wrap
  3713. msgid ""
  3714. " # Thanks <https://lists.gnu.org/archive/html/guix-devel/2016-09/msg00859.html>\n"
  3715. " eval \"$(guix environment --search-paths --root=\"$gcroot\" --pure guix --ad-hoc $@{PACKAGES[@@]@} $@{PACKAGES_MAINTENANCE[@@]@} \"$@@\")\"\n"
  3716. "\n"
  3717. msgstr ""
  3718. #. type: example
  3719. #: guix-git/doc/guix-cookbook.texi:2921
  3720. #, no-wrap
  3721. msgid ""
  3722. " # Predefine configure flags.\n"
  3723. " configure()\n"
  3724. " @{\n"
  3725. " ./configure --localstatedir=/var --prefix=\n"
  3726. " @}\n"
  3727. " export_function configure\n"
  3728. "\n"
  3729. msgstr ""
  3730. #. type: example
  3731. #: guix-git/doc/guix-cookbook.texi:2932
  3732. #, no-wrap
  3733. msgid ""
  3734. " # Run make and optionally build something.\n"
  3735. " build()\n"
  3736. " @{\n"
  3737. " make -j 2\n"
  3738. " if [ $# -gt 0 ]\n"
  3739. " then\n"
  3740. " ./pre-inst-env guix build \"$@@\"\n"
  3741. " fi\n"
  3742. " @}\n"
  3743. " export_function build\n"
  3744. "\n"
  3745. msgstr ""
  3746. #. type: example
  3747. #: guix-git/doc/guix-cookbook.texi:2939
  3748. #, no-wrap
  3749. msgid ""
  3750. " # Predefine push Git command.\n"
  3751. " push()\n"
  3752. " @{\n"
  3753. " git push --set-upstream origin\n"
  3754. " @}\n"
  3755. " export_function push\n"
  3756. "\n"
  3757. msgstr ""
  3758. #. type: example
  3759. #: guix-git/doc/guix-cookbook.texi:2942
  3760. #, no-wrap
  3761. msgid ""
  3762. " clear # Clean up the screen.\n"
  3763. " git-cal --author='Your Name' # Show contributions calendar.\n"
  3764. "\n"
  3765. msgstr ""
  3766. #. type: example
  3767. #: guix-git/doc/guix-cookbook.texi:2950
  3768. #, no-wrap
  3769. msgid ""
  3770. " # Show commands help.\n"
  3771. " echo \"\n"
  3772. "build build a package or just a project if no argument provided\n"
  3773. "configure run ./configure with predefined parameters\n"
  3774. "push push to upstream Git repository\n"
  3775. "\"\n"
  3776. "@}\n"
  3777. msgstr ""
  3778. #. type: Plain text
  3779. #: guix-git/doc/guix-cookbook.texi:2954
  3780. msgid "Every project containing @file{.envrc} with a string @code{use guix} will have predefined environment variables and procedures."
  3781. msgstr ""
  3782. #. type: Plain text
  3783. #: guix-git/doc/guix-cookbook.texi:2956
  3784. msgid "Run @command{direnv allow} to setup the environment for the first time."
  3785. msgstr ""
  3786. #. type: Plain text
  3787. #: guix-git/doc/guix-cookbook.texi:2968
  3788. msgid "Guix is based on the @uref{https://nixos.org/nix/, Nix package manager}, which was designed and implemented by Eelco Dolstra, with contributions from other people (see the @file{nix/AUTHORS} file in Guix.) Nix pioneered functional package management, and promoted unprecedented features, such as transactional package upgrades and rollbacks, per-user profiles, and referentially transparent build processes. Without this work, Guix would not exist."
  3789. msgstr ""
  3790. #. type: Plain text
  3791. #: guix-git/doc/guix-cookbook.texi:2971
  3792. msgid "The Nix-based software distributions, Nixpkgs and NixOS, have also been an inspiration for Guix."
  3793. msgstr ""
  3794. #. type: Plain text
  3795. #: guix-git/doc/guix-cookbook.texi:2977
  3796. msgid "GNU@tie{}Guix itself is a collective work with contributions from a number of people. See the @file{AUTHORS} file in Guix for more information on these fine people. The @file{THANKS} file lists people who have helped by reporting bugs, taking care of the infrastructure, providing artwork and themes, making suggestions, and more---thank you!"
  3797. msgstr ""
  3798. #. type: Plain text
  3799. #: guix-git/doc/guix-cookbook.texi:2980
  3800. msgid "This document includes adapted sections from articles that have previously been published on the Guix blog at @uref{https://guix.gnu.org/blog}."
  3801. msgstr ""
  3802. #. type: cindex
  3803. #: guix-git/doc/guix-cookbook.texi:2985
  3804. #, no-wrap
  3805. msgid "license, GNU Free Documentation License"
  3806. msgstr ""
  3807. #. type: include
  3808. #: guix-git/doc/guix-cookbook.texi:2986
  3809. #, no-wrap
  3810. msgid "fdl-1.3.texi"
  3811. msgstr ""