Re: Rename glibc-utf8-locales to glibc-limited-utf8-locales
> The package description reads as: > >This package provides a small sample of UTF-8 locales mostly useful >in test environments. > While true does not change that the name is, in my opinion, misleading. > Perhaps it should simply be marked as a hidden package (not discoverable > via the user interface), and not mentioned in the manual at all. > > What do you think? > That is a reasonable solution too.
Re: Rename glibc-utf8-locales to glibc-limited-utf8-locales
I prefer names to not be lying about what they are, despite any documentation. It is a UX problem if the user has to search the documentation for any given package name before installing it, just to make sure that it contains what it says on the can so to speak. The name glibc-utf8-locales when contrasted with glibc-locales reads to me like "it contains only the utf8-locales". Thanks for the reply! Rovanion
Rename glibc-utf8-locales to glibc-limited-utf8-locales
Hi, I have on different occasions had the issue of the package manager Guix hinting that locales were not installed or that GUIX_LOCPATH was not set, even though they were. Today I went to the bottom of the issue [0] and have found what in my opinion is the root cause: Despite its name, the package glibc-utf8-locales does not contain all utf8-locales. There is nothing in the name that makes this apparent to the user, especially given that the package named glibc-locales contains all locales. My suggestion then is to change this package name from glibc-utf8-locales to glibc-limited-utf8-locales to make this distinction apparent to the user. The package name was mentioned enough times in the code of guix that I hesitate to submit a patch with s/glibc-utf8-locales/glibc-limited-utf8-locales/ run over the codebase. But perhaps it is that easy. [0]: https://unix.stackexchange.com/questions/689761
Re: How is the LaTeX-related file psfonts.map installed on Guix?
Hello rekado! I saved your document in a file “doc.tex” and then ran this > command successfully: > > guix environment --pure --ad-hoc \ > texlive-base \ > texlive-url \ > texlive-latex-hyperref \ > texlive-fonts-ec \ > texlive-lm \ > texlive-babel-swedish \ > texlive-pagenote \ > texlive-ifmtarg \ > texlive-morefloats \ > texlive-sectsty -- pdflatex doc.tex > > This produces a PDF file “doc.pdf” with an almost empty page with > the text “Notes”. > Thank you. My full document also builds now with the above environment. The strange thing is that, just as you noted, even though all texlive-hyphen-{a lot of european languages} are all installed my pdflatex outputs the following: Package babel Warning: No hyphenation patterns were preloaded for > (babel)the language `Swedish' into the format. > (babel)Please, configure your TeX system to add them and > (babel)rebuild the format. Now I will use the patterns > (babel)preloaded for \language=0 instead on input line 49. > And in the document hyphenation is very much broken, either not breaking words at all or breaking in the wrong places.
How is the LaTeX-related file psfonts.map installed on Guix?
Hi, I'm trying to define a Guix environment that enables the following LaTeX document to be compiled: \documentclass[a4paper,12pt]{article} > \usepackage[utf8]{inputenc} > \usepackage[swedish]{babel} > \usepackage{url} > \usepackage{color} > \usepackage[colorlinks=true, linkcolor=blue, urlcolor=blue]{hyperref\ > } > \usepackage[T1]{fontenc} > \usepackage{lmodern} > \usepackage{morefloats} > \usepackage{sectsty} > \usepackage{ifmtarg} > \usepackage{pagenote} > > \makepagenote > \let\footnote\pagenote > \renewcommand*{\notedivision}{\section*{\notesname}} > \renewcommand*{\pagenotesubhead}[2]{} > > \begin{document} > > \title{\textsc{\Huge Curriculum Vitae\\[0.5cm]}} > \newpage > > \setlength{\hoffset}{0pt} > > \printnotes > > \end{document} > It's a reduced version of the real document I'm writing. Right now I've packaged a bunch of things that were missing like texlive-generic-babel-swedish, texlive-morefloats, texlive-sectsty, texlive-ifmtarg and texlive-pagenote for an environment that is started with the following call: $ ~/source/guix/main/pre-inst-env guix environment --ad-hoc texlive-base texlive-generic-babel-swedish texlive-url texlive-latex-hyperref texlive-fonts-ec texlive-lm texlive-morefloats texlive-sectsty texlive-pagenote But I'm now stuck at the following error that pdflatex throws at me: kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 > ec-lmr12 > gsftopk: fatal: map file `psfonts.map' not found. > mktexpk: don't know how to create bitmap font for ec-lmr12. > mktexpk: perhaps ec-lmr12 is missing from the map file. > kpathsea: Appending font creation commands to missfont.log. > ) > !pdfTeX error: pdflatex (file ec-lmr12): Font ec-lmr12 at 600 not found > ==> Fatal error occurred, no output PDF file produced! > I've looked at the Debian package and it looks to be provided by texlive-base: https://packages.debian.org/buster/all/texlive-base/filelist. The same folder path in Guix seems to be generated by the function gnu/packages/tex.scm:texlive-union; but I have no idea how I would go about having it generate the .map-file I want it to. Does anyone happen to have any idea what to do here. I've spent a couple of hours without getting anywhere, so any hints would be appreciated.
Re: Confusing error messages from guix when loading a user scheme file that fails to load another file
Thank you for your kind help. Thanks to you Zimon and Adrianos who answered off-list. I was able to whip up a patch that should help future users avoid my confusion: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=46805
Confusing error messages from guix when loading a user scheme file that fails to load another file
Hi, Today I encountered an issue with Guix's user interface. I was trying to load a Scheme file defining a development environment with `guix environment --ad-hoc --load=file.scm`, but Guix kept telling me that the file did not exist even though I could swear it did: > $ head -n 1 development-environment.scm > (use-modules (gnu packages) > $ guix environment --ad-hoc --load=development-environment.scm > guix environment: error: failed to load 'development-environment.scm': No such file or directory After pulling my hair out for a while and then turning to `strace` I figured out that it was not actually that the file `development-environment.scm` did not exist, the issue was that the Scheme code in that file tried to load a file that did not exist. I set up a couple of different test cases to see if all errors were reported equally and to understand the issue better. Running a file that contains a syntax error indicates that there is an error in the file itself > $ guix environment --ad-hoc --load=syntax-error.scm > syntax-error.scm:2:1: missing closing parenthesis The same goes for when the code in the file being run throws an exception: > $ guix environment --ad-hoc --load=throw-exception.scm > guix environment: error: failed to load 'throw-exception.scm': > throw-exception.scm:1:0: banana But when the code in turn tries to load another file which does not exist it is reported as if the file itself is missing: > $ guix environment --ad-hoc --load=load-non-existing-file.scm > guix environment: error: failed to load 'load-non-existing-file.scm': No such file or directory I was able to find the source of the error message in `guix/ui.scm:378` and patched it to output the following message that makes more sense in this failure case: > $ ./pre-inst-env guix environment --ad-hoc --load=load-non-existing-file.scm > guix environment: error: failed to evaluate 'load-non-existing-file.scm', it raised the error: No such file or directory So here comes my questions: 1. Why is the file and line number not reported when the user provided scheme file fails to load another file? 2. Is it possible to modify guix so that it is? 3. If not, is the code path that I patched also used for other failures making the modification I demonstrated above a bad idea? 4. If so, is there a better way? I have attached the three small Scheme source code files used in the above examples. (use-modules (ice-9 rdelim)) (with-input-from-file "non-existant" read-string) (error "banana") (
Re: [RFC] Package of Nomacs
Hi again Leo! That doesn't say much, because `guix environment` provides little > isolation. You might try with pure environments, but the better way of > replicating the build environment is using `-K`. > Ran in a `guix environment --pure --container` and it still built successfully. > I have yet to look at your package definition (pardon me), but do you > notice anything strange between the Makefiles you generate on your own > vs. the Makefiles you generate in `guix build`? > Thanks for the idea. Made me realise that I could run the build steps on my own in the /tmp/ folders `guix build` generates with `--keep-failed`. And in doing so I got it to build even there. Figured that it then has to be some difference in the build steps and have now figured out that it is the flag "-DCMAKE_BUILD_TYPE=RelWithDebInfo" that is causing the issue. If I changed that to `Release` instead of `RelWithDebInfo` then the package builds successfully. And it also has plugins now! I will return with a revised version later. First I will try to package libpsd, an optional dependency of Nomacs.
Re: [RFC] Package of Nomacs
I can get the package to build using the following steps: git clone https://github.com/nomacs/nomacs.git cd nomacs mkdir build cd build guix environment --ad-hoc cmake make gcc libraw exiv2 libtiff opencv python quazip qtbase qtsvg qttools pkg-config git cmake "../ImageLounge" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DCMAKE_INSTALL_PREFIX=/gnu/store/fiwxb6mlwhvnr49f9ydbhbam\ wp4bzb8b-nomacs-3.16.224" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" "-DCMAKE_INSTALL_RPA\ TH=/gnu/store/fiwxb6mlwhvnr49f9ydbhbamwp4bzb8b-nomacs-3.16.224/lib" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DENABLE_TRANSLATIO\ NS=true" "-DUSE_SYSTEM_QUAZIP=true" "-DENABLE_OPENCV=true" make -j 8 ./nomacs For some reason that is different than when `guix package --from-file` runs. Den fre 1 jan. 2021 kl 23:02 skrev Rovanion Luckey < rovanion.luc...@gmail.com>: > Hi Leo and thank you for explaining. And hi again guix-devel. > > I've now rewritten the file according to your comments except that its > still its own file/module, something I'll fix later. > > Now I'm stuck trying to figure out a build error after going from the > tarball release through url-fetch to the non-recursive git-clone download. > CMake finds the package OpenCV when it runs, removing OpenCV from the > package inputs results in an error from CMake (as expected). But the build > fails during the build phase with the following error: > > > make[2]: *** No rule to make target 'opencv_core-NOTFOUND', needed by > 'libnomacsCore.so.3.16.0'. Stop. > > I've not found any relevant mentions of opencv_core in the source code. I > tried adding monkeying about with the CMakeLists a little to no avail. Also > looked at what Debian does to their package but found nothing that I > thought to be relevant: > https://sources.debian.org/src/nomacs/3.12.0+dfsg-3/debian/ > > I've attached the new package source. >
Re: [RFC] Package of Nomacs
Hi Leo and thank you for explaining. And hi again guix-devel. I've now rewritten the file according to your comments except that its still its own file/module, something I'll fix later. Now I'm stuck trying to figure out a build error after going from the tarball release through url-fetch to the non-recursive git-clone download. CMake finds the package OpenCV when it runs, removing OpenCV from the package inputs results in an error from CMake (as expected). But the build fails during the build phase with the following error: > make[2]: *** No rule to make target 'opencv_core-NOTFOUND', needed by 'libnomacsCore.so.3.16.0'. Stop. I've not found any relevant mentions of opencv_core in the source code. I tried adding monkeying about with the CMakeLists a little to no avail. Also looked at what Debian does to their package but found nothing that I thought to be relevant: https://sources.debian.org/src/nomacs/3.12.0+dfsg-3/debian/ I've attached the new package source. (define-module (gnu packages nomacs) #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module (guix licenses) #:use-module (gnu packages python) #:use-module (gnu packages qt) #:use-module (gnu packages image) #:use-module (gnu packages pkg-config) #:use-module (gnu packages image) #:use-module (gnu packages image-processing) #:use-module (gnu packages photo) #:use-module (gnu packages compression)) (define-public nomacs (package (name "nomacs") (version "3.16.224") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/rovanion/nomacs;) (commit version))) (sha256 "05d4hqg0gl3g9s2xf1hr7mc7g4cqarcap4nzxxa51fsphw2b8x16"))) (build-system cmake-build-system) (native-inputs `(("pkg-config" ,pkg-config))) (arguments `(#:configure-flags (list "-DENABLE_TRANSLATIONS=true" "-DUSE_SYSTEM_QUAZIP=true" "-DENABLE_OPENCV=true") #:phases (modify-phases %standard-phases (add-after 'unpack 'copy-plugins (lambda* (#:key inputs #:allow-other-keys) (copy-recursively (assoc-ref inputs "plugins") "ImageLounge/plugins"))) (add-after 'copy-plugins 'cd-to-source-dir (lambda _ (chdir "ImageLounge") #t))) #:tests? #f)) (inputs `(("plugins",(origin (method git-fetch) (uri (git-reference (url "https://github.com/nomacs/nomacs-plugins;) (commit "3.16"))) (sha256 "1cpdwhfvaxm970nwdc1hc13848a85pqqi176m9xpa3krla9qskml"))) ("exiv2" ,exiv2) ("libraw" ,libraw) ("libtiff",libtiff) ("opencv" ,opencv) ("python" ,python-wrapper) ("quazip" ,quazip) ("qtbase" ,qtbase) ("qtsvg" ,qtsvg) ("qtlinguist" ,qttools))) (synopsis "Image viewer for all common formats including RAW and PSD.") (description "Nomacs is a free, open source image viewer, which supports multiple platforms. You can use it for viewing all common image formats including RAW and psd images. Nomacs features semi-transparent widgets that display additional information such as thumbnails, metadata or histogram. It is able to browse images in zip or MS Office files which can be extracted to a directory. Metadata stored with the image can be displayed and you can add notes to images. A thumbnail preview of the current folder is included as well as a file explorer panel which allows switching between folders. Within a directory you can apply a file filter, so that only images are displayed whose filenames have a certain string or match a regular expression. Activating the cache allows for instantly switching between images. Nomacs includes image manipulation methods for adjusting brightness, contrast, saturation, hue, gamma, exposure. It has a pseudo color function which allows creating false color images. A unique feature of Nomacs is the synchronization of multiple instances. With this feature you can easily compare images by zooming and/or panning at the exactly same position or even by overlaying them with different opacity. Nomacs is licensed under the GNU General Public License v3 and available for Windows, Linux, FreeBSD, Mac, and OS/2.") (home-page "https://nomacs.org/;) (license gpl3+))) nomacs
Re: [RFC] Package of Nomacs
Hi Leo and thank you for your comments. The nomacs package should probably go to gnu/packages/image- > viewers.scm. > Yup. > Use git-fetch instead and don't recurse into submodules. You will > likely encounter some errors, because it doesn't seem as though nomacs > expects you to have its inputs properly packages. *sigh* > Hmm, this one I'm not sure I understand the reasoning behind. I think I read in some packaging guidelines that url-fetch was preferred if possible. > Instead of adding the path to the source directory, try `(cd > "ImageLounge")` in a phase after 'unpack. > I'm told that cd is an unbound variable when I try that :/ #:phases (modify-phases %standard-phases (add-after 'unpack 'cd-to-source-dir (lambda _ (call-with-output-string (cd "ImageLounge") Try to sort them alphabetically, also don't put too much effort into > making the tails align. > Check. > One thing that's missing is the plugins that are developed in a > > separate git repository [0] and not included in the source tarballs > > of the main repository [1]. Ideas on how to make them available in > > the `plugins` directory during build time are welcome. > A trick that's often used in Guix is > (inputs > `(("extra-source-package" > ,(origin ...))) >[other inputs]) > You can then (copy-recursively (assoc-ref inputs "extra-source- > package") destination) in a phase between 'unpack and 'configure. > Thank you! And thank you for the rest of the comments too. Happy new year!
[RFC] Package of Nomacs
Hi, I ended up working on a package for the image viewer Nomacs over Jul and would like some feedback on what I've managed so far. One thing that's missing is the plugins that are developed in a separate git repository [0] and not included in the source tarballs of the main repository [1]. Ideas on how to make them available in the `plugins` directory during build time are welcome. I have attached the package definition to this email. [0]: https://github.com/nomacs/nomacs-plugins/releases [1]: https://github.com/nomacs/nomacs/releases (define-module (nomacs) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system cmake) #:use-module (guix licenses) #:use-module (gnu packages python) #:use-module (gnu packages qt) #:use-module (gnu packages image) #:use-module (gnu packages pkg-config) #:use-module (gnu packages image) #:use-module (gnu packages image-processing) #:use-module (gnu packages photo) #:use-module (gnu packages compression)) (define-public nomacs (package (name "nomacs") (version "3.16.224") (source (origin (method url-fetch) (uri (string-append "https://codeload.github.com/nomacs/nomacs/tar.gz/; version)) (sha256 "0z113mfxxdy3wafh0g1xxxwsc5qg0n42r4345c6rxvr6h02fkixv"))) (build-system cmake-build-system) (arguments `(#:configure-flags (list "-DENABLE_TRANSLATIONS=true" "-DUSE_SYSTEM_QUAZIP=true" (string-append "../nomacs-" ,version "/ImageLounge")) #:tests? #f)) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("python" ,python-wrapper) ("qtbase" ,qtbase) ("qtlinguist" ,qttools) ("qtsvg" ,qtsvg) ("exiv2" ,exiv2) ("libtiff",libtiff) ("opencv" ,opencv) ("libraw" ,libraw) ("quazip" ,quazip))) (synopsis "Image viewer for all common formats including RAW and PSD.") (description "Nomacs is a free, open source image viewer, which supports multiple platforms. You can use it for viewing all common image formats including RAW and psd images. Nomacs features semi-transparent widgets that display additional information such as thumbnails, metadata or histogram. It is able to browse images in zip or MS Office files which can be extracted to a directory. Metadata stored with the image can be displayed and you can add notes to images. A thumbnail preview of the current folder is included as well as a file explorer panel which allows switching between folders. Within a directory you can apply a file filter, so that only images are displayed whose filenames have a certain string or match a regular expression. Activating the cache allows for instantly switching between images. Nomacs includes image manipulation methods for adjusting brightness, contrast, saturation, hue, gamma, exposure. It has a pseudo color function which allows creating false color images. A unique feature of Nomacs is the synchronization of multiple instances. With this feature you can easily compare images by zooming and/or panning at the exactly same position or even by overlaying them with different opacity. Nomacs is licensed under the GNU General Public License v3 and available for Windows, Linux, FreeBSD, Mac, and OS/2.") (home-page "https://nomacs.org/;) (license gpl3))) nomacs
[PATCH] Added detail to instructions on generating pre-inst-env
Hi, First time patcher. I only got Gmail as a mail client set up until I can get mu4e running in Guix so I hope it can manage to not munge attached patchfiles. The patch only adds a part of a sentence I thought was missing. From 73c8fc9a070e14e9155065512ca4150b26d4e86a Mon Sep 17 00:00:00 2001 From: Rovanion Luckey Date: Tue, 15 Dec 2020 12:33:12 +0100 Subject: [PATCH] doc: contributing: Added detail to instructions on generating pre-inst-env The file ./configure does not exist before the new developer runs ./bootstrap. --- doc/contributing.texi | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/contributing.texi b/doc/contributing.texi index 78d9990b30..316caea16c 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -166,14 +166,15 @@ actually installing them. So that you can distinguish between your ``end-user'' hat and your ``motley'' costume. To that end, all the command-line tools can be used even if you have not -run @code{make install}. To do that, you first need to have an environment -with all the dependencies available (@pxref{Building from Git}), and then -simply prefix each command with -@command{./pre-inst-env} (the @file{pre-inst-env} script lives in the -top build tree of Guix; it is generated by @command{./configure}). -As an example, here is how you would build the @code{hello} package as -defined in your working tree (this assumes @command{guix-daemon} is -already running on your system; it's OK if it's a different version): +run @code{make install}. To do that, you first need to have an +environment with all the dependencies available (@pxref{Building from +Git}), and then simply prefix each command with @command{./pre-inst-env} +(the @file{pre-inst-env} script lives in the top build tree of Guix; it +is generated by running @command{./bootstrap} followed by +@command{./configure}). As an example, here is how you would build the +@code{hello} package as defined in your working tree (this assumes +@command{guix-daemon} is already running on your system; it's OK if it's +a different version): @example $ ./pre-inst-env guix build hello -- 2.29.2