guix-cookbook.ko.po 166 KB

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