guix-cookbook.ko.po 169 KB

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