guix-cookbook.fa.po 157 KB

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