guix-cookbook.sk.po 160 KB

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