guix-cookbook.ko.po 169 KB

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