guix-cookbook.ru.po 157 KB

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