guix-cookbook.fi.po 157 KB

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