guix-cookbook.ru.po 158 KB

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