guix-cookbook.ko.po 169 KB

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