guix-cookbook.ru.po 158 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496
  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-10-08 14:00+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:1348 guix-git/doc/guix-cookbook.texi:1349
  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:2446
  108. #: guix-git/doc/guix-cookbook.texi:2447
  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:2844
  118. #: guix-git/doc/guix-cookbook.texi:2845
  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:2968
  128. #: guix-git/doc/guix-cookbook.texi:2969
  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:2993
  138. #: guix-git/doc/guix-cookbook.texi:2994
  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:2999
  148. #: guix-git/doc/guix-cookbook.texi:3000
  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:1368
  182. #: guix-git/doc/guix-cookbook.texi:1370 guix-git/doc/guix-cookbook.texi:1371
  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:1368
  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:1368
  192. #: guix-git/doc/guix-cookbook.texi:1415 guix-git/doc/guix-cookbook.texi:1416
  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:1368
  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:840
  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. " (snippet '(begin\n"
  1061. " ;; Remove bundled software.\n"
  1062. " (delete-file-recursively \"deps\")\n"
  1063. " #true))))\n"
  1064. " (build-system cmake-build-system)\n"
  1065. " (outputs '(\"out\" \"debug\"))\n"
  1066. " (arguments\n"
  1067. " `(#:tests? #true ; Run the test suite (this is the default)\n"
  1068. " #:configure-flags '(\"-DUSE_SHA1DC=ON\") ; SHA-1 collision detection\n"
  1069. " #:phases\n"
  1070. " (modify-phases %standard-phases\n"
  1071. " (add-after 'unpack 'fix-hardcoded-paths\n"
  1072. " (lambda _\n"
  1073. " (substitute* \"tests/repo/init.c\"\n"
  1074. " ((\"#!/bin/sh\") (string-append \"#!\" (which \"sh\"))))\n"
  1075. " (substitute* \"tests/clar/fs.h\"\n"
  1076. " ((\"/bin/cp\") (which \"cp\"))\n"
  1077. " ((\"/bin/rm\") (which \"rm\")))\n"
  1078. " #true))\n"
  1079. " ;; Run checks more verbosely.\n"
  1080. " (replace 'check\n"
  1081. " (lambda _ (invoke \"./libgit2_clar\" \"-v\" \"-Q\")))\n"
  1082. " (add-after 'unpack 'make-files-writable-for-tests\n"
  1083. " (lambda _ (for-each make-file-writable (find-files \".\" \".*\")))))))\n"
  1084. " (inputs\n"
  1085. " `((\"libssh2\" ,libssh2)\n"
  1086. " (\"http-parser\" ,http-parser)\n"
  1087. " (\"python\" ,python-wrapper)))\n"
  1088. " (native-inputs\n"
  1089. " `((\"pkg-config\" ,pkg-config)))\n"
  1090. " (propagated-inputs\n"
  1091. " ;; These two libraries are in 'Requires.private' in libgit2.pc.\n"
  1092. " `((\"openssl\" ,openssl)\n"
  1093. " (\"zlib\" ,zlib)))\n"
  1094. " (home-page \"https://libgit2.github.com/\")\n"
  1095. " (synopsis \"Library providing Git core methods\")\n"
  1096. " (description\n"
  1097. " \"Libgit2 is a portable, pure C implementation of the Git core methods\n"
  1098. "provided as a re-entrant linkable library with a solid API, allowing you to\n"
  1099. "write native speed custom Git applications in any language with bindings.\")\n"
  1100. " ;; GPLv2 with linking exception\n"
  1101. " (license license:gpl2))))\n"
  1102. msgstr ""
  1103. #. type: Plain text
  1104. #: guix-git/doc/guix-cookbook.texi:845
  1105. 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.)"
  1106. msgstr ""
  1107. #. type: Plain text
  1108. #: guix-git/doc/guix-cookbook.texi:847
  1109. msgid "Let's discuss those fields in depth."
  1110. msgstr ""
  1111. #. type: subsubsection
  1112. #: guix-git/doc/guix-cookbook.texi:848
  1113. #, no-wrap
  1114. msgid "@code{git-fetch} method"
  1115. msgstr ""
  1116. #. type: Plain text
  1117. #: guix-git/doc/guix-cookbook.texi:855
  1118. 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))}."
  1119. msgstr ""
  1120. #. type: Plain text
  1121. #: guix-git/doc/guix-cookbook.texi:859
  1122. 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))}."
  1123. msgstr ""
  1124. #. type: Plain text
  1125. #: guix-git/doc/guix-cookbook.texi:864
  1126. 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})."
  1127. msgstr ""
  1128. #. type: Plain text
  1129. #: guix-git/doc/guix-cookbook.texi:868
  1130. 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:"
  1131. msgstr ""
  1132. #. type: example
  1133. #: guix-git/doc/guix-cookbook.texi:874
  1134. #, no-wrap
  1135. msgid ""
  1136. "git clone https://github.com/libgit2/libgit2/\n"
  1137. "cd libgit2\n"
  1138. "git checkout v0.26.6\n"
  1139. "guix hash -rx .\n"
  1140. msgstr ""
  1141. #. type: Plain text
  1142. #: guix-git/doc/guix-cookbook.texi:879
  1143. 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})."
  1144. msgstr ""
  1145. #. type: Plain text
  1146. #: guix-git/doc/guix-cookbook.texi:882
  1147. msgid "In the future, @command{guix download} will hopefully be able to do these steps for you, just like it does for regular downloads."
  1148. msgstr ""
  1149. #. type: subsubsection
  1150. #: guix-git/doc/guix-cookbook.texi:883
  1151. #, no-wrap
  1152. msgid "Snippets"
  1153. msgstr ""
  1154. #. type: Plain text
  1155. #: guix-git/doc/guix-cookbook.texi:889
  1156. 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."
  1157. msgstr ""
  1158. #. type: Plain text
  1159. #: guix-git/doc/guix-cookbook.texi:892
  1160. msgid "Snippets might need additional Guile modules which can be imported from the @code{modules} field."
  1161. msgstr ""
  1162. #. type: subsubsection
  1163. #: guix-git/doc/guix-cookbook.texi:893
  1164. #, no-wrap
  1165. msgid "Inputs"
  1166. msgstr ""
  1167. #. type: Plain text
  1168. #: guix-git/doc/guix-cookbook.texi:896
  1169. msgid "First, a syntactic comment: See the quasi-quote / comma syntax?"
  1170. msgstr ""
  1171. #. type: lisp
  1172. #: guix-git/doc/guix-cookbook.texi:900
  1173. #, no-wrap
  1174. msgid ""
  1175. " (native-inputs\n"
  1176. " `((\"pkg-config\" ,pkg-config)))\n"
  1177. msgstr ""
  1178. #. type: Plain text
  1179. #: guix-git/doc/guix-cookbook.texi:903
  1180. msgid "is equivalent to"
  1181. msgstr ""
  1182. #. type: lisp
  1183. #: guix-git/doc/guix-cookbook.texi:907
  1184. #, no-wrap
  1185. msgid ""
  1186. " (native-inputs\n"
  1187. " (list (list \"pkg-config\" pkg-config)))\n"
  1188. msgstr ""
  1189. #. type: Plain text
  1190. #: guix-git/doc/guix-cookbook.texi:910
  1191. msgid "You'll mostly see the former because it's shorter."
  1192. msgstr ""
  1193. #. type: Plain text
  1194. #: guix-git/doc/guix-cookbook.texi:912
  1195. msgid "There are 3 different input types. In short:"
  1196. msgstr ""
  1197. #. type: item
  1198. #: guix-git/doc/guix-cookbook.texi:914
  1199. #, no-wrap
  1200. msgid "native-inputs"
  1201. msgstr ""
  1202. #. type: table
  1203. #: guix-git/doc/guix-cookbook.texi:917
  1204. msgid "Required for building but not runtime -- installing a package through a substitute won't install these inputs."
  1205. msgstr ""
  1206. #. type: item
  1207. #: guix-git/doc/guix-cookbook.texi:917
  1208. #, no-wrap
  1209. msgid "inputs"
  1210. msgstr ""
  1211. #. type: table
  1212. #: guix-git/doc/guix-cookbook.texi:920
  1213. msgid "Installed in the store but not in the profile, as well as being present at build time."
  1214. msgstr ""
  1215. #. type: item
  1216. #: guix-git/doc/guix-cookbook.texi:920
  1217. #, no-wrap
  1218. msgid "propagated-inputs"
  1219. msgstr ""
  1220. #. type: table
  1221. #: guix-git/doc/guix-cookbook.texi:923
  1222. msgid "Installed in the store and in the profile, as well as being present at build time."
  1223. msgstr ""
  1224. #. type: Plain text
  1225. #: guix-git/doc/guix-cookbook.texi:926
  1226. msgid "@xref{Package Reference,,, guix, GNU Guix Reference Manual} for more details."
  1227. msgstr ""
  1228. #. type: Plain text
  1229. #: guix-git/doc/guix-cookbook.texi:930
  1230. 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."
  1231. msgstr ""
  1232. #. type: Plain text
  1233. #: guix-git/doc/guix-cookbook.texi:937
  1234. 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."
  1235. msgstr ""
  1236. #. type: Plain text
  1237. #: guix-git/doc/guix-cookbook.texi:943
  1238. 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."
  1239. msgstr ""
  1240. #. type: subsubsection
  1241. #: guix-git/doc/guix-cookbook.texi:944
  1242. #, no-wrap
  1243. msgid "Outputs"
  1244. msgstr ""
  1245. #. type: Plain text
  1246. #: guix-git/doc/guix-cookbook.texi:948
  1247. msgid "Just like how a package can have multiple inputs, it can also produce multiple outputs."
  1248. msgstr ""
  1249. #. type: Plain text
  1250. #: guix-git/doc/guix-cookbook.texi:950
  1251. msgid "Each output corresponds to a separate directory in the store."
  1252. msgstr ""
  1253. #. type: Plain text
  1254. #: guix-git/doc/guix-cookbook.texi:953
  1255. 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."
  1256. msgstr ""
  1257. #. type: Plain text
  1258. #: guix-git/doc/guix-cookbook.texi:956
  1259. 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\"}."
  1260. msgstr ""
  1261. #. type: Plain text
  1262. #: guix-git/doc/guix-cookbook.texi:958
  1263. msgid "Typical separate output names include @code{debug} and @code{doc}."
  1264. msgstr ""
  1265. #. type: Plain text
  1266. #: guix-git/doc/guix-cookbook.texi:962
  1267. 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."
  1268. msgstr ""
  1269. #. type: subsubsection
  1270. #: guix-git/doc/guix-cookbook.texi:963
  1271. #, no-wrap
  1272. msgid "Build system arguments"
  1273. msgstr ""
  1274. #. type: Plain text
  1275. #: guix-git/doc/guix-cookbook.texi:966
  1276. msgid "The @code{arguments} is a keyword-value list used to configure the build process."
  1277. msgstr ""
  1278. #. type: Plain text
  1279. #: guix-git/doc/guix-cookbook.texi:971
  1280. 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."
  1281. msgstr ""
  1282. #. type: Plain text
  1283. #: guix-git/doc/guix-cookbook.texi:975
  1284. 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"
  1285. msgstr ""
  1286. #. type: lisp
  1287. #: guix-git/doc/guix-cookbook.texi:979
  1288. #, no-wrap
  1289. msgid ""
  1290. "#:make-flags (list (string-append \"prefix=\" (assoc-ref %outputs \"out\"))\n"
  1291. " \"CC=gcc\")\n"
  1292. msgstr ""
  1293. #. type: Plain text
  1294. #: guix-git/doc/guix-cookbook.texi:982
  1295. msgid "translate into"
  1296. msgstr ""
  1297. #. type: example
  1298. #: guix-git/doc/guix-cookbook.texi:985
  1299. #, no-wrap
  1300. msgid "$ make CC=gcc prefix=/gnu/store/...-<out>\n"
  1301. msgstr ""
  1302. #. type: Plain text
  1303. #: guix-git/doc/guix-cookbook.texi:991
  1304. 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})."
  1305. msgstr ""
  1306. #. type: Plain text
  1307. #: guix-git/doc/guix-cookbook.texi:993
  1308. msgid "Similarly, it's possible to set the configure flags:"
  1309. msgstr ""
  1310. #. type: lisp
  1311. #: guix-git/doc/guix-cookbook.texi:996
  1312. #, no-wrap
  1313. msgid "#:configure-flags '(\"-DUSE_SHA1DC=ON\")\n"
  1314. msgstr ""
  1315. #. type: Plain text
  1316. #: guix-git/doc/guix-cookbook.texi:1000
  1317. 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."
  1318. msgstr ""
  1319. #. type: Plain text
  1320. #: guix-git/doc/guix-cookbook.texi:1005
  1321. 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}:"
  1322. msgstr ""
  1323. #. type: lisp
  1324. #: guix-git/doc/guix-cookbook.texi:1024
  1325. #, no-wrap
  1326. msgid ""
  1327. "(define %standard-phases\n"
  1328. " ;; Standard build phases, as a list of symbol/procedure pairs.\n"
  1329. " (let-syntax ((phases (syntax-rules ()\n"
  1330. " ((_ p ...) `((p . ,p) ...)))))\n"
  1331. " (phases set-SOURCE-DATE-EPOCH set-paths install-locale unpack\n"
  1332. " bootstrap\n"
  1333. " patch-usr-bin-file\n"
  1334. " patch-source-shebangs configure patch-generated-file-shebangs\n"
  1335. " build check install\n"
  1336. " patch-shebangs strip\n"
  1337. " validate-runpath\n"
  1338. " validate-documentation-location\n"
  1339. " delete-info-dir-file\n"
  1340. " patch-dot-desktop-files\n"
  1341. " install-license-files\n"
  1342. " reset-gzip-timestamps\n"
  1343. " compress-documentation)))\n"
  1344. msgstr ""
  1345. #. type: Plain text
  1346. #: guix-git/doc/guix-cookbook.texi:1027
  1347. msgid "Or from the REPL:"
  1348. msgstr ""
  1349. #. type: lisp
  1350. #: guix-git/doc/guix-cookbook.texi:1033
  1351. #, no-wrap
  1352. msgid ""
  1353. "(add-to-load-path \"/path/to/guix/checkout\")\n"
  1354. ",use (guix build gnu-build-system)\n"
  1355. "(map first %standard-phases)\n"
  1356. "@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"
  1357. msgstr ""
  1358. #. type: Plain text
  1359. #: guix-git/doc/guix-cookbook.texi:1037
  1360. msgid "If you want to know more about what happens during those phases, consult the associated procedures."
  1361. msgstr ""
  1362. #. type: Plain text
  1363. #: guix-git/doc/guix-cookbook.texi:1040
  1364. msgid "For instance, as of this writing the definition of @code{unpack} for the GNU build system is:"
  1365. msgstr ""
  1366. #. type: lisp
  1367. #: guix-git/doc/guix-cookbook.texi:1050
  1368. #, no-wrap
  1369. msgid ""
  1370. "(define* (unpack #:key source #:allow-other-keys)\n"
  1371. " \"Unpack SOURCE in the working directory, and change directory within the\n"
  1372. "source. When SOURCE is a directory, copy it in a sub-directory of the current\n"
  1373. "working directory.\"\n"
  1374. " (if (file-is-directory? source)\n"
  1375. " (begin\n"
  1376. " (mkdir \"source\")\n"
  1377. " (chdir \"source\")\n"
  1378. "\n"
  1379. msgstr ""
  1380. #. type: lisp
  1381. #: guix-git/doc/guix-cookbook.texi:1061
  1382. #, no-wrap
  1383. msgid ""
  1384. " ;; Preserve timestamps (set to the Epoch) on the copied tree so that\n"
  1385. " ;; things work deterministically.\n"
  1386. " (copy-recursively source \".\"\n"
  1387. " #:keep-mtime? #true))\n"
  1388. " (begin\n"
  1389. " (if (string-suffix? \".zip\" source)\n"
  1390. " (invoke \"unzip\" source)\n"
  1391. " (invoke \"tar\" \"xvf\" source))\n"
  1392. " (chdir (first-subdirectory \".\"))))\n"
  1393. " #true)\n"
  1394. msgstr ""
  1395. #. type: Plain text
  1396. #: guix-git/doc/guix-cookbook.texi:1069
  1397. 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."
  1398. msgstr ""
  1399. #. type: Plain text
  1400. #: guix-git/doc/guix-cookbook.texi:1073
  1401. 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:"
  1402. msgstr ""
  1403. #. type: itemize
  1404. #: guix-git/doc/guix-cookbook.texi:1077
  1405. msgid "@code{(add-before @var{phase} @var{new-phase} @var{procedure})}: Run @var{procedure} named @var{new-phase} before @var{phase}."
  1406. msgstr ""
  1407. #. type: itemize
  1408. #: guix-git/doc/guix-cookbook.texi:1079
  1409. msgid "@code{(add-after @var{phase} @var{new-phase} @var{procedure})}: Same, but afterwards."
  1410. msgstr ""
  1411. #. type: itemize
  1412. #: guix-git/doc/guix-cookbook.texi:1081
  1413. msgid "@code{(replace @var{phase} @var{procedure})}."
  1414. msgstr ""
  1415. #. type: itemize
  1416. #: guix-git/doc/guix-cookbook.texi:1083
  1417. msgid "@code{(delete @var{phase})}."
  1418. msgstr ""
  1419. #. type: Plain text
  1420. #: guix-git/doc/guix-cookbook.texi:1090
  1421. 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:"
  1422. msgstr ""
  1423. #. type: lisp
  1424. #: guix-git/doc/guix-cookbook.texi:1098
  1425. #, no-wrap
  1426. msgid ""
  1427. "(lambda* (#:key inputs outputs #:allow-other-keys)\n"
  1428. " (let ((bash-directory (assoc-ref inputs \"bash\"))\n"
  1429. " (output-directory (assoc-ref outputs \"out\"))\n"
  1430. " (doc-directory (assoc-ref outputs \"doc\")))\n"
  1431. " ;; ...\n"
  1432. " #true))\n"
  1433. msgstr ""
  1434. #. type: Plain text
  1435. #: guix-git/doc/guix-cookbook.texi:1104
  1436. 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."
  1437. msgstr ""
  1438. #. type: subsubsection
  1439. #: guix-git/doc/guix-cookbook.texi:1105
  1440. #, no-wrap
  1441. msgid "Code staging"
  1442. msgstr ""
  1443. #. type: Plain text
  1444. #: guix-git/doc/guix-cookbook.texi:1111
  1445. 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}."
  1446. msgstr ""
  1447. #. type: subsubsection
  1448. #: guix-git/doc/guix-cookbook.texi:1112
  1449. #, no-wrap
  1450. msgid "Utility functions"
  1451. msgstr ""
  1452. #. type: Plain text
  1453. #: guix-git/doc/guix-cookbook.texi:1117
  1454. 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."
  1455. msgstr ""
  1456. #. type: Plain text
  1457. #: guix-git/doc/guix-cookbook.texi:1120
  1458. msgid "Some like @code{chmod} are native to Guile. @xref{,,, guile, Guile reference manual} for a complete list."
  1459. msgstr ""
  1460. #. type: Plain text
  1461. #: guix-git/doc/guix-cookbook.texi:1123
  1462. msgid "Guix provides additional helper functions which prove especially handy in the context of package management."
  1463. msgstr ""
  1464. #. type: Plain text
  1465. #: guix-git/doc/guix-cookbook.texi:1127
  1466. 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:"
  1467. msgstr ""
  1468. #. type: item
  1469. #: guix-git/doc/guix-cookbook.texi:1129
  1470. #, no-wrap
  1471. msgid "which"
  1472. msgstr ""
  1473. #. type: table
  1474. #: guix-git/doc/guix-cookbook.texi:1131
  1475. msgid "Like the @samp{which} system command."
  1476. msgstr ""
  1477. #. type: item
  1478. #: guix-git/doc/guix-cookbook.texi:1131
  1479. #, no-wrap
  1480. msgid "find-files"
  1481. msgstr ""
  1482. #. type: table
  1483. #: guix-git/doc/guix-cookbook.texi:1133
  1484. msgid "Akin to the @samp{find} system command."
  1485. msgstr ""
  1486. #. type: item
  1487. #: guix-git/doc/guix-cookbook.texi:1133
  1488. #, no-wrap
  1489. msgid "mkdir-p"
  1490. msgstr ""
  1491. #. type: table
  1492. #: guix-git/doc/guix-cookbook.texi:1135
  1493. msgid "Like @samp{mkdir -p}, which creates all parents as needed."
  1494. msgstr ""
  1495. #. type: item
  1496. #: guix-git/doc/guix-cookbook.texi:1135
  1497. #, no-wrap
  1498. msgid "install-file"
  1499. msgstr ""
  1500. #. type: table
  1501. #: guix-git/doc/guix-cookbook.texi:1139
  1502. 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}."
  1503. msgstr ""
  1504. #. type: item
  1505. #: guix-git/doc/guix-cookbook.texi:1139
  1506. #, no-wrap
  1507. msgid "copy-recursively"
  1508. msgstr ""
  1509. #. type: table
  1510. #: guix-git/doc/guix-cookbook.texi:1141
  1511. msgid "Like @samp{cp -r}."
  1512. msgstr ""
  1513. #. type: item
  1514. #: guix-git/doc/guix-cookbook.texi:1141
  1515. #, no-wrap
  1516. msgid "delete-file-recursively"
  1517. msgstr ""
  1518. #. type: table
  1519. #: guix-git/doc/guix-cookbook.texi:1143
  1520. msgid "Like @samp{rm -rf}."
  1521. msgstr ""
  1522. #. type: item
  1523. #: guix-git/doc/guix-cookbook.texi:1143
  1524. #, no-wrap
  1525. msgid "invoke"
  1526. msgstr ""
  1527. #. type: table
  1528. #: guix-git/doc/guix-cookbook.texi:1145
  1529. msgid "Run an executable. This should be used instead of @code{system*}."
  1530. msgstr ""
  1531. #. type: item
  1532. #: guix-git/doc/guix-cookbook.texi:1145
  1533. #, no-wrap
  1534. msgid "with-directory-excursion"
  1535. msgstr ""
  1536. #. type: table
  1537. #: guix-git/doc/guix-cookbook.texi:1148
  1538. msgid "Run the body in a different working directory, then restore the previous working directory."
  1539. msgstr ""
  1540. #. type: item
  1541. #: guix-git/doc/guix-cookbook.texi:1148
  1542. #, no-wrap
  1543. msgid "substitute*"
  1544. msgstr ""
  1545. #. type: table
  1546. #: guix-git/doc/guix-cookbook.texi:1150
  1547. msgid "A ``@command{sed}-like'' function."
  1548. msgstr ""
  1549. #. type: Plain text
  1550. #: guix-git/doc/guix-cookbook.texi:1154
  1551. msgid "@xref{Build Utilities,,, guix, GNU Guix Reference Manual}, for more information on these utilities."
  1552. msgstr ""
  1553. #. type: subsubsection
  1554. #: guix-git/doc/guix-cookbook.texi:1155
  1555. #, no-wrap
  1556. msgid "Module prefix"
  1557. msgstr ""
  1558. #. type: Plain text
  1559. #: guix-git/doc/guix-cookbook.texi:1165
  1560. 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)."
  1561. msgstr ""
  1562. #. type: subsection
  1563. #: guix-git/doc/guix-cookbook.texi:1166 guix-git/doc/guix-cookbook.texi:1167
  1564. #, no-wrap
  1565. msgid "Other build systems"
  1566. msgstr ""
  1567. #. type: Plain text
  1568. #: guix-git/doc/guix-cookbook.texi:1174
  1569. 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."
  1570. msgstr ""
  1571. #. type: Plain text
  1572. #: guix-git/doc/guix-cookbook.texi:1178
  1573. 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."
  1574. msgstr ""
  1575. #. type: Plain text
  1576. #: guix-git/doc/guix-cookbook.texi:1183
  1577. 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."
  1578. msgstr ""
  1579. #. type: subsection
  1580. #: guix-git/doc/guix-cookbook.texi:1184 guix-git/doc/guix-cookbook.texi:1185
  1581. #, no-wrap
  1582. msgid "Programmable and automated package definition"
  1583. msgstr ""
  1584. #. type: Plain text
  1585. #: guix-git/doc/guix-cookbook.texi:1189
  1586. 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."
  1587. msgstr ""
  1588. #. type: Plain text
  1589. #: guix-git/doc/guix-cookbook.texi:1191
  1590. msgid "Let's illustrate this with some awesome features of Guix!"
  1591. msgstr ""
  1592. #. type: subsubsection
  1593. #: guix-git/doc/guix-cookbook.texi:1192 guix-git/doc/guix-cookbook.texi:1193
  1594. #, no-wrap
  1595. msgid "Recursive importers"
  1596. msgstr ""
  1597. #. type: Plain text
  1598. #: guix-git/doc/guix-cookbook.texi:1200
  1599. 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):"
  1600. msgstr ""
  1601. #. type: example
  1602. #: guix-git/doc/guix-cookbook.texi:1203
  1603. #, no-wrap
  1604. msgid ""
  1605. "$ guix import cran --recursive walrus\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-mc2d\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-jmvcore\n"
  1622. " ; ...\n"
  1623. " (license gpl2+)))\n"
  1624. "\n"
  1625. msgstr ""
  1626. #. type: example
  1627. #: guix-git/doc/guix-cookbook.texi:1215
  1628. #, no-wrap
  1629. msgid ""
  1630. "(define-public r-wrs2\n"
  1631. " ; ...\n"
  1632. " (license gpl3)))\n"
  1633. "\n"
  1634. msgstr ""
  1635. #. type: example
  1636. #: guix-git/doc/guix-cookbook.texi:1244
  1637. #, no-wrap
  1638. msgid ""
  1639. "(define-public r-walrus\n"
  1640. " (package\n"
  1641. " (name \"r-walrus\")\n"
  1642. " (version \"1.0.3\")\n"
  1643. " (source\n"
  1644. " (origin\n"
  1645. " (method url-fetch)\n"
  1646. " (uri (cran-uri \"walrus\" version))\n"
  1647. " (sha256\n"
  1648. " (base32\n"
  1649. " \"1nk2glcvy4hyksl5ipq2mz8jy4fss90hx6cq98m3w96kzjni6jjj\"))))\n"
  1650. " (build-system r-build-system)\n"
  1651. " (propagated-inputs\n"
  1652. " `((\"r-ggplot2\" ,r-ggplot2)\n"
  1653. " (\"r-jmvcore\" ,r-jmvcore)\n"
  1654. " (\"r-r6\" ,r-r6)\n"
  1655. " (\"r-wrs2\" ,r-wrs2)))\n"
  1656. " (home-page \"https://github.com/jamovi/walrus\")\n"
  1657. " (synopsis \"Robust Statistical Methods\")\n"
  1658. " (description\n"
  1659. " \"This package provides a toolbox of common robust statistical\n"
  1660. "tests, including robust descriptives, robust t-tests, and robust ANOVA.\n"
  1661. "It is also available as a module for 'jamovi' (see\n"
  1662. "<https://www.jamovi.org> for more information). Walrus is based on the\n"
  1663. "WRS2 package by Patrick Mair, which is in turn based on the scripts and\n"
  1664. "work of Rand Wilcox. These analyses are described in depth in the book\n"
  1665. "'Introduction to Robust Estimation & Hypothesis Testing'.\")\n"
  1666. " (license gpl3)))\n"
  1667. msgstr ""
  1668. #. type: Plain text
  1669. #: guix-git/doc/guix-cookbook.texi:1248
  1670. msgid "The recursive importer won't import packages for which Guix already has package definitions, except for the very first."
  1671. msgstr ""
  1672. #. type: Plain text
  1673. #: guix-git/doc/guix-cookbook.texi:1253
  1674. 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})."
  1675. msgstr ""
  1676. #. type: subsubsection
  1677. #: guix-git/doc/guix-cookbook.texi:1254 guix-git/doc/guix-cookbook.texi:1255
  1678. #, no-wrap
  1679. msgid "Automatic update"
  1680. msgstr ""
  1681. #. type: Plain text
  1682. #: guix-git/doc/guix-cookbook.texi:1259
  1683. msgid "Guix can be smart enough to check for updates on systems it knows. It can report outdated package definitions with"
  1684. msgstr ""
  1685. #. type: example
  1686. #: guix-git/doc/guix-cookbook.texi:1262
  1687. #, no-wrap
  1688. msgid "$ guix refresh hello\n"
  1689. msgstr ""
  1690. #. type: Plain text
  1691. #: guix-git/doc/guix-cookbook.texi:1267
  1692. 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:"
  1693. msgstr ""
  1694. #. type: example
  1695. #: guix-git/doc/guix-cookbook.texi:1270
  1696. #, no-wrap
  1697. msgid "$ guix refresh hello --update\n"
  1698. msgstr ""
  1699. #. type: subsubsection
  1700. #: guix-git/doc/guix-cookbook.texi:1272 guix-git/doc/guix-cookbook.texi:1273
  1701. #, no-wrap
  1702. msgid "Inheritance"
  1703. msgstr ""
  1704. #. type: Plain text
  1705. #: guix-git/doc/guix-cookbook.texi:1277
  1706. 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:"
  1707. msgstr ""
  1708. #. type: lisp
  1709. #: guix-git/doc/guix-cookbook.texi:1293
  1710. #, no-wrap
  1711. msgid ""
  1712. "(define-public adwaita-icon-theme\n"
  1713. " (package (inherit gnome-icon-theme)\n"
  1714. " (name \"adwaita-icon-theme\")\n"
  1715. " (version \"3.26.1\")\n"
  1716. " (source (origin\n"
  1717. " (method url-fetch)\n"
  1718. " (uri (string-append \"mirror://gnome/sources/\" name \"/\"\n"
  1719. " (version-major+minor version) \"/\"\n"
  1720. " name \"-\" version \".tar.xz\"))\n"
  1721. " (sha256\n"
  1722. " (base32\n"
  1723. " \"17fpahgh5dyckgz7rwqvzgnhx53cx9kr2xw0szprc6bnqy977fi8\"))))\n"
  1724. " (native-inputs\n"
  1725. " `((\"gtk-encode-symbolic-svg\" ,gtk+ \"bin\")))))\n"
  1726. msgstr ""
  1727. #. type: Plain text
  1728. #: guix-git/doc/guix-cookbook.texi:1298
  1729. 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."
  1730. msgstr ""
  1731. #. type: subsection
  1732. #: guix-git/doc/guix-cookbook.texi:1299 guix-git/doc/guix-cookbook.texi:1300
  1733. #, no-wrap
  1734. msgid "Getting help"
  1735. msgstr ""
  1736. #. type: Plain text
  1737. #: guix-git/doc/guix-cookbook.texi:1306
  1738. 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."
  1739. msgstr ""
  1740. #. type: Plain text
  1741. #: guix-git/doc/guix-cookbook.texi:1309
  1742. 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."
  1743. msgstr ""
  1744. #. type: Plain text
  1745. #: guix-git/doc/guix-cookbook.texi:1311
  1746. msgid "See the @uref{https://www.gnu.org/software/guix/contact/, Guix homepage} for information on the mailing lists, IRC, etc."
  1747. msgstr ""
  1748. #. type: subsection
  1749. #: guix-git/doc/guix-cookbook.texi:1312 guix-git/doc/guix-cookbook.texi:1313
  1750. #, no-wrap
  1751. msgid "Conclusion"
  1752. msgstr ""
  1753. #. type: Plain text
  1754. #: guix-git/doc/guix-cookbook.texi:1319
  1755. 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."
  1756. msgstr ""
  1757. #. type: Plain text
  1758. #: guix-git/doc/guix-cookbook.texi:1324
  1759. 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."
  1760. msgstr ""
  1761. #. type: Plain text
  1762. #: guix-git/doc/guix-cookbook.texi:1327
  1763. msgid "Other features worth exploring are the interactive editing and debugging capabilities of Guix provided by the Guile REPL@."
  1764. msgstr ""
  1765. #. type: Plain text
  1766. #: guix-git/doc/guix-cookbook.texi:1332
  1767. 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!"
  1768. msgstr ""
  1769. #. type: subsection
  1770. #: guix-git/doc/guix-cookbook.texi:1333 guix-git/doc/guix-cookbook.texi:1334
  1771. #, no-wrap
  1772. msgid "References"
  1773. msgstr ""
  1774. #. type: itemize
  1775. #: guix-git/doc/guix-cookbook.texi:1339
  1776. msgid "The @uref{https://www.gnu.org/software/guix/manual/en/html_node/Defining-Packages.html, package reference in the manual}"
  1777. msgstr ""
  1778. #. type: itemize
  1779. #: guix-git/doc/guix-cookbook.texi:1342
  1780. msgid "@uref{https://gitlab.com/pjotrp/guix-notes/blob/master/HACKING.org, Pjotr’s hacking guide to GNU Guix}"
  1781. msgstr ""
  1782. #. type: itemize
  1783. #: guix-git/doc/guix-cookbook.texi:1345
  1784. msgid "@uref{https://www.gnu.org/software/guix/guix-ghm-andreas-20130823.pdf, ``GNU Guix: Package without a scheme!''}, by Andreas Enge"
  1785. msgstr ""
  1786. #. type: Plain text
  1787. #: guix-git/doc/guix-cookbook.texi:1354
  1788. 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."
  1789. msgstr ""
  1790. #. type: Plain text
  1791. #: guix-git/doc/guix-cookbook.texi:1357
  1792. msgid "@pxref{System Configuration,,, guix, GNU Guix Reference Manual} for a complete reference."
  1793. msgstr ""
  1794. #. type: section
  1795. #: guix-git/doc/guix-cookbook.texi:1368 guix-git/doc/guix-cookbook.texi:1655
  1796. #: guix-git/doc/guix-cookbook.texi:1656
  1797. #, no-wrap
  1798. msgid "Guix System Image API"
  1799. msgstr ""
  1800. #. type: menuentry
  1801. #: guix-git/doc/guix-cookbook.texi:1368
  1802. msgid "Customizing images to target specific platforms."
  1803. msgstr ""
  1804. #. type: section
  1805. #: guix-git/doc/guix-cookbook.texi:1368 guix-git/doc/guix-cookbook.texi:1866
  1806. #: guix-git/doc/guix-cookbook.texi:1867
  1807. #, no-wrap
  1808. msgid "Connecting to Wireguard VPN"
  1809. msgstr ""
  1810. #. type: menuentry
  1811. #: guix-git/doc/guix-cookbook.texi:1368
  1812. msgid "Connecting to a Wireguard VPN."
  1813. msgstr ""
  1814. #. type: section
  1815. #: guix-git/doc/guix-cookbook.texi:1368 guix-git/doc/guix-cookbook.texi:1943
  1816. #: guix-git/doc/guix-cookbook.texi:1944
  1817. #, no-wrap
  1818. msgid "Customizing a Window Manager"
  1819. msgstr ""
  1820. #. type: menuentry
  1821. #: guix-git/doc/guix-cookbook.texi:1368
  1822. msgid "Handle customization of a Window manager on Guix System."
  1823. msgstr ""
  1824. #. type: section
  1825. #: guix-git/doc/guix-cookbook.texi:1368 guix-git/doc/guix-cookbook.texi:2034
  1826. #: guix-git/doc/guix-cookbook.texi:2035
  1827. #, no-wrap
  1828. msgid "Running Guix on a Linode Server"
  1829. msgstr ""
  1830. #. type: section
  1831. #: guix-git/doc/guix-cookbook.texi:1368 guix-git/doc/guix-cookbook.texi:2277
  1832. #: guix-git/doc/guix-cookbook.texi:2278
  1833. #, no-wrap
  1834. msgid "Setting up a bind mount"
  1835. msgstr ""
  1836. #. type: menuentry
  1837. #: guix-git/doc/guix-cookbook.texi:1368
  1838. msgid "Setting up a bind mount in the file-systems definition."
  1839. msgstr ""
  1840. #. type: section
  1841. #: guix-git/doc/guix-cookbook.texi:1368 guix-git/doc/guix-cookbook.texi:2326
  1842. #: guix-git/doc/guix-cookbook.texi:2327
  1843. #, no-wrap
  1844. msgid "Getting substitutes from Tor"
  1845. msgstr ""
  1846. #. type: menuentry
  1847. #: guix-git/doc/guix-cookbook.texi:1368
  1848. msgid "Configuring Guix daemon to get substitutes through Tor."
  1849. msgstr ""
  1850. #. type: section
  1851. #: guix-git/doc/guix-cookbook.texi:1368 guix-git/doc/guix-cookbook.texi:2388
  1852. #: guix-git/doc/guix-cookbook.texi:2389
  1853. #, no-wrap
  1854. msgid "Setting up NGINX with Lua"
  1855. msgstr ""
  1856. #. type: menuentry
  1857. #: guix-git/doc/guix-cookbook.texi:1368
  1858. msgid "Configuring NGINX web-server to load Lua modules."
  1859. msgstr ""
  1860. #. type: Plain text
  1861. #: guix-git/doc/guix-cookbook.texi:1380
  1862. 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."
  1863. msgstr ""
  1864. #. type: Plain text
  1865. #: guix-git/doc/guix-cookbook.texi:1382
  1866. msgid "Here is how one might set up auto login for one user to one tty:"
  1867. msgstr ""
  1868. #. type: lisp
  1869. #: guix-git/doc/guix-cookbook.texi:1390
  1870. #, no-wrap
  1871. msgid ""
  1872. "(define (auto-login-to-tty config tty user)\n"
  1873. " (if (string=? tty (mingetty-configuration-tty config))\n"
  1874. " (mingetty-configuration\n"
  1875. " (inherit config)\n"
  1876. " (auto-login user))\n"
  1877. " config))\n"
  1878. "\n"
  1879. msgstr ""
  1880. #. type: lisp
  1881. #: guix-git/doc/guix-cookbook.texi:1397
  1882. #, no-wrap
  1883. msgid ""
  1884. "(define %my-services\n"
  1885. " (modify-services %base-services\n"
  1886. " ;; @dots{}\n"
  1887. " (mingetty-service-type config =>\n"
  1888. " (auto-login-to-tty\n"
  1889. " config \"tty3\" \"alice\"))))\n"
  1890. "\n"
  1891. msgstr ""
  1892. #. type: lisp
  1893. #: guix-git/doc/guix-cookbook.texi:1401
  1894. #, no-wrap
  1895. msgid ""
  1896. "(operating-system\n"
  1897. " ;; @dots{}\n"
  1898. " (services %my-services))\n"
  1899. msgstr ""
  1900. #. type: Plain text
  1901. #: guix-git/doc/guix-cookbook.texi:1406
  1902. 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."
  1903. msgstr ""
  1904. #. type: Plain text
  1905. #: guix-git/doc/guix-cookbook.texi:1413
  1906. 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."
  1907. msgstr ""
  1908. #. type: Plain text
  1909. #: guix-git/doc/guix-cookbook.texi:1425
  1910. 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."
  1911. msgstr ""
  1912. #. type: Plain text
  1913. #: guix-git/doc/guix-cookbook.texi:1431
  1914. 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."
  1915. msgstr ""
  1916. #. type: Plain text
  1917. #: guix-git/doc/guix-cookbook.texi:1436
  1918. 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."
  1919. msgstr ""
  1920. #. type: Plain text
  1921. #: guix-git/doc/guix-cookbook.texi:1439
  1922. msgid "The @code{linux-libre} kernel package definition is actually a procedure which creates a package."
  1923. msgstr ""
  1924. #. type: lisp
  1925. #: guix-git/doc/guix-cookbook.texi:1451
  1926. #, no-wrap
  1927. msgid ""
  1928. "(define* (make-linux-libre version hash supported-systems\n"
  1929. " #:key\n"
  1930. " ;; A function that takes an arch and a variant.\n"
  1931. " ;; See kernel-config for an example.\n"
  1932. " (extra-version #false)\n"
  1933. " (configuration-file #false)\n"
  1934. " (defconfig \"defconfig\")\n"
  1935. " (extra-options %default-extra-linux-options)\n"
  1936. " (patches (list %boot-logo-patch)))\n"
  1937. " ...)\n"
  1938. msgstr ""
  1939. #. type: Plain text
  1940. #: guix-git/doc/guix-cookbook.texi:1455
  1941. msgid "The current @code{linux-libre} package is for the 5.1.x series, and is declared like this:"
  1942. msgstr ""
  1943. #. type: lisp
  1944. #: guix-git/doc/guix-cookbook.texi:1463
  1945. #, no-wrap
  1946. msgid ""
  1947. "(define-public linux-libre\n"
  1948. " (make-linux-libre %linux-libre-version\n"
  1949. " %linux-libre-hash\n"
  1950. " '(\"x86_64-linux\" \"i686-linux\" \"armhf-linux\" \"aarch64-linux\")\n"
  1951. " #:patches %linux-libre-5.1-patches\n"
  1952. " #:configuration-file kernel-config))\n"
  1953. msgstr ""
  1954. #. type: Plain text
  1955. #: guix-git/doc/guix-cookbook.texi:1472
  1956. msgid "Any keys which are not assigned values inherit their default value from the @code{make-linux-libre} definition. When comparing the two snippets above, you may notice that the code comment in the first doesn't actually refer to the @code{#:extra-version} keyword; it is actually for @code{#:configuration-file}. Because of this, it is not actually easy to include a custom kernel configuration from the definition, but don't worry, there are other ways to work with what we do have."
  1957. msgstr ""
  1958. #. type: Plain text
  1959. #: guix-git/doc/guix-cookbook.texi:1478
  1960. 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:"
  1961. msgstr ""
  1962. #. type: lisp
  1963. #: guix-git/doc/guix-cookbook.texi:1482
  1964. #, no-wrap
  1965. msgid ""
  1966. "(let ((build (assoc-ref %standard-phases 'build))\n"
  1967. " (config (assoc-ref (or native-inputs inputs) \"kconfig\")))\n"
  1968. "\n"
  1969. msgstr ""
  1970. #. type: lisp
  1971. #: guix-git/doc/guix-cookbook.texi:1490
  1972. #, no-wrap
  1973. msgid ""
  1974. " ;; Use a custom kernel configuration file or a default\n"
  1975. " ;; configuration file.\n"
  1976. " (if config\n"
  1977. " (begin\n"
  1978. " (copy-file config \".config\")\n"
  1979. " (chmod \".config\" #o666))\n"
  1980. " (invoke \"make\" ,defconfig)))\n"
  1981. msgstr ""
  1982. #. type: Plain text
  1983. #: guix-git/doc/guix-cookbook.texi:1495
  1984. 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:"
  1985. msgstr ""
  1986. #. type: lisp
  1987. #: guix-git/doc/guix-cookbook.texi:1504
  1988. #, no-wrap
  1989. msgid ""
  1990. "(define-public linux-libre/E2140\n"
  1991. " (package\n"
  1992. " (inherit linux-libre)\n"
  1993. " (native-inputs\n"
  1994. " `((\"kconfig\" ,(local-file \"E2140.config\"))\n"
  1995. " ,@@(alist-delete \"kconfig\"\n"
  1996. " (package-native-inputs linux-libre))))))\n"
  1997. msgstr ""
  1998. #. type: Plain text
  1999. #: guix-git/doc/guix-cookbook.texi:1511
  2000. 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."
  2001. msgstr ""
  2002. #. type: Plain text
  2003. #: guix-git/doc/guix-cookbook.texi:1516
  2004. 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:"
  2005. msgstr ""
  2006. #. type: lisp
  2007. #: guix-git/doc/guix-cookbook.texi:1532
  2008. #, no-wrap
  2009. msgid ""
  2010. "(define %default-extra-linux-options\n"
  2011. " `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html\n"
  2012. " (\"CONFIG_DEVPTS_MULTIPLE_INSTANCES\" . #true)\n"
  2013. " ;; Modules required for initrd:\n"
  2014. " (\"CONFIG_NET_9P\" . m)\n"
  2015. " (\"CONFIG_NET_9P_VIRTIO\" . m)\n"
  2016. " (\"CONFIG_VIRTIO_BLK\" . m)\n"
  2017. " (\"CONFIG_VIRTIO_NET\" . m)\n"
  2018. " (\"CONFIG_VIRTIO_PCI\" . m)\n"
  2019. " (\"CONFIG_VIRTIO_BALLOON\" . m)\n"
  2020. " (\"CONFIG_VIRTIO_MMIO\" . m)\n"
  2021. " (\"CONFIG_FUSE_FS\" . m)\n"
  2022. " (\"CONFIG_CIFS\" . m)\n"
  2023. " (\"CONFIG_9P_FS\" . m)))\n"
  2024. "\n"
  2025. msgstr ""
  2026. #. type: lisp
  2027. #: guix-git/doc/guix-cookbook.texi:1543
  2028. #, no-wrap
  2029. msgid ""
  2030. "(define (config->string options)\n"
  2031. " (string-join (map (match-lambda\n"
  2032. " ((option . 'm)\n"
  2033. " (string-append option \"=m\"))\n"
  2034. " ((option . #true)\n"
  2035. " (string-append option \"=y\"))\n"
  2036. " ((option . #false)\n"
  2037. " (string-append option \"=n\")))\n"
  2038. " options)\n"
  2039. " \"\\n\"))\n"
  2040. msgstr ""
  2041. #. type: Plain text
  2042. #: guix-git/doc/guix-cookbook.texi:1546
  2043. msgid "And in the custom configure script from the `make-linux-libre` package:"
  2044. msgstr ""
  2045. #. type: lisp
  2046. #: guix-git/doc/guix-cookbook.texi:1554
  2047. #, no-wrap
  2048. msgid ""
  2049. ";; Appending works even when the option wasn't in the\n"
  2050. ";; file. The last one prevails if duplicated.\n"
  2051. "(let ((port (open-file \".config\" \"a\"))\n"
  2052. " (extra-configuration ,(config->string extra-options)))\n"
  2053. " (display extra-configuration port)\n"
  2054. " (close-port port))\n"
  2055. "\n"
  2056. msgstr ""
  2057. #. type: lisp
  2058. #: guix-git/doc/guix-cookbook.texi:1556
  2059. #, no-wrap
  2060. msgid "(invoke \"make\" \"oldconfig\")\n"
  2061. msgstr ""
  2062. #. type: Plain text
  2063. #: guix-git/doc/guix-cookbook.texi:1561
  2064. 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:"
  2065. msgstr ""
  2066. #. type: lisp
  2067. #: guix-git/doc/guix-cookbook.texi:1569
  2068. #, no-wrap
  2069. msgid ""
  2070. "(define %macbook41-full-config\n"
  2071. " (append %macbook41-config-options\n"
  2072. " %file-systems\n"
  2073. " %efi-support\n"
  2074. " %emulation\n"
  2075. " (@@@@ (gnu packages linux) %default-extra-linux-options)))\n"
  2076. "\n"
  2077. msgstr ""
  2078. #. type: lisp
  2079. #: guix-git/doc/guix-cookbook.texi:1579
  2080. #, no-wrap
  2081. msgid ""
  2082. "(define-public linux-libre-macbook41\n"
  2083. " ;; XXX: Access the internal 'make-linux-libre' procedure, which is\n"
  2084. " ;; private and unexported, and is liable to change in the future.\n"
  2085. " ((@@@@ (gnu packages linux) make-linux-libre) (@@@@ (gnu packages linux) %linux-libre-version)\n"
  2086. " (@@@@ (gnu packages linux) %linux-libre-hash)\n"
  2087. " '(\"x86_64-linux\")\n"
  2088. " #:extra-version \"macbook41\"\n"
  2089. " #:patches (@@@@ (gnu packages linux) %linux-libre-5.1-patches)\n"
  2090. " #:extra-options %macbook41-config-options))\n"
  2091. msgstr ""
  2092. #. type: Plain text
  2093. #: guix-git/doc/guix-cookbook.texi:1586
  2094. 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."
  2095. msgstr ""
  2096. #. type: Plain text
  2097. #: guix-git/doc/guix-cookbook.texi:1595
  2098. 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."
  2099. msgstr ""
  2100. #. type: Plain text
  2101. #: guix-git/doc/guix-cookbook.texi:1598
  2102. msgid "In order to actually run @code{make localmodconfig} we first need to get and unpack the kernel source code:"
  2103. msgstr ""
  2104. #. type: example
  2105. #: guix-git/doc/guix-cookbook.texi:1601
  2106. #, no-wrap
  2107. msgid "tar xf $(guix build linux-libre --source)\n"
  2108. msgstr ""
  2109. #. type: Plain text
  2110. #: guix-git/doc/guix-cookbook.texi:1608
  2111. 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:"
  2112. msgstr ""
  2113. #. type: example
  2114. #: guix-git/doc/guix-cookbook.texi:1611
  2115. #, no-wrap
  2116. msgid "guix environment linux-libre -- make localmodconfig\n"
  2117. msgstr ""
  2118. #. type: Plain text
  2119. #: guix-git/doc/guix-cookbook.texi:1616
  2120. 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:"
  2121. msgstr ""
  2122. #. type: example
  2123. #: guix-git/doc/guix-cookbook.texi:1619
  2124. #, no-wrap
  2125. msgid "module pcspkr did not have configs CONFIG_INPUT_PCSPKR\n"
  2126. msgstr ""
  2127. #. type: Plain text
  2128. #: guix-git/doc/guix-cookbook.texi:1624
  2129. 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:"
  2130. msgstr ""
  2131. #. type: example
  2132. #: guix-git/doc/guix-cookbook.texi:1628
  2133. #, no-wrap
  2134. msgid ""
  2135. "CONFIG_INPUT_PCSPKR=m\n"
  2136. "CONFIG_VIRTIO=m\n"
  2137. msgstr ""
  2138. #. type: Plain text
  2139. #: guix-git/doc/guix-cookbook.texi:1637
  2140. 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."
  2141. msgstr ""
  2142. #. type: Plain text
  2143. #: guix-git/doc/guix-cookbook.texi:1641
  2144. 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."
  2145. msgstr ""
  2146. #. type: Plain text
  2147. #: guix-git/doc/guix-cookbook.texi:1649
  2148. 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."
  2149. msgstr ""
  2150. #. type: Plain text
  2151. #: guix-git/doc/guix-cookbook.texi:1654
  2152. 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."
  2153. msgstr ""
  2154. #. type: Plain text
  2155. #: guix-git/doc/guix-cookbook.texi:1661
  2156. 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."
  2157. msgstr ""
  2158. #. type: Plain text
  2159. #: guix-git/doc/guix-cookbook.texi:1667
  2160. 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."
  2161. msgstr ""
  2162. #. type: Plain text
  2163. #: guix-git/doc/guix-cookbook.texi:1672
  2164. 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."
  2165. msgstr ""
  2166. #. type: lisp
  2167. #: guix-git/doc/guix-cookbook.texi:1694
  2168. #, no-wrap
  2169. msgid ""
  2170. "(define-record-type* <image>\n"
  2171. " image make-image\n"
  2172. " image?\n"
  2173. " (name image-name ;symbol\n"
  2174. " (default #f))\n"
  2175. " (format image-format) ;symbol\n"
  2176. " (target image-target\n"
  2177. " (default #f))\n"
  2178. " (size image-size ;size in bytes as integer\n"
  2179. " (default 'guess))\n"
  2180. " (operating-system image-operating-system ;<operating-system>\n"
  2181. " (default #f))\n"
  2182. " (partitions image-partitions ;list of <partition>\n"
  2183. " (default '()))\n"
  2184. " (compression? image-compression? ;boolean\n"
  2185. " (default #t))\n"
  2186. " (volatile-root? image-volatile-root? ;boolean\n"
  2187. " (default #t))\n"
  2188. " (substitutable? image-substitutable? ;boolean\n"
  2189. " (default #t)))\n"
  2190. msgstr ""
  2191. #. type: Plain text
  2192. #: guix-git/doc/guix-cookbook.texi:1700
  2193. 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."
  2194. msgstr ""
  2195. #. type: Plain text
  2196. #: guix-git/doc/guix-cookbook.texi:1703
  2197. msgid "A new directory in the Guix sources is dedicated to images definition. For now there are four files:"
  2198. msgstr ""
  2199. #. type: file{#1}
  2200. #: guix-git/doc/guix-cookbook.texi:1705
  2201. #, no-wrap
  2202. msgid "gnu/system/images/hurd.scm"
  2203. msgstr ""
  2204. #. type: file{#1}
  2205. #: guix-git/doc/guix-cookbook.texi:1706
  2206. #, no-wrap
  2207. msgid "gnu/system/images/pine64.scm"
  2208. msgstr ""
  2209. #. type: file{#1}
  2210. #: guix-git/doc/guix-cookbook.texi:1707
  2211. #, no-wrap
  2212. msgid "gnu/system/images/novena.scm"
  2213. msgstr ""
  2214. #. type: file{#1}
  2215. #: guix-git/doc/guix-cookbook.texi:1708
  2216. #, no-wrap
  2217. msgid "gnu/system/images/pinebook-pro.scm"
  2218. msgstr ""
  2219. #. type: Plain text
  2220. #: guix-git/doc/guix-cookbook.texi:1714
  2221. 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."
  2222. msgstr ""
  2223. #. type: lisp
  2224. #: guix-git/doc/guix-cookbook.texi:1738
  2225. #, no-wrap
  2226. msgid ""
  2227. "(define pine64-barebones-os\n"
  2228. " (operating-system\n"
  2229. " (host-name \"vignemale\")\n"
  2230. " (timezone \"Europe/Paris\")\n"
  2231. " (locale \"en_US.utf8\")\n"
  2232. " (bootloader (bootloader-configuration\n"
  2233. " (bootloader u-boot-pine64-lts-bootloader)\n"
  2234. " (targets '(\"/dev/vda\"))))\n"
  2235. " (initrd-modules '())\n"
  2236. " (kernel linux-libre-arm64-generic)\n"
  2237. " (file-systems (cons (file-system\n"
  2238. " (device (file-system-label \"my-root\"))\n"
  2239. " (mount-point \"/\")\n"
  2240. " (type \"ext4\"))\n"
  2241. " %base-file-systems))\n"
  2242. " (services (cons (service agetty-service-type\n"
  2243. " (agetty-configuration\n"
  2244. " (extra-options '(\"-L\")) ; no carrier detect\n"
  2245. " (baud-rate \"115200\")\n"
  2246. " (term \"vt100\")\n"
  2247. " (tty \"ttyS0\")))\n"
  2248. " %base-services))))\n"
  2249. msgstr ""
  2250. #. type: Plain text
  2251. #: guix-git/doc/guix-cookbook.texi:1742
  2252. msgid "The @code{kernel} and @code{bootloader} fields are pointing to packages dedicated to this board."
  2253. msgstr ""
  2254. #. type: Plain text
  2255. #: guix-git/doc/guix-cookbook.texi:1744
  2256. msgid "Right below, the @code{pine64-image-type} variable is also defined."
  2257. msgstr ""
  2258. #. type: lisp
  2259. #: guix-git/doc/guix-cookbook.texi:1750
  2260. #, no-wrap
  2261. msgid ""
  2262. "(define pine64-image-type\n"
  2263. " (image-type\n"
  2264. " (name 'pine64-raw)\n"
  2265. " (constructor (cut image-with-os arm64-disk-image <>))))\n"
  2266. msgstr ""
  2267. #. type: Plain text
  2268. #: guix-git/doc/guix-cookbook.texi:1754
  2269. msgid "It's using a record we haven't talked about yet, the @code{image-type} record, defined this way:"
  2270. msgstr ""
  2271. #. type: lisp
  2272. #: guix-git/doc/guix-cookbook.texi:1761
  2273. #, no-wrap
  2274. msgid ""
  2275. "(define-record-type* <image-type>\n"
  2276. " image-type make-image-type\n"
  2277. " image-type?\n"
  2278. " (name image-type-name) ;symbol\n"
  2279. " (constructor image-type-constructor)) ;<operating-system> -> <image>\n"
  2280. msgstr ""
  2281. #. type: Plain text
  2282. #: guix-git/doc/guix-cookbook.texi:1767
  2283. 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:"
  2284. msgstr ""
  2285. #. type: example
  2286. #: guix-git/doc/guix-cookbook.texi:1770
  2287. #, no-wrap
  2288. msgid "guix system image my-os.scm\n"
  2289. msgstr ""
  2290. #. type: Plain text
  2291. #: guix-git/doc/guix-cookbook.texi:1776
  2292. 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:"
  2293. msgstr ""
  2294. #. type: example
  2295. #: guix-git/doc/guix-cookbook.texi:1779
  2296. #, no-wrap
  2297. msgid "guix system image --image-type=pine64-raw my-os.scm\n"
  2298. msgstr ""
  2299. #. type: Plain text
  2300. #: guix-git/doc/guix-cookbook.texi:1785
  2301. 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."
  2302. msgstr ""
  2303. #. type: Plain text
  2304. #: guix-git/doc/guix-cookbook.texi:1787
  2305. msgid "The resulting image looks like:"
  2306. msgstr ""
  2307. #. type: lisp
  2308. #: guix-git/doc/guix-cookbook.texi:1797
  2309. #, no-wrap
  2310. msgid ""
  2311. "(image\n"
  2312. " (format 'disk-image)\n"
  2313. " (target \"aarch64-linux-gnu\")\n"
  2314. " (operating-system my-os)\n"
  2315. " (partitions\n"
  2316. " (list (partition\n"
  2317. " (inherit root-partition)\n"
  2318. " (offset root-offset)))))\n"
  2319. msgstr ""
  2320. #. type: Plain text
  2321. #: guix-git/doc/guix-cookbook.texi:1801
  2322. msgid "which is the aggregation of the @code{operating-system} defined in @code{my-os.scm} to the @code{arm64-disk-image} record."
  2323. msgstr ""
  2324. #. type: Plain text
  2325. #: guix-git/doc/guix-cookbook.texi:1803
  2326. msgid "But enough Scheme madness. What does this image API bring to the Guix user?"
  2327. msgstr ""
  2328. #. type: Plain text
  2329. #: guix-git/doc/guix-cookbook.texi:1805
  2330. msgid "One can run:"
  2331. msgstr ""
  2332. #. type: example
  2333. #: guix-git/doc/guix-cookbook.texi:1809
  2334. #, no-wrap
  2335. msgid ""
  2336. "mathieu@@cervin:~$ guix system --list-image-types\n"
  2337. "The available image types are:\n"
  2338. "\n"
  2339. msgstr ""
  2340. #. type: example
  2341. #: guix-git/doc/guix-cookbook.texi:1821
  2342. #, no-wrap
  2343. msgid ""
  2344. " - pinebook-pro-raw\n"
  2345. " - pine64-raw\n"
  2346. " - novena-raw\n"
  2347. " - hurd-raw\n"
  2348. " - hurd-qcow2\n"
  2349. " - qcow2\n"
  2350. " - uncompressed-iso9660\n"
  2351. " - efi-raw\n"
  2352. " - arm64-raw\n"
  2353. " - arm32-raw\n"
  2354. " - iso9660\n"
  2355. msgstr ""
  2356. #. type: Plain text
  2357. #: guix-git/doc/guix-cookbook.texi:1826
  2358. 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:"
  2359. msgstr ""
  2360. #. type: lisp
  2361. #: guix-git/doc/guix-cookbook.texi:1830
  2362. #, no-wrap
  2363. msgid ""
  2364. "(use-modules (gnu services linux)\n"
  2365. " (gnu system images pine64))\n"
  2366. "\n"
  2367. msgstr ""
  2368. #. type: lisp
  2369. #: guix-git/doc/guix-cookbook.texi:1841
  2370. #, no-wrap
  2371. msgid ""
  2372. "(let ((base-os pine64-barebones-os))\n"
  2373. " (operating-system\n"
  2374. " (inherit base-os)\n"
  2375. " (timezone \"America/Indiana/Indianapolis\")\n"
  2376. " (services\n"
  2377. " (cons\n"
  2378. " (service earlyoom-service-type\n"
  2379. " (earlyoom-configuration\n"
  2380. " (prefer-regexp \"icecat|chromium\")))\n"
  2381. " (operating-system-user-services base-os)))))\n"
  2382. msgstr ""
  2383. #. type: Plain text
  2384. #: guix-git/doc/guix-cookbook.texi:1844
  2385. msgid "run:"
  2386. msgstr ""
  2387. #. type: example
  2388. #: guix-git/doc/guix-cookbook.texi:1847
  2389. #, no-wrap
  2390. msgid "guix system image --image-type=pine64-raw my-pine-os.scm\n"
  2391. msgstr ""
  2392. #. type: Plain text
  2393. #: guix-git/doc/guix-cookbook.texi:1850
  2394. msgid "or,"
  2395. msgstr ""
  2396. #. type: example
  2397. #: guix-git/doc/guix-cookbook.texi:1853
  2398. #, no-wrap
  2399. msgid "guix system image --image-type=hurd-raw my-hurd-os.scm\n"
  2400. msgstr ""
  2401. #. type: Plain text
  2402. #: guix-git/doc/guix-cookbook.texi:1857
  2403. msgid "to get an image that can be written directly to a hard drive and booted from."
  2404. msgstr ""
  2405. #. type: Plain text
  2406. #: guix-git/doc/guix-cookbook.texi:1859
  2407. msgid "Without changing anything to @code{my-hurd-os.scm}, calling:"
  2408. msgstr ""
  2409. #. type: example
  2410. #: guix-git/doc/guix-cookbook.texi:1862
  2411. #, no-wrap
  2412. msgid "guix system image --image-type=hurd-qcow2 my-hurd-os.scm\n"
  2413. msgstr ""
  2414. #. type: Plain text
  2415. #: guix-git/doc/guix-cookbook.texi:1865
  2416. msgid "will instead produce a Hurd QEMU image."
  2417. msgstr ""
  2418. #. type: Plain text
  2419. #: guix-git/doc/guix-cookbook.texi:1872
  2420. 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})."
  2421. msgstr ""
  2422. #. type: Plain text
  2423. #: guix-git/doc/guix-cookbook.texi:1876
  2424. 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:"
  2425. msgstr ""
  2426. #. type: lisp
  2427. #: guix-git/doc/guix-cookbook.texi:1881
  2428. #, no-wrap
  2429. msgid ""
  2430. "(use-modules (gnu))\n"
  2431. "(use-service-modules desktop)\n"
  2432. "(use-package-modules vpn)\n"
  2433. "\n"
  2434. msgstr ""
  2435. #. type: lisp
  2436. #: guix-git/doc/guix-cookbook.texi:1890
  2437. #, no-wrap
  2438. msgid ""
  2439. "(operating-system\n"
  2440. " ;; …\n"
  2441. " (services (cons (simple-service 'wireguard-module\n"
  2442. " kernel-module-loader-service-type\n"
  2443. " '(\"wireguard\"))\n"
  2444. " %desktop-services))\n"
  2445. " (packages (cons wireguard-tools %base-packages))\n"
  2446. " (kernel-loadable-modules (list wireguard-linux-compat)))\n"
  2447. msgstr ""
  2448. #. type: Plain text
  2449. #: guix-git/doc/guix-cookbook.texi:1894
  2450. msgid "After reconfiguring and restarting your system you can either use Wireguard tools or NetworkManager to connect to a VPN server."
  2451. msgstr ""
  2452. #. type: subsection
  2453. #: guix-git/doc/guix-cookbook.texi:1895
  2454. #, no-wrap
  2455. msgid "Using Wireguard tools"
  2456. msgstr ""
  2457. #. type: Plain text
  2458. #: guix-git/doc/guix-cookbook.texi:1901
  2459. 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."
  2460. msgstr ""
  2461. #. type: quotation
  2462. #: guix-git/doc/guix-cookbook.texi:1902
  2463. #, no-wrap
  2464. msgid "Note"
  2465. msgstr ""
  2466. #. type: quotation
  2467. #: guix-git/doc/guix-cookbook.texi:1905
  2468. msgid "Be warned that the author described this command as a: “[…] very quick and dirty bash script […]”."
  2469. msgstr ""
  2470. #. type: subsection
  2471. #: guix-git/doc/guix-cookbook.texi:1907
  2472. #, no-wrap
  2473. msgid "Using NetworkManager"
  2474. msgstr ""
  2475. #. type: Plain text
  2476. #: guix-git/doc/guix-cookbook.texi:1915
  2477. 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."
  2478. msgstr ""
  2479. #. type: Plain text
  2480. #: guix-git/doc/guix-cookbook.texi:1917
  2481. msgid "To import your VPN configuration execute nmcli import command:"
  2482. msgstr ""
  2483. #. type: example
  2484. #: guix-git/doc/guix-cookbook.texi:1921
  2485. #, no-wrap
  2486. msgid ""
  2487. "# nmcli connection import type wireguard file wg0.conf\n"
  2488. "Connection 'wg0' (edbee261-aa5a-42db-b032-6c7757c60fde) successfully added\n"
  2489. msgstr ""
  2490. #. type: Plain text
  2491. #: guix-git/doc/guix-cookbook.texi:1926
  2492. msgid "This will create a configuration file in @file{/etc/NetworkManager/wg0.nmconnection}. Next connect to the Wireguard server:"
  2493. msgstr ""
  2494. #. type: example
  2495. #: guix-git/doc/guix-cookbook.texi:1930
  2496. #, no-wrap
  2497. msgid ""
  2498. "$ nmcli connection up wg0\n"
  2499. "Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6)\n"
  2500. msgstr ""
  2501. #. type: Plain text
  2502. #: guix-git/doc/guix-cookbook.texi:1934
  2503. msgid "By default NetworkManager will connect automatically on system boot. To change that behaviour you need to edit your config:"
  2504. msgstr ""
  2505. #. type: example
  2506. #: guix-git/doc/guix-cookbook.texi:1937
  2507. #, no-wrap
  2508. msgid "# nmcli connection modify wg0 connection.autoconnect no\n"
  2509. msgstr ""
  2510. #. type: Plain text
  2511. #: guix-git/doc/guix-cookbook.texi:1942
  2512. 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}."
  2513. msgstr ""
  2514. #. type: cindex
  2515. #: guix-git/doc/guix-cookbook.texi:1945
  2516. #, no-wrap
  2517. msgid "wm"
  2518. msgstr ""
  2519. #. type: subsection
  2520. #: guix-git/doc/guix-cookbook.texi:1947 guix-git/doc/guix-cookbook.texi:1948
  2521. #, no-wrap
  2522. msgid "StumpWM"
  2523. msgstr ""
  2524. #. type: cindex
  2525. #: guix-git/doc/guix-cookbook.texi:1949
  2526. #, no-wrap
  2527. msgid "stumpwm"
  2528. msgstr ""
  2529. #. type: Plain text
  2530. #: guix-git/doc/guix-cookbook.texi:1954
  2531. 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}."
  2532. msgstr ""
  2533. #. type: Plain text
  2534. #: guix-git/doc/guix-cookbook.texi:1956
  2535. msgid "An example configuration can look like this:"
  2536. msgstr ""
  2537. #. type: lisp
  2538. #: guix-git/doc/guix-cookbook.texi:1960
  2539. #, no-wrap
  2540. msgid ""
  2541. "(use-modules (gnu))\n"
  2542. "(use-package-modules wm)\n"
  2543. "\n"
  2544. msgstr ""
  2545. #. type: lisp
  2546. #: guix-git/doc/guix-cookbook.texi:1965
  2547. #, no-wrap
  2548. msgid ""
  2549. "(operating-system\n"
  2550. " ;; …\n"
  2551. " (packages (append (list sbcl stumpwm `(,stumpwm \"lib\"))\n"
  2552. " %base-packages)))\n"
  2553. msgstr ""
  2554. #. type: cindex
  2555. #: guix-git/doc/guix-cookbook.texi:1967
  2556. #, no-wrap
  2557. msgid "stumpwm fonts"
  2558. msgstr ""
  2559. #. type: Plain text
  2560. #: guix-git/doc/guix-cookbook.texi:1971
  2561. 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:"
  2562. msgstr ""
  2563. #. type: lisp
  2564. #: guix-git/doc/guix-cookbook.texi:1975
  2565. #, no-wrap
  2566. msgid ""
  2567. "(use-modules (gnu))\n"
  2568. "(use-package-modules fonts wm)\n"
  2569. "\n"
  2570. msgstr ""
  2571. #. type: lisp
  2572. #: guix-git/doc/guix-cookbook.texi:1980
  2573. #, no-wrap
  2574. msgid ""
  2575. "(operating-system\n"
  2576. " ;; …\n"
  2577. " (packages (append (list sbcl stumpwm `(,stumpwm \"lib\"))\n"
  2578. " sbcl-ttf-fonts font-dejavu %base-packages)))\n"
  2579. msgstr ""
  2580. #. type: Plain text
  2581. #: guix-git/doc/guix-cookbook.texi:1984
  2582. msgid "Then you need to add the following code to a StumpWM configuration file @file{~/.stumpwm.d/init.lisp}:"
  2583. msgstr ""
  2584. #. type: lisp
  2585. #: guix-git/doc/guix-cookbook.texi:1991
  2586. #, no-wrap
  2587. msgid ""
  2588. "(require :ttf-fonts)\n"
  2589. "(setf xft:*font-dirs* '(\"/run/current-system/profile/share/fonts/\"))\n"
  2590. "(setf clx-truetype:+font-cache-filename+ (concat (getenv \"HOME\") \"/.fonts/font-cache.sexp\"))\n"
  2591. "(xft:cache-fonts)\n"
  2592. "(set-font (make-instance 'xft:font :family \"DejaVu Sans Mono\" :subfamily \"Book\" :size 11))\n"
  2593. msgstr ""
  2594. #. type: subsection
  2595. #: guix-git/doc/guix-cookbook.texi:1993 guix-git/doc/guix-cookbook.texi:1994
  2596. #, no-wrap
  2597. msgid "Session lock"
  2598. msgstr ""
  2599. #. type: cindex
  2600. #: guix-git/doc/guix-cookbook.texi:1995
  2601. #, no-wrap
  2602. msgid "sessionlock"
  2603. msgstr ""
  2604. #. type: Plain text
  2605. #: guix-git/doc/guix-cookbook.texi:2001
  2606. 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."
  2607. msgstr ""
  2608. #. type: subsubsection
  2609. #: guix-git/doc/guix-cookbook.texi:2002 guix-git/doc/guix-cookbook.texi:2003
  2610. #, no-wrap
  2611. msgid "Xorg"
  2612. msgstr ""
  2613. #. type: Plain text
  2614. #: guix-git/doc/guix-cookbook.texi:2009
  2615. 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."
  2616. msgstr ""
  2617. #. type: Plain text
  2618. #: guix-git/doc/guix-cookbook.texi:2012
  2619. 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}:"
  2620. msgstr ""
  2621. #. type: example
  2622. #: guix-git/doc/guix-cookbook.texi:2016
  2623. #, no-wrap
  2624. msgid ""
  2625. "xss-lock -- slock &\n"
  2626. "exec stumpwm\n"
  2627. msgstr ""
  2628. #. type: Plain text
  2629. #: guix-git/doc/guix-cookbook.texi:2020
  2630. 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."
  2631. msgstr ""
  2632. #. type: Plain text
  2633. #: guix-git/doc/guix-cookbook.texi:2024
  2634. 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}:"
  2635. msgstr ""
  2636. #. type: lisp
  2637. #: guix-git/doc/guix-cookbook.texi:2027
  2638. #, no-wrap
  2639. msgid "(screen-locker-service slock)\n"
  2640. msgstr ""
  2641. #. type: Plain text
  2642. #: guix-git/doc/guix-cookbook.texi:2033
  2643. 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."
  2644. msgstr ""
  2645. #. type: cindex
  2646. #: guix-git/doc/guix-cookbook.texi:2036
  2647. #, no-wrap
  2648. msgid "linode, Linode"
  2649. msgstr ""
  2650. #. type: Plain text
  2651. #: guix-git/doc/guix-cookbook.texi:2041
  2652. 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."
  2653. msgstr ""
  2654. #. type: example
  2655. #: guix-git/doc/guix-cookbook.texi:2044
  2656. #, no-wrap
  2657. msgid "ssh-keygen\n"
  2658. msgstr ""
  2659. #. type: Plain text
  2660. #: guix-git/doc/guix-cookbook.texi:2050
  2661. 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:"
  2662. msgstr ""
  2663. #. type: example
  2664. #: guix-git/doc/guix-cookbook.texi:2053
  2665. #, no-wrap
  2666. msgid "cat ~/.ssh/<username>_rsa.pub\n"
  2667. msgstr ""
  2668. #. type: Plain text
  2669. #: guix-git/doc/guix-cookbook.texi:2056
  2670. msgid "Power the Linode down."
  2671. msgstr ""
  2672. #. type: Plain text
  2673. #: guix-git/doc/guix-cookbook.texi:2060
  2674. 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:"
  2675. msgstr ""
  2676. #. type: itemize
  2677. #: guix-git/doc/guix-cookbook.texi:2064
  2678. msgid "Label: \"Guix\""
  2679. msgstr ""
  2680. #. type: itemize
  2681. #: guix-git/doc/guix-cookbook.texi:2067
  2682. msgid "Filesystem: ext4"
  2683. msgstr ""
  2684. #. type: itemize
  2685. #: guix-git/doc/guix-cookbook.texi:2070
  2686. msgid "Set it to the remaining size"
  2687. msgstr ""
  2688. #. type: Plain text
  2689. #: guix-git/doc/guix-cookbook.texi:2075
  2690. 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."
  2691. msgstr ""
  2692. #. type: Plain text
  2693. #: guix-git/doc/guix-cookbook.texi:2077
  2694. msgid "Now \"Add a Configuration\", with the following:"
  2695. msgstr ""
  2696. #. type: itemize
  2697. #: guix-git/doc/guix-cookbook.texi:2080
  2698. msgid "Label: Guix"
  2699. msgstr ""
  2700. #. type: itemize
  2701. #: guix-git/doc/guix-cookbook.texi:2083
  2702. msgid "Kernel:GRUB 2 (it's at the bottom! This step is @b{IMPORTANT!})"
  2703. msgstr ""
  2704. #. type: itemize
  2705. #: guix-git/doc/guix-cookbook.texi:2086
  2706. msgid "Block device assignment:"
  2707. msgstr ""
  2708. #. type: itemize
  2709. #: guix-git/doc/guix-cookbook.texi:2089
  2710. msgid "@file{/dev/sda}: Guix"
  2711. msgstr ""
  2712. #. type: itemize
  2713. #: guix-git/doc/guix-cookbook.texi:2092
  2714. msgid "@file{/dev/sdb}: swap"
  2715. msgstr ""
  2716. #. type: itemize
  2717. #: guix-git/doc/guix-cookbook.texi:2095
  2718. msgid "Root device: @file{/dev/sda}"
  2719. msgstr ""
  2720. #. type: itemize
  2721. #: guix-git/doc/guix-cookbook.texi:2098
  2722. msgid "Turn off all the filesystem/boot helpers"
  2723. msgstr ""
  2724. #. type: Plain text
  2725. #: guix-git/doc/guix-cookbook.texi:2105
  2726. 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:"
  2727. msgstr ""
  2728. #. type: example
  2729. #: guix-git/doc/guix-cookbook.texi:2113
  2730. #, no-wrap
  2731. msgid ""
  2732. "sudo apt-get install gpg\n"
  2733. "wget https://sv.gnu.org/people/viewgpg.php?user_id=15145 -qO - | gpg --import -\n"
  2734. "wget https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh\n"
  2735. "chmod +x guix-install.sh\n"
  2736. "./guix-install.sh\n"
  2737. "guix pull\n"
  2738. msgstr ""
  2739. #. type: Plain text
  2740. #: guix-git/doc/guix-cookbook.texi:2117
  2741. 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}."
  2742. msgstr ""
  2743. #. type: lisp
  2744. #: guix-git/doc/guix-cookbook.texi:2128
  2745. #, no-wrap
  2746. msgid ""
  2747. "(use-modules (gnu)\n"
  2748. " (guix modules))\n"
  2749. "(use-service-modules networking\n"
  2750. " ssh)\n"
  2751. "(use-package-modules admin\n"
  2752. " certs\n"
  2753. " package-management\n"
  2754. " ssh\n"
  2755. " tls)\n"
  2756. "\n"
  2757. msgstr ""
  2758. #. type: lisp
  2759. #: guix-git/doc/guix-cookbook.texi:2145
  2760. #, no-wrap
  2761. msgid ""
  2762. "(operating-system\n"
  2763. " (host-name \"my-server\")\n"
  2764. " (timezone \"America/New_York\")\n"
  2765. " (locale \"en_US.UTF-8\")\n"
  2766. " ;; This goofy code will generate the grub.cfg\n"
  2767. " ;; without installing the grub bootloader on disk.\n"
  2768. " (bootloader (bootloader-configuration\n"
  2769. " (bootloader\n"
  2770. " (bootloader\n"
  2771. " (inherit grub-bootloader)\n"
  2772. " (installer #~(const #true))))))\n"
  2773. " (file-systems (cons (file-system\n"
  2774. " (device \"/dev/sda\")\n"
  2775. " (mount-point \"/\")\n"
  2776. " (type \"ext4\"))\n"
  2777. " %base-file-systems))\n"
  2778. "\n"
  2779. msgstr ""
  2780. #. type: lisp
  2781. #: guix-git/doc/guix-cookbook.texi:2148
  2782. #, no-wrap
  2783. msgid ""
  2784. " (swap-devices (list \"/dev/sdb\"))\n"
  2785. "\n"
  2786. msgstr ""
  2787. #. type: lisp
  2788. #: guix-git/doc/guix-cookbook.texi:2152
  2789. #, no-wrap
  2790. msgid ""
  2791. " (initrd-modules (cons \"virtio_scsi\" ; Needed to find the disk\n"
  2792. " %base-initrd-modules))\n"
  2793. "\n"
  2794. msgstr ""
  2795. #. type: lisp
  2796. #: guix-git/doc/guix-cookbook.texi:2161
  2797. #, no-wrap
  2798. msgid ""
  2799. " (users (cons (user-account\n"
  2800. " (name \"janedoe\")\n"
  2801. " (group \"users\")\n"
  2802. " ;; Adding the account to the \"wheel\" group\n"
  2803. " ;; makes it a sudoer.\n"
  2804. " (supplementary-groups '(\"wheel\"))\n"
  2805. " (home-directory \"/home/janedoe\"))\n"
  2806. " %base-user-accounts))\n"
  2807. "\n"
  2808. msgstr ""
  2809. #. type: lisp
  2810. #: guix-git/doc/guix-cookbook.texi:2165
  2811. #, no-wrap
  2812. msgid ""
  2813. " (packages (cons* nss-certs ;for HTTPS access\n"
  2814. " openssh-sans-x\n"
  2815. " %base-packages))\n"
  2816. "\n"
  2817. msgstr ""
  2818. #. type: lisp
  2819. #: guix-git/doc/guix-cookbook.texi:2176
  2820. #, no-wrap
  2821. msgid ""
  2822. " (services (cons*\n"
  2823. " (service dhcp-client-service-type)\n"
  2824. " (service openssh-service-type\n"
  2825. " (openssh-configuration\n"
  2826. " (openssh openssh-sans-x)\n"
  2827. " (password-authentication? #false)\n"
  2828. " (authorized-keys\n"
  2829. " `((\"janedoe\" ,(local-file \"janedoe_rsa.pub\"))\n"
  2830. " (\"root\" ,(local-file \"janedoe_rsa.pub\"))))))\n"
  2831. " %base-services)))\n"
  2832. msgstr ""
  2833. #. type: Plain text
  2834. #: guix-git/doc/guix-cookbook.texi:2179
  2835. msgid "Replace the following fields in the above configuration:"
  2836. msgstr ""
  2837. #. type: lisp
  2838. #: guix-git/doc/guix-cookbook.texi:2187
  2839. #, no-wrap
  2840. msgid ""
  2841. "(host-name \"my-server\") ; replace with your server name\n"
  2842. "; if you chose a linode server outside the U.S., then\n"
  2843. "; use tzselect to find a correct timezone string\n"
  2844. "(timezone \"America/New_York\") ; if needed replace timezone\n"
  2845. "(name \"janedoe\") ; replace with your username\n"
  2846. "(\"janedoe\" ,(local-file \"janedoe_rsa.pub\")) ; replace with your ssh key\n"
  2847. "(\"root\" ,(local-file \"janedoe_rsa.pub\")) ; replace with your ssh key\n"
  2848. msgstr ""
  2849. #. type: Plain text
  2850. #: guix-git/doc/guix-cookbook.texi:2194
  2851. 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."
  2852. msgstr ""
  2853. #. type: Plain text
  2854. #: guix-git/doc/guix-cookbook.texi:2199
  2855. 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."
  2856. msgstr ""
  2857. #. type: example
  2858. #: guix-git/doc/guix-cookbook.texi:2204
  2859. #, no-wrap
  2860. msgid ""
  2861. "sftp root@@<remote server ip address>\n"
  2862. "put /path/to/files/<username>_rsa.pub .\n"
  2863. "put /path/to/files/guix-config.scm .\n"
  2864. msgstr ""
  2865. #. type: Plain text
  2866. #: guix-git/doc/guix-cookbook.texi:2207
  2867. msgid "In your first terminal, mount the guix drive:"
  2868. msgstr ""
  2869. #. type: example
  2870. #: guix-git/doc/guix-cookbook.texi:2211
  2871. #, no-wrap
  2872. msgid ""
  2873. "mkdir /mnt/guix\n"
  2874. "mount /dev/sdc /mnt/guix\n"
  2875. msgstr ""
  2876. #. type: Plain text
  2877. #: guix-git/doc/guix-cookbook.texi:2216
  2878. 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:"
  2879. msgstr ""
  2880. #. type: example
  2881. #: guix-git/doc/guix-cookbook.texi:2220
  2882. #, no-wrap
  2883. msgid ""
  2884. "mkdir -p /mnt/guix/boot/grub\n"
  2885. "cp -r /boot/grub/* /mnt/guix/boot/grub/\n"
  2886. msgstr ""
  2887. #. type: Plain text
  2888. #: guix-git/doc/guix-cookbook.texi:2223
  2889. msgid "Now initialize the Guix installation:"
  2890. msgstr ""
  2891. #. type: example
  2892. #: guix-git/doc/guix-cookbook.texi:2226
  2893. #, no-wrap
  2894. msgid "guix system init guix-config.scm /mnt/guix\n"
  2895. msgstr ""
  2896. #. type: Plain text
  2897. #: guix-git/doc/guix-cookbook.texi:2230
  2898. msgid "Ok, power it down! Now from the Linode console, select boot and select \"Guix\"."
  2899. msgstr ""
  2900. #. type: Plain text
  2901. #: guix-git/doc/guix-cookbook.texi:2233
  2902. 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:"
  2903. msgstr ""
  2904. #. type: example
  2905. #: guix-git/doc/guix-cookbook.texi:2249
  2906. #, no-wrap
  2907. msgid ""
  2908. "$ ssh root@@<server ip address>\n"
  2909. "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
  2910. "@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\n"
  2911. "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
  2912. "IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\n"
  2913. "Someone could be eavesdropping on you right now (man-in-the-middle attack)!\n"
  2914. "It is also possible that a host key has just been changed.\n"
  2915. "The fingerprint for the ECDSA key sent by the remote host is\n"
  2916. "SHA256:0B+wp33w57AnKQuHCvQP0+ZdKaqYrI/kyU7CfVbS7R4.\n"
  2917. "Please contact your system administrator.\n"
  2918. "Add correct host key in /home/joshua/.ssh/known_hosts to get rid of this message.\n"
  2919. "Offending ECDSA key in /home/joshua/.ssh/known_hosts:3\n"
  2920. "ECDSA host key for 198.58.98.76 has changed and you have requested strict checking.\n"
  2921. "Host key verification failed.\n"
  2922. msgstr ""
  2923. #. type: Plain text
  2924. #: guix-git/doc/guix-cookbook.texi:2253
  2925. msgid "Either delete @file{~/.ssh/known_hosts} file, or delete the offending line starting with your server IP address."
  2926. msgstr ""
  2927. #. type: Plain text
  2928. #: guix-git/doc/guix-cookbook.texi:2255
  2929. msgid "Be sure to set your password and root's password."
  2930. msgstr ""
  2931. #. type: example
  2932. #: guix-git/doc/guix-cookbook.texi:2260
  2933. #, no-wrap
  2934. msgid ""
  2935. "ssh root@@<remote ip address>\n"
  2936. "passwd ; for the root password\n"
  2937. "passwd <username> ; for the user password\n"
  2938. msgstr ""
  2939. #. type: Plain text
  2940. #: guix-git/doc/guix-cookbook.texi:2267
  2941. 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."
  2942. msgstr ""
  2943. #. type: Plain text
  2944. #: guix-git/doc/guix-cookbook.texi:2271
  2945. 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!"
  2946. msgstr ""
  2947. #. type: Plain text
  2948. #: guix-git/doc/guix-cookbook.texi:2276
  2949. 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."
  2950. msgstr ""
  2951. #. type: Plain text
  2952. #: guix-git/doc/guix-cookbook.texi:2285
  2953. 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}."
  2954. msgstr ""
  2955. #. type: Plain text
  2956. #: guix-git/doc/guix-cookbook.texi:2288
  2957. 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."
  2958. msgstr ""
  2959. #. type: lisp
  2960. #: guix-git/doc/guix-cookbook.texi:2295
  2961. #, no-wrap
  2962. msgid ""
  2963. "(define source-drive ;; \"source-drive\" can be named anything you want.\n"
  2964. " (file-system\n"
  2965. " (device (uuid \"UUID goes here\"))\n"
  2966. " (mount-point \"/path-to-spinning-disk-goes-here\")\n"
  2967. " (type \"ext4\"))) ;; Make sure to set this to the appropriate type for your drive.\n"
  2968. msgstr ""
  2969. #. type: Plain text
  2970. #: guix-git/doc/guix-cookbook.texi:2299
  2971. msgid "The source folder must also be defined, so that guix will know it's not a regular block device, but a folder."
  2972. msgstr ""
  2973. #. type: lisp
  2974. #: guix-git/doc/guix-cookbook.texi:2301
  2975. #, no-wrap
  2976. msgid "(define (%source-directory) \"/path-to-spinning-disk-goes-here/tmp\") ;; \"source-directory\" can be named any valid variable name.\n"
  2977. msgstr ""
  2978. #. type: Plain text
  2979. #: guix-git/doc/guix-cookbook.texi:2305
  2980. msgid "Finally, inside the @code{file-systems} definition, we must add the mount itself."
  2981. msgstr ""
  2982. #. type: lisp
  2983. #: guix-git/doc/guix-cookbook.texi:2308
  2984. #, no-wrap
  2985. msgid ""
  2986. "(file-systems (cons*\n"
  2987. "\n"
  2988. msgstr ""
  2989. #. type: lisp
  2990. #: guix-git/doc/guix-cookbook.texi:2310
  2991. #, no-wrap
  2992. msgid ""
  2993. " ...<other drives omitted for clarity>...\n"
  2994. "\n"
  2995. msgstr ""
  2996. #. type: lisp
  2997. #: guix-git/doc/guix-cookbook.texi:2312
  2998. #, no-wrap
  2999. msgid ""
  3000. " source-drive ;; Must match the name you gave the source drive in the earlier definition.\n"
  3001. "\n"
  3002. msgstr ""
  3003. #. type: lisp
  3004. #: guix-git/doc/guix-cookbook.texi:2320
  3005. #, no-wrap
  3006. msgid ""
  3007. " (file-system\n"
  3008. " (device (%source-directory)) ;; Make sure \"source-directory\" matches your earlier definition.\n"
  3009. " (mount-point \"/tmp\")\n"
  3010. " (type \"none\") ;; We are mounting a folder, not a partition, so this type needs to be \"none\"\n"
  3011. " (flags '(bind-mount))\n"
  3012. " (dependencies (list source-drive)) ;; Ensure \"source-drive\" matches what you've named the variable for the drive.\n"
  3013. " )\n"
  3014. "\n"
  3015. msgstr ""
  3016. #. type: lisp
  3017. #: guix-git/doc/guix-cookbook.texi:2322
  3018. #, no-wrap
  3019. msgid ""
  3020. " ...<other drives omitted for clarity>...\n"
  3021. "\n"
  3022. msgstr ""
  3023. #. type: lisp
  3024. #: guix-git/doc/guix-cookbook.texi:2324
  3025. #, no-wrap
  3026. msgid " ))\n"
  3027. msgstr ""
  3028. #. type: Plain text
  3029. #: guix-git/doc/guix-cookbook.texi:2331
  3030. msgid "Guix daemon can use a HTTP proxy to get substitutes, here we are configuring it to get them via Tor."
  3031. msgstr ""
  3032. #. type: quotation
  3033. #: guix-git/doc/guix-cookbook.texi:2332
  3034. #, no-wrap
  3035. msgid "Warning"
  3036. msgstr ""
  3037. #. type: quotation
  3038. #: guix-git/doc/guix-cookbook.texi:2338
  3039. 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."
  3040. msgstr ""
  3041. #. type: quotation
  3042. #: guix-git/doc/guix-cookbook.texi:2344
  3043. 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."
  3044. msgstr ""
  3045. #. type: Plain text
  3046. #: guix-git/doc/guix-cookbook.texi:2349
  3047. 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:"
  3048. msgstr ""
  3049. #. type: lisp
  3050. #: guix-git/doc/guix-cookbook.texi:2353
  3051. #, no-wrap
  3052. msgid ""
  3053. "(use-modules (gnu))\n"
  3054. "(use-service-module base networking)\n"
  3055. "\n"
  3056. msgstr ""
  3057. #. type: lisp
  3058. #: guix-git/doc/guix-cookbook.texi:2369
  3059. #, no-wrap
  3060. msgid ""
  3061. "(operating-system\n"
  3062. " …\n"
  3063. " (services\n"
  3064. " (cons\n"
  3065. " (service tor-service-type\n"
  3066. " (tor-configuration\n"
  3067. " (config-file (plain-file \"tor-config\"\n"
  3068. " \"HTTPTunnelPort 127.0.0.1:9250\"))))\n"
  3069. " (modify-services %base-services\n"
  3070. " (guix-service-type\n"
  3071. " config => (guix-configuration\n"
  3072. " (inherit config)\n"
  3073. " ;; ci.guix.gnu.org's Onion service\n"
  3074. " (substitute-urls \"https://bp7o7ckwlewr4slm.onion\")\n"
  3075. " (http-proxy \"http://localhost:9250\")))))))\n"
  3076. msgstr ""
  3077. #. type: Plain text
  3078. #: guix-git/doc/guix-cookbook.texi:2378
  3079. 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."
  3080. msgstr ""
  3081. #. type: Plain text
  3082. #: guix-git/doc/guix-cookbook.texi:2382
  3083. 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:"
  3084. msgstr ""
  3085. #. type: example
  3086. #: guix-git/doc/guix-cookbook.texi:2386
  3087. #, no-wrap
  3088. msgid ""
  3089. "sudo herd set-http-proxy guix-daemon http://localhost:9250\n"
  3090. "guix build --substitute-urls=https://bp7o7ckwlewr4slm.onion …\n"
  3091. msgstr ""
  3092. #. type: cindex
  3093. #: guix-git/doc/guix-cookbook.texi:2390
  3094. #, no-wrap
  3095. msgid "nginx, lua, openresty, resty"
  3096. msgstr ""
  3097. #. type: Plain text
  3098. #: guix-git/doc/guix-cookbook.texi:2393
  3099. msgid "NGINX could be extended with Lua scripts."
  3100. msgstr ""
  3101. #. type: Plain text
  3102. #: guix-git/doc/guix-cookbook.texi:2396
  3103. msgid "Guix provides NGINX service with ability to load Lua module and specific Lua packages, and reply to requests by evaluating Lua scripts."
  3104. msgstr ""
  3105. #. type: Plain text
  3106. #: guix-git/doc/guix-cookbook.texi:2400
  3107. 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:"
  3108. msgstr ""
  3109. #. type: example
  3110. #: guix-git/doc/guix-cookbook.texi:2403
  3111. #, no-wrap
  3112. msgid ""
  3113. "local shell = require \"resty.shell\"\n"
  3114. "\n"
  3115. msgstr ""
  3116. #. type: example
  3117. #: guix-git/doc/guix-cookbook.texi:2407
  3118. #, no-wrap
  3119. msgid ""
  3120. "local stdin = \"\"\n"
  3121. "local timeout = 1000 -- ms\n"
  3122. "local max_size = 4096 -- byte\n"
  3123. "\n"
  3124. msgstr ""
  3125. #. type: example
  3126. #: guix-git/doc/guix-cookbook.texi:2410
  3127. #, no-wrap
  3128. msgid ""
  3129. "local ok, stdout, stderr, reason, status =\n"
  3130. " shell.run([[/run/current-system/profile/bin/ls /tmp]], stdin, timeout, max_size)\n"
  3131. "\n"
  3132. msgstr ""
  3133. #. type: example
  3134. #: guix-git/doc/guix-cookbook.texi:2412
  3135. #, no-wrap
  3136. msgid "ngx.say(stdout)\n"
  3137. msgstr ""
  3138. #. type: lisp
  3139. #: guix-git/doc/guix-cookbook.texi:2443
  3140. #, no-wrap
  3141. msgid ""
  3142. "(use-modules (gnu))\n"
  3143. "(use-service-modules #;… web)\n"
  3144. "(use-package-modules #;… lua)\n"
  3145. "(operating-system\n"
  3146. " ;; …\n"
  3147. " (services\n"
  3148. " ;; …\n"
  3149. " (service nginx-service-type\n"
  3150. " (nginx-configuration\n"
  3151. " (modules\n"
  3152. " (list\n"
  3153. " (file-append nginx-lua-module \"/etc/nginx/modules/ngx_http_lua_module.so\")))\n"
  3154. " (lua-package-path (list lua-resty-core\n"
  3155. " lua-resty-lrucache\n"
  3156. " lua-resty-signal\n"
  3157. " lua-tablepool\n"
  3158. " lua-resty-shell))\n"
  3159. " (lua-package-cpath (list lua-resty-signal))\n"
  3160. " (server-blocks\n"
  3161. " (list (nginx-server-configuration\n"
  3162. " (server-name '(\"localhost\"))\n"
  3163. " (listen '(\"80\"))\n"
  3164. " (root \"/etc\")\n"
  3165. " (locations (list\n"
  3166. " (nginx-location-configuration\n"
  3167. " (uri \"/hello\")\n"
  3168. " (body (list #~(format #f \"content_by_lua_file ~s;\"\n"
  3169. " #$(local-file \"index.lua\"))))))))))))))\n"
  3170. msgstr ""
  3171. #. type: Plain text
  3172. #: guix-git/doc/guix-cookbook.texi:2454
  3173. 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."
  3174. msgstr ""
  3175. #. type: Plain text
  3176. #: guix-git/doc/guix-cookbook.texi:2457
  3177. msgid "@pxref{Package Management,,, guix, GNU Guix Reference Manual} for a complete reference."
  3178. msgstr ""
  3179. #. type: section
  3180. #: guix-git/doc/guix-cookbook.texi:2460 guix-git/doc/guix-cookbook.texi:2462
  3181. #: guix-git/doc/guix-cookbook.texi:2463
  3182. #, no-wrap
  3183. msgid "Guix Profiles in Practice"
  3184. msgstr ""
  3185. #. type: menuentry
  3186. #: guix-git/doc/guix-cookbook.texi:2460
  3187. msgid "Strategies for multiple profiles and manifests."
  3188. msgstr ""
  3189. #. type: Plain text
  3190. #: guix-git/doc/guix-cookbook.texi:2468
  3191. 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."
  3192. msgstr ""
  3193. #. type: Plain text
  3194. #: guix-git/doc/guix-cookbook.texi:2473
  3195. 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."
  3196. msgstr ""
  3197. #. type: Plain text
  3198. #: guix-git/doc/guix-cookbook.texi:2479
  3199. 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."
  3200. msgstr ""
  3201. #. type: Plain text
  3202. #: guix-git/doc/guix-cookbook.texi:2481
  3203. msgid "Multiple profiles have many benefits:"
  3204. msgstr ""
  3205. #. type: itemize
  3206. #: guix-git/doc/guix-cookbook.texi:2485
  3207. msgid "Clean semantic separation of the various packages a user needs for different contexts."
  3208. msgstr ""
  3209. #. type: itemize
  3210. #: guix-git/doc/guix-cookbook.texi:2489
  3211. msgid "Multiple profiles can be made available into the environment either on login or within a dedicated shell."
  3212. msgstr ""
  3213. #. type: itemize
  3214. #: guix-git/doc/guix-cookbook.texi:2493
  3215. msgid "Profiles can be loaded on demand. For instance, the user can use multiple shells, each of them running different profiles."
  3216. msgstr ""
  3217. #. type: itemize
  3218. #: guix-git/doc/guix-cookbook.texi:2498
  3219. 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."
  3220. msgstr ""
  3221. #. type: itemize
  3222. #: guix-git/doc/guix-cookbook.texi:2502
  3223. msgid "Deduplication: Profiles share dependencies that happens to be the exact same. This makes multiple profiles storage-efficient."
  3224. msgstr ""
  3225. #. type: itemize
  3226. #: guix-git/doc/guix-cookbook.texi:2510
  3227. 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}."
  3228. msgstr ""
  3229. #. type: itemize
  3230. #: guix-git/doc/guix-cookbook.texi:2514
  3231. msgid "Easier upgrades and maintenance: Multiple profiles make it easy to keep package listings at hand and make upgrades completely frictionless."
  3232. msgstr ""
  3233. #. type: Plain text
  3234. #: guix-git/doc/guix-cookbook.texi:2517
  3235. msgid "Concretely, here follows some typical profiles:"
  3236. msgstr ""
  3237. #. type: itemize
  3238. #: guix-git/doc/guix-cookbook.texi:2521
  3239. msgid "The dependencies of a project you are working on."
  3240. msgstr ""
  3241. #. type: itemize
  3242. #: guix-git/doc/guix-cookbook.texi:2524
  3243. msgid "Your favourite programming language libraries."
  3244. msgstr ""
  3245. #. type: itemize
  3246. #: guix-git/doc/guix-cookbook.texi:2527
  3247. msgid "Laptop-specific programs (like @samp{powertop}) that you don't need on a desktop."
  3248. msgstr ""
  3249. #. type: itemize
  3250. #: guix-git/doc/guix-cookbook.texi:2531
  3251. 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)."
  3252. msgstr ""
  3253. #. type: itemize
  3254. #: guix-git/doc/guix-cookbook.texi:2534
  3255. msgid "Games."
  3256. msgstr ""
  3257. #. type: Plain text
  3258. #: guix-git/doc/guix-cookbook.texi:2537
  3259. msgid "Let's dive in the set up!"
  3260. msgstr ""
  3261. #. type: subsection
  3262. #: guix-git/doc/guix-cookbook.texi:2538 guix-git/doc/guix-cookbook.texi:2539
  3263. #, no-wrap
  3264. msgid "Basic setup with manifests"
  3265. msgstr ""
  3266. #. type: Plain text
  3267. #: guix-git/doc/guix-cookbook.texi:2543
  3268. msgid "A Guix profile can be set up @emph{via} a so-called @emph{manifest specification} that looks like this:"
  3269. msgstr ""
  3270. #. type: lisp
  3271. #: guix-git/doc/guix-cookbook.texi:2553
  3272. #, no-wrap
  3273. msgid ""
  3274. "(specifications->manifest\n"
  3275. " '(\"package-1\"\n"
  3276. " ;; Version 1.3 of package-2.\n"
  3277. " \"package-2@@1.3\"\n"
  3278. " ;; The \"lib\" output of package-3.\n"
  3279. " \"package-3:lib\"\n"
  3280. " ; ...\n"
  3281. " \"package-N\"))\n"
  3282. msgstr ""
  3283. #. type: Plain text
  3284. #: guix-git/doc/guix-cookbook.texi:2557
  3285. msgid "@pxref{Invoking guix package,,, guix, GNU Guix Reference Manual}, for the syntax details."
  3286. msgstr ""
  3287. #. type: Plain text
  3288. #: guix-git/doc/guix-cookbook.texi:2559
  3289. msgid "We can create a manifest specification per profile and install them this way:"
  3290. msgstr ""
  3291. #. type: example
  3292. #: guix-git/doc/guix-cookbook.texi:2564
  3293. #, no-wrap
  3294. msgid ""
  3295. "GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles\n"
  3296. "mkdir -p \"$GUIX_EXTRA_PROFILES\"/my-project # if it does not exist yet\n"
  3297. "guix package --manifest=/path/to/guix-my-project-manifest.scm --profile=\"$GUIX_EXTRA_PROFILES\"/my-project/my-project\n"
  3298. msgstr ""
  3299. #. type: Plain text
  3300. #: guix-git/doc/guix-cookbook.texi:2568
  3301. 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."
  3302. msgstr ""
  3303. #. type: Plain text
  3304. #: guix-git/doc/guix-cookbook.texi:2574
  3305. 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}."
  3306. msgstr ""
  3307. #. type: Plain text
  3308. #: guix-git/doc/guix-cookbook.texi:2576
  3309. msgid "Note that it's also possible to loop over the output of"
  3310. msgstr ""
  3311. #. type: example
  3312. #: guix-git/doc/guix-cookbook.texi:2579
  3313. #, no-wrap
  3314. msgid "guix package --list-profiles\n"
  3315. msgstr ""
  3316. #. type: Plain text
  3317. #: guix-git/doc/guix-cookbook.texi:2582
  3318. msgid "although you'll probably have to filter out @file{~/.config/guix/current}."
  3319. msgstr ""
  3320. #. type: Plain text
  3321. #: guix-git/doc/guix-cookbook.texi:2584
  3322. msgid "To enable all profiles on login, add this to your @file{~/.bash_profile} (or similar):"
  3323. msgstr ""
  3324. #. type: example
  3325. #: guix-git/doc/guix-cookbook.texi:2594
  3326. #, no-wrap
  3327. msgid ""
  3328. "for i in $GUIX_EXTRA_PROFILES/*; do\n"
  3329. " profile=$i/$(basename \"$i\")\n"
  3330. " if [ -f \"$profile\"/etc/profile ]; then\n"
  3331. " GUIX_PROFILE=\"$profile\"\n"
  3332. " . \"$GUIX_PROFILE\"/etc/profile\n"
  3333. " fi\n"
  3334. " unset profile\n"
  3335. "done\n"
  3336. msgstr ""
  3337. #. type: Plain text
  3338. #: guix-git/doc/guix-cookbook.texi:2599
  3339. 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."
  3340. msgstr ""
  3341. #. type: Plain text
  3342. #: guix-git/doc/guix-cookbook.texi:2601
  3343. msgid "You can obviously choose to only enable a subset of them:"
  3344. msgstr ""
  3345. #. type: example
  3346. #: guix-git/doc/guix-cookbook.texi:2611
  3347. #, no-wrap
  3348. msgid ""
  3349. "for i in \"$GUIX_EXTRA_PROFILES\"/my-project-1 \"$GUIX_EXTRA_PROFILES\"/my-project-2; do\n"
  3350. " profile=$i/$(basename \"$i\")\n"
  3351. " if [ -f \"$profile\"/etc/profile ]; then\n"
  3352. " GUIX_PROFILE=\"$profile\"\n"
  3353. " . \"$GUIX_PROFILE\"/etc/profile\n"
  3354. " fi\n"
  3355. " unset profile\n"
  3356. "done\n"
  3357. msgstr ""
  3358. #. type: Plain text
  3359. #: guix-git/doc/guix-cookbook.texi:2615
  3360. msgid "When a profile is off, it's straightforward to enable it for an individual shell without \"polluting\" the rest of the user session:"
  3361. msgstr ""
  3362. #. type: example
  3363. #: guix-git/doc/guix-cookbook.texi:2618
  3364. #, no-wrap
  3365. msgid "GUIX_PROFILE=\"path/to/my-project\" ; . \"$GUIX_PROFILE\"/etc/profile\n"
  3366. msgstr ""
  3367. #. type: Plain text
  3368. #: guix-git/doc/guix-cookbook.texi:2625
  3369. 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:"
  3370. msgstr ""
  3371. #. type: example
  3372. #: guix-git/doc/guix-cookbook.texi:2628
  3373. #, no-wrap
  3374. msgid "guix package --search-paths=prefix --profile=$my_profile\"\n"
  3375. msgstr ""
  3376. #. type: Plain text
  3377. #: guix-git/doc/guix-cookbook.texi:2632
  3378. msgid "Once again, see (@pxref{Invoking guix package,,, guix, GNU Guix Reference Manual}) for the command line options."
  3379. msgstr ""
  3380. #. type: Plain text
  3381. #: guix-git/doc/guix-cookbook.texi:2634
  3382. msgid "To upgrade a profile, simply install the manifest again:"
  3383. msgstr ""
  3384. #. type: example
  3385. #: guix-git/doc/guix-cookbook.texi:2637
  3386. #, no-wrap
  3387. msgid "guix package -m /path/to/guix-my-project-manifest.scm -p \"$GUIX_EXTRA_PROFILES\"/my-project/my-project\n"
  3388. msgstr ""
  3389. #. type: Plain text
  3390. #: guix-git/doc/guix-cookbook.texi:2643
  3391. 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:"
  3392. msgstr ""
  3393. #. type: example
  3394. #: guix-git/doc/guix-cookbook.texi:2648
  3395. #, no-wrap
  3396. msgid ""
  3397. "for profile in \"$GUIX_EXTRA_PROFILES\"/*; do\n"
  3398. " guix package --profile=\"$profile\" --manifest=\"$HOME/.guix-manifests/guix-$profile-manifest.scm\"\n"
  3399. "done\n"
  3400. msgstr ""
  3401. #. type: Plain text
  3402. #: guix-git/doc/guix-cookbook.texi:2651
  3403. msgid "Each profile has its own generations:"
  3404. msgstr ""
  3405. #. type: example
  3406. #: guix-git/doc/guix-cookbook.texi:2654
  3407. #, no-wrap
  3408. msgid "guix package -p \"$GUIX_EXTRA_PROFILES\"/my-project/my-project --list-generations\n"
  3409. msgstr ""
  3410. #. type: Plain text
  3411. #: guix-git/doc/guix-cookbook.texi:2657
  3412. msgid "You can roll-back to any generation of a given profile:"
  3413. msgstr ""
  3414. #. type: example
  3415. #: guix-git/doc/guix-cookbook.texi:2660
  3416. #, no-wrap
  3417. msgid "guix package -p \"$GUIX_EXTRA_PROFILES\"/my-project/my-project --switch-generations=17\n"
  3418. msgstr ""
  3419. #. type: Plain text
  3420. #: guix-git/doc/guix-cookbook.texi:2664
  3421. msgid "Finally, if you want to switch to a profile without inheriting from the current environment, you can activate it from an empty shell:"
  3422. msgstr ""
  3423. #. type: example
  3424. #: guix-git/doc/guix-cookbook.texi:2668
  3425. #, no-wrap
  3426. msgid ""
  3427. "env -i $(which bash) --login --noprofile --norc\n"
  3428. ". my-project/etc/profile\n"
  3429. msgstr ""
  3430. #. type: subsection
  3431. #: guix-git/doc/guix-cookbook.texi:2670 guix-git/doc/guix-cookbook.texi:2671
  3432. #, no-wrap
  3433. msgid "Required packages"
  3434. msgstr ""
  3435. #. type: Plain text
  3436. #: guix-git/doc/guix-cookbook.texi:2676
  3437. 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."
  3438. msgstr ""
  3439. #. type: emph{#1}
  3440. #: guix-git/doc/guix-cookbook.texi:2679
  3441. msgid "Note: Only the environmental variables of the packages that consume them will be set."
  3442. msgstr ""
  3443. #. type: Plain text
  3444. #: guix-git/doc/guix-cookbook.texi:2683
  3445. 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:"
  3446. msgstr ""
  3447. #. type: itemize
  3448. #: guix-git/doc/guix-cookbook.texi:2687
  3449. msgid "Either export the variable manually, e.g."
  3450. msgstr ""
  3451. #. type: example
  3452. #: guix-git/doc/guix-cookbook.texi:2689
  3453. #, no-wrap
  3454. msgid "export MANPATH=/path/to/profile$@{MANPATH:+:@}$MANPATH\n"
  3455. msgstr ""
  3456. #. type: itemize
  3457. #: guix-git/doc/guix-cookbook.texi:2693
  3458. msgid "Or include @samp{man-db} to the profile manifest."
  3459. msgstr ""
  3460. #. type: Plain text
  3461. #: guix-git/doc/guix-cookbook.texi:2697
  3462. msgid "The same is true for @samp{INFOPATH} (you can install @samp{info-reader}), @samp{PKG_CONFIG_PATH} (install @samp{pkg-config}), etc."
  3463. msgstr ""
  3464. #. type: subsection
  3465. #: guix-git/doc/guix-cookbook.texi:2698 guix-git/doc/guix-cookbook.texi:2699
  3466. #, no-wrap
  3467. msgid "Default profile"
  3468. msgstr ""
  3469. #. type: Plain text
  3470. #: guix-git/doc/guix-cookbook.texi:2702
  3471. msgid "What about the default profile that Guix keeps in @file{~/.guix-profile}?"
  3472. msgstr ""
  3473. #. type: Plain text
  3474. #: guix-git/doc/guix-cookbook.texi:2705
  3475. 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."
  3476. msgstr ""
  3477. #. type: Plain text
  3478. #: guix-git/doc/guix-cookbook.texi:2709
  3479. 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"
  3480. msgstr ""
  3481. #. type: example
  3482. #: guix-git/doc/guix-cookbook.texi:2713
  3483. #, no-wrap
  3484. msgid ""
  3485. "guix install package-foo\n"
  3486. "guix upgrade package-bar\n"
  3487. msgstr ""
  3488. #. type: Plain text
  3489. #: guix-git/doc/guix-cookbook.texi:2716
  3490. msgid "without having to specify the path to a profile."
  3491. msgstr ""
  3492. #. type: subsection
  3493. #: guix-git/doc/guix-cookbook.texi:2717 guix-git/doc/guix-cookbook.texi:2718
  3494. #, no-wrap
  3495. msgid "The benefits of manifests"
  3496. msgstr ""
  3497. #. type: Plain text
  3498. #: guix-git/doc/guix-cookbook.texi:2722
  3499. 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."
  3500. msgstr ""
  3501. #. type: Plain text
  3502. #: guix-git/doc/guix-cookbook.texi:2726
  3503. 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."
  3504. msgstr ""
  3505. #. type: Plain text
  3506. #: guix-git/doc/guix-cookbook.texi:2731
  3507. 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."
  3508. msgstr ""
  3509. #. type: Plain text
  3510. #: guix-git/doc/guix-cookbook.texi:2733
  3511. msgid "Manifests come with multiple benefits. In particular, they ease maintenance:"
  3512. msgstr ""
  3513. #. type: itemize
  3514. #: guix-git/doc/guix-cookbook.texi:2741
  3515. 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."
  3516. msgstr ""
  3517. #. type: itemize
  3518. #: guix-git/doc/guix-cookbook.texi:2746
  3519. 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."
  3520. msgstr ""
  3521. #. type: itemize
  3522. #: guix-git/doc/guix-cookbook.texi:2752
  3523. 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."
  3524. msgstr ""
  3525. #. type: itemize
  3526. #: guix-git/doc/guix-cookbook.texi:2758
  3527. 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}."
  3528. msgstr ""
  3529. #. type: itemize
  3530. #: guix-git/doc/guix-cookbook.texi:2766
  3531. 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)."
  3532. msgstr ""
  3533. #. type: itemize
  3534. #: guix-git/doc/guix-cookbook.texi:2770
  3535. 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}."
  3536. msgstr ""
  3537. #. type: Plain text
  3538. #: guix-git/doc/guix-cookbook.texi:2778
  3539. 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."
  3540. msgstr ""
  3541. #. type: Plain text
  3542. #: guix-git/doc/guix-cookbook.texi:2780
  3543. msgid "Let's take an example:"
  3544. msgstr ""
  3545. #. type: enumerate
  3546. #: guix-git/doc/guix-cookbook.texi:2786
  3547. 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."
  3548. msgstr ""
  3549. #. type: enumerate
  3550. #: guix-git/doc/guix-cookbook.texi:2792
  3551. 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."
  3552. msgstr ""
  3553. #. type: enumerate
  3554. #: guix-git/doc/guix-cookbook.texi:2797
  3555. 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!"
  3556. msgstr ""
  3557. #. type: Plain text
  3558. #: guix-git/doc/guix-cookbook.texi:2803
  3559. 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."
  3560. msgstr ""
  3561. #. type: Plain text
  3562. #: guix-git/doc/guix-cookbook.texi:2806
  3563. 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."
  3564. msgstr ""
  3565. #. type: subsection
  3566. #: guix-git/doc/guix-cookbook.texi:2807 guix-git/doc/guix-cookbook.texi:2808
  3567. #, no-wrap
  3568. msgid "Reproducible profiles"
  3569. msgstr ""
  3570. #. type: Plain text
  3571. #: guix-git/doc/guix-cookbook.texi:2811
  3572. msgid "To reproduce a profile bit-for-bit, we need two pieces of information:"
  3573. msgstr ""
  3574. #. type: itemize
  3575. #: guix-git/doc/guix-cookbook.texi:2815
  3576. msgid "a manifest,"
  3577. msgstr ""
  3578. #. type: itemize
  3579. #: guix-git/doc/guix-cookbook.texi:2817
  3580. msgid "a Guix channel specification."
  3581. msgstr ""
  3582. #. type: Plain text
  3583. #: guix-git/doc/guix-cookbook.texi:2821
  3584. msgid "Indeed, manifests alone might not be enough: different Guix versions (or different channels) can produce different outputs for a given manifest."
  3585. msgstr ""
  3586. #. type: Plain text
  3587. #: guix-git/doc/guix-cookbook.texi:2825
  3588. msgid "You can output the Guix channel specification with @samp{guix describe --format=channels}. Save this to a file, say @samp{channel-specs.scm}."
  3589. msgstr ""
  3590. #. type: Plain text
  3591. #: guix-git/doc/guix-cookbook.texi:2828
  3592. msgid "On another computer, you can use the channel specification file and the manifest to reproduce the exact same profile:"
  3593. msgstr ""
  3594. #. type: example
  3595. #: guix-git/doc/guix-cookbook.texi:2832
  3596. #, no-wrap
  3597. msgid ""
  3598. "GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles\n"
  3599. "GUIX_EXTRA=$HOME/.guix-extra\n"
  3600. "\n"
  3601. msgstr ""
  3602. #. type: example
  3603. #: guix-git/doc/guix-cookbook.texi:2835
  3604. #, no-wrap
  3605. msgid ""
  3606. "mkdir \"$GUIX_EXTRA\"/my-project\n"
  3607. "guix pull --channels=channel-specs.scm --profile \"$GUIX_EXTRA/my-project/guix\"\n"
  3608. "\n"
  3609. msgstr ""
  3610. #. type: example
  3611. #: guix-git/doc/guix-cookbook.texi:2838
  3612. #, no-wrap
  3613. msgid ""
  3614. "mkdir -p \"$GUIX_EXTRA_PROFILES/my-project\"\n"
  3615. "\"$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"
  3616. msgstr ""
  3617. #. type: Plain text
  3618. #: guix-git/doc/guix-cookbook.texi:2842
  3619. 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."
  3620. msgstr ""
  3621. #. type: Plain text
  3622. #: guix-git/doc/guix-cookbook.texi:2849
  3623. msgid "Guix provides multiple tools to manage environment. This chapter demonstrate such utilities."
  3624. msgstr ""
  3625. #. type: section
  3626. #: guix-git/doc/guix-cookbook.texi:2852 guix-git/doc/guix-cookbook.texi:2854
  3627. #: guix-git/doc/guix-cookbook.texi:2855
  3628. #, no-wrap
  3629. msgid "Guix environment via direnv"
  3630. msgstr ""
  3631. #. type: menuentry
  3632. #: guix-git/doc/guix-cookbook.texi:2852
  3633. msgid "Setup Guix environment with direnv"
  3634. msgstr ""
  3635. #. type: Plain text
  3636. #: guix-git/doc/guix-cookbook.texi:2860
  3637. 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."
  3638. msgstr ""
  3639. #. type: Plain text
  3640. #: guix-git/doc/guix-cookbook.texi:2866
  3641. 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}."
  3642. msgstr ""
  3643. #. type: Plain text
  3644. #: guix-git/doc/guix-cookbook.texi:2868
  3645. msgid "Create a @file{~/.direnvrc} with a Bash code:"
  3646. msgstr ""
  3647. #. type: example
  3648. #: guix-git/doc/guix-cookbook.texi:2886
  3649. #, no-wrap
  3650. msgid ""
  3651. "# Thanks <https://github.com/direnv/direnv/issues/73#issuecomment-152284914>\n"
  3652. "export_function()\n"
  3653. "@{\n"
  3654. " local name=$1\n"
  3655. " local alias_dir=$PWD/.direnv/aliases\n"
  3656. " mkdir -p \"$alias_dir\"\n"
  3657. " PATH_add \"$alias_dir\"\n"
  3658. " local target=\"$alias_dir/$name\"\n"
  3659. " if declare -f \"$name\" >/dev/null; then\n"
  3660. " echo \"#!$SHELL\" > \"$target\"\n"
  3661. " declare -f \"$name\" >> \"$target\" 2>/dev/null\n"
  3662. " # Notice that we add shell variables to the function trigger.\n"
  3663. " echo \"$name \\$*\" >> \"$target\"\n"
  3664. " chmod +x \"$target\"\n"
  3665. " fi\n"
  3666. "@}\n"
  3667. "\n"
  3668. msgstr ""
  3669. #. type: example
  3670. #: guix-git/doc/guix-cookbook.texi:2891
  3671. #, no-wrap
  3672. msgid ""
  3673. "use_guix()\n"
  3674. "@{\n"
  3675. " # Set GitHub token.\n"
  3676. " export GUIX_GITHUB_TOKEN=\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n"
  3677. "\n"
  3678. msgstr ""
  3679. #. type: example
  3680. #: guix-git/doc/guix-cookbook.texi:2894
  3681. #, no-wrap
  3682. msgid ""
  3683. " # Unset 'GUIX_PACKAGE_PATH'.\n"
  3684. " export GUIX_PACKAGE_PATH=\"\"\n"
  3685. "\n"
  3686. msgstr ""
  3687. #. type: example
  3688. #: guix-git/doc/guix-cookbook.texi:2903
  3689. #, no-wrap
  3690. msgid ""
  3691. " # Recreate a garbage collector root.\n"
  3692. " gcroots=\"$HOME/.config/guix/gcroots\"\n"
  3693. " mkdir -p \"$gcroots\"\n"
  3694. " gcroot=\"$gcroots/guix\"\n"
  3695. " if [ -L \"$gcroot\" ]\n"
  3696. " then\n"
  3697. " rm -v \"$gcroot\"\n"
  3698. " fi\n"
  3699. "\n"
  3700. msgstr ""
  3701. #. type: example
  3702. #: guix-git/doc/guix-cookbook.texi:2918
  3703. #, no-wrap
  3704. msgid ""
  3705. " # Miscellaneous packages.\n"
  3706. " PACKAGES_MAINTENANCE=(\n"
  3707. " direnv\n"
  3708. " git\n"
  3709. " git:send-email\n"
  3710. " git-cal\n"
  3711. " gnupg\n"
  3712. " guile-colorized\n"
  3713. " guile-readline\n"
  3714. " less\n"
  3715. " ncurses\n"
  3716. " openssh\n"
  3717. " xdot\n"
  3718. " )\n"
  3719. "\n"
  3720. msgstr ""
  3721. #. type: example
  3722. #: guix-git/doc/guix-cookbook.texi:2921
  3723. #, no-wrap
  3724. msgid ""
  3725. " # Environment packages.\n"
  3726. " PACKAGES=(help2man guile-sqlite3 guile-gcrypt)\n"
  3727. "\n"
  3728. msgstr ""
  3729. #. type: example
  3730. #: guix-git/doc/guix-cookbook.texi:2924
  3731. #, no-wrap
  3732. msgid ""
  3733. " # Thanks <https://lists.gnu.org/archive/html/guix-devel/2016-09/msg00859.html>\n"
  3734. " eval \"$(guix environment --search-paths --root=\"$gcroot\" --pure guix --ad-hoc $@{PACKAGES[@@]@} $@{PACKAGES_MAINTENANCE[@@]@} \"$@@\")\"\n"
  3735. "\n"
  3736. msgstr ""
  3737. #. type: example
  3738. #: guix-git/doc/guix-cookbook.texi:2931
  3739. #, no-wrap
  3740. msgid ""
  3741. " # Predefine configure flags.\n"
  3742. " configure()\n"
  3743. " @{\n"
  3744. " ./configure --localstatedir=/var --prefix=\n"
  3745. " @}\n"
  3746. " export_function configure\n"
  3747. "\n"
  3748. msgstr ""
  3749. #. type: example
  3750. #: guix-git/doc/guix-cookbook.texi:2942
  3751. #, no-wrap
  3752. msgid ""
  3753. " # Run make and optionally build something.\n"
  3754. " build()\n"
  3755. " @{\n"
  3756. " make -j 2\n"
  3757. " if [ $# -gt 0 ]\n"
  3758. " then\n"
  3759. " ./pre-inst-env guix build \"$@@\"\n"
  3760. " fi\n"
  3761. " @}\n"
  3762. " export_function build\n"
  3763. "\n"
  3764. msgstr ""
  3765. #. type: example
  3766. #: guix-git/doc/guix-cookbook.texi:2949
  3767. #, no-wrap
  3768. msgid ""
  3769. " # Predefine push Git command.\n"
  3770. " push()\n"
  3771. " @{\n"
  3772. " git push --set-upstream origin\n"
  3773. " @}\n"
  3774. " export_function push\n"
  3775. "\n"
  3776. msgstr ""
  3777. #. type: example
  3778. #: guix-git/doc/guix-cookbook.texi:2952
  3779. #, no-wrap
  3780. msgid ""
  3781. " clear # Clean up the screen.\n"
  3782. " git-cal --author='Your Name' # Show contributions calendar.\n"
  3783. "\n"
  3784. msgstr ""
  3785. #. type: example
  3786. #: guix-git/doc/guix-cookbook.texi:2960
  3787. #, no-wrap
  3788. msgid ""
  3789. " # Show commands help.\n"
  3790. " echo \"\n"
  3791. "build build a package or just a project if no argument provided\n"
  3792. "configure run ./configure with predefined parameters\n"
  3793. "push push to upstream Git repository\n"
  3794. "\"\n"
  3795. "@}\n"
  3796. msgstr ""
  3797. #. type: Plain text
  3798. #: guix-git/doc/guix-cookbook.texi:2964
  3799. msgid "Every project containing @file{.envrc} with a string @code{use guix} will have predefined environment variables and procedures."
  3800. msgstr ""
  3801. #. type: Plain text
  3802. #: guix-git/doc/guix-cookbook.texi:2966
  3803. msgid "Run @command{direnv allow} to setup the environment for the first time."
  3804. msgstr ""
  3805. #. type: Plain text
  3806. #: guix-git/doc/guix-cookbook.texi:2978
  3807. 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."
  3808. msgstr ""
  3809. #. type: Plain text
  3810. #: guix-git/doc/guix-cookbook.texi:2981
  3811. msgid "The Nix-based software distributions, Nixpkgs and NixOS, have also been an inspiration for Guix."
  3812. msgstr ""
  3813. #. type: Plain text
  3814. #: guix-git/doc/guix-cookbook.texi:2987
  3815. 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!"
  3816. msgstr ""
  3817. #. type: Plain text
  3818. #: guix-git/doc/guix-cookbook.texi:2990
  3819. msgid "This document includes adapted sections from articles that have previously been published on the Guix blog at @uref{https://guix.gnu.org/blog}."
  3820. msgstr ""
  3821. #. type: cindex
  3822. #: guix-git/doc/guix-cookbook.texi:2995
  3823. #, no-wrap
  3824. msgid "license, GNU Free Documentation License"
  3825. msgstr ""
  3826. #. type: include
  3827. #: guix-git/doc/guix-cookbook.texi:2996
  3828. #, no-wrap
  3829. msgid "fdl-1.3.texi"
  3830. msgstr ""