IRC channel logs

2013-09-09.log

back to list of logs

*youlysses wonders how hard it would be to "flip the switch" in NixOS to use Guix packages as default.
<mark_weaver>just use the guix commands and set your PATH to ~/.guix-profile/bin, no?
<youlysses>mark_weaver: I was about to ask this, but is there an easy way to list all paths that'd would need to be assigned/changed?
<mark_weaver>anyway, civodul hopes to have a minimal standalone bootable Guix system by the GNU 30th anniversary (in about 19 days)
<mark_weaver>youlysses: what do you mean by "all paths" ?
<youlysses>mark_weaver: Do I just need to set the path for binaries, what about other related folders/files?
<mark_weaver>when you run "guix package -i ..." it suggests several environment variables to set. It doesn't list PATH, but that's sort of obvious.
<mark_weaver>but really, this is a question for civodul.
<youlysses>Yeah, understood. I might not even do anything major and just wait for the bootable image, like initially planned. Though I've gotten a wild hair, for some reason. :^P
<youlysses>Probably due to all the stuff I need/want to package, but am currently to comfy to do-so.
<youlysses>That being said, I wish we had somesort of a desired parkage-list, to indicate what people want and what people are working on.
<Steap>youlysses: basically, you could just look at all the pieces of software you use daily and ask yourself: "is that already packaged in Guix ?"
<Steap>if the answer is yes, then I can tell you we would need Firefox, a Desktop Environment
<Steap>Andreas was talking about the OpenJDK
<Steap>You could also package libraries for your favorite language
<youlysses>Steap: Well, that's fine for now -- but once/if their are a fair amount of contribituors, then there is a chance for packaging overlap and a repeat of effort.
<youlysses>Really, everything besides conkeror and mypaint is already packaged.
<youlysses>Also, AFK -- ~30 minutes.
<Steap>youlysses: then package conkeror :)
<Steap>youlysses: you may want to attend the online hackathon at the end of the month
<mark_weaver>youlysses: the fastest path to awesomeness is for each of us to contribute recipes for the packages that we care about :)
<youlysses> Sorry, back.
<youlysses>mark_weaver: Steap: Yeah, and that motivation of having a system I want to switch to full-time, just needing to package a
<youlysses>*few things, I think will get me there the rest of the way.
<youlysses>How would I mark a license, that is under more than one license? libtorrent is triple-licensed ... under MPL, LGPL, and GPL.
<youlysses>*mark a package, under more than one license.
<youlysses>Also, I forgot -- how do you find what the base32 encoding is for a .tar.gz package?
<youlysses>Evidently, I must have been fed misinformation or atleast non-realtive info -- checking the latest tarbars, they're under gplv2.
<mark_weaver>to get the base32, use "guix hash <filename>".
<mark_weaver>youlysses: ^^
<mark_weaver>youlysses: I'm not sure about multiple licenses, but I see that some packages do something like this: (license (list gpl3+ bsd-4 public-domain)), e.g. 'util-linux' in linux.scm.
<mark_weaver>youlysses: however, I think that means that some files are covered by gplv3-or-later, other files are covered by bsd-4, and others are in the public domain. I'm not sure how to represent dual-licensing. It's a question for one of the more experienced Guix devs.
<youlysses>mark_weaver: Any idea why the offical packages are just marked as GPLv2 currently, then?
<mark_weaver>which official packages?
<youlysses> http://libtorrent.rakshasa.no/downloads/
<youlysses>Here's what I have thus-far; http://paste.lisp.org/display/138865
<youlysses>I'm not sure about the legality of the description and synopsis; Ripped right-from wikipedia...
<mark_weaver>youlysses: well, the README mentions that there are two files in there that are triple-licensed.
<mark_weaver>I'm not a core Guix dev. I've contributed some improvements, but I'm not the best person to ask about packaging details.
<youlysses>mark_weaver: That's fine; I can wait. :^)
<mark_weaver>but when you post your proposed patch to the mailing list, please mention the triply-licensed files.
<youlysses>Can do.
<mark_weaver>however, I know a few things about license checking. First of all, never trust the README or the LICENSE file at the top. The best resource I know for checking licenses are the Debian copyright files, e.g. http://ftp-master.metadata.debian.org/changelogs//main/libt/libtorrent/libtorrent_0.13.2-1_copyright
<mark_weaver>more generally, you can find these by going to http://packages.debian.org/<package-name>, choosing the relevant package, and then clicking on the "Copyright File" link in the right column.
<youlysses>mark_weaver: Cool, noted. :^)
<mark_weaver>youlysses: the "(inputs `(("")))" line is wrong. if there are no inputs, then remove that line entirely.
<mark_weaver>I guess that (inputs '())) would also be correct, but it's not needed.
<mark_weaver>does 'rtorrent' not depend on 'libtorrent'?
<youlysses>mark_weaver: I think I need to throw in g++, and maybe more for libtorrent -- that being said... yeah, dang it. :^)
<mark_weaver>youlysses: well, you probably don't need g++. I think that's considered an input by default.
<mark_weaver>anyway, the build daemon does the building in the chroot where only the inputs are available, so if something's missing, you'll notice it because it won't build (or it will be missing features in the case of an optional dependency)
<mark_weaver>youlysses: according to the Debian copyright file, the license is GPLv2-or-later, not GPLv2
<mark_weaver>which means I guess you want (license gpl2+), not (license gpl2)
<mark_weaver>according to Debian, rtorrent depends on libtorrent
<mark_weaver>looks like rtorrent is gpl2+ as well
<youlysses>mark_weaver: Yeah, I've made changes on/for both in that direction.
<mark_weaver>cool :)
<mark_weaver>youlysses: note, when you do the build using guix, I recommend looking over the 'configure' output, to see if it's missing any optional dependencies that you consider important.
<mark_weaver>(which indicates missing inputs)
<youlysses>Am I missing something? Right now, I'm trying to do a "guix build ~/directory-to/rtorrent.scm" and nothing it's complaining for/on an unknown package.
<mark_weaver>that's not the right usage. the argument to 'guix build' is a package name, not a SCM file.
<mark_weaver>when I do this, I have a git checkout of the guix repo, and I put the file directly into guix/gnu/packages/
<mark_weaver>but it's also possible to read from an arbitrary scheme file.. let me refresh my memory how to do that.
<youlysses>mark_weaver: Oh, it builds from a package in a system-defined directory?
<youlysses>I can certainly move it there, I just have no idea where that is on the system.
*youlysses starts digging.
<mark_weaver>youlysses: do you have a git checkout of guix?
<mark_weaver>or did you build from tarball?
<youlysses>mark_weaver: 0.3 tar-ball.
<mark_weaver>okay, here's an easy solution for now. put your .scm file in a directory gnu/packages/*.scm
<mark_weaver>actually, nvm. give me a moment.
<mark_weaver>okay, I think you can do this: GUILE_LOAD_PATH=<DIR_WITH_RTORRENT_SCM> guix build -e '(@@ (rtorrent) libtorrent)'
<mark_weaver>or, better yet, if you have $DIR/gnu/packages/rtorrent.scm, then do: GUILE_LOAD_PATH=$DIR guix package -i libtorrent
<mark_weaver>I think that will work, anyway.
<mark_weaver>(I always work in the git repo myself)
<youlysses>I suppose, if I'm doing this, then I might as-well pull from the repo. :^P
<mark_weaver>yeah, if you plan to contribute to guix, that's probably best.
<mark_weaver>youlysses: you'll need recent autoconf and automake though.
<mark_weaver>(but you could use the 'autoconf' and 'automake' built with guix :)
<youlysses>How recent? I'm on Fedora 19, right-now. :^P
<mark_weaver>youlysses: just do: guix package -i automake -i autoconf
<mark_weaver>Fedora 19 might already have them, but I don't know.
<youlysses>Why does guix have that weird, repeated syntax? Why doesn't it follow just general prefix-notation?
<mark_weaver>you mean the repeated -i?
<youlysses>Yup.
<mark_weaver>well, "guix package" does fairly arbitrary atomic changes to your profile, and that can be more than just installs.. you could install some things, remove some things, upgrade some things, etc. all in one atomic operation.
<mark_weaver>so it can't simply be -i and then everything after that is a package name.
<mark_weaver>instead, each -i takes one argument.
<youlysses>Couldn't guix know these built-in options and assume everything that follows, falls under suit?
<mark_weaver>that said, I tend to agree that the syntax is a bit awkward when installing many packages at once. maybe something to bring up on the mailing list?
<mark_weaver>again, I'm not a core Guix dev, at least not yet.
<youlysses>mark_weaver: Again, fair-enough. :^)
<youlysses>I'll have a general list of "Greviences and Concerns" that I'll submit, probably next weekend. :^P
<mark_weaver>fair enough :) Guix is still a young project, and rough around the edges.
<youlysses>mark_weaver: Coming from vast amounts of inexperience in this realm (packaging and even to a large degree scheme) it certainly does seems rough in some areas, but I'm very hopeful and too hopefully will be running Guix fullitme and contributing on a regular basis soon after. :^)
<mark_weaver>yeah, I'm very excited about the potential of Guix. I intend to switch all of my machines to it almost as soon as its bootable.
<youlysses> So, pulled and in my ~/gnu/packages/ and I copied my rtorrent.scm into said directory -- ran "GUILE_LOAD_PATH=~/gnu/packages/ guix build rtorrent ... and nothing. :^U
<youlysses>"*
<mark_weaver>youlysses: you can't use ~ there. ~ is interpreted by the shell, but not when setting an environment variable.
<mark_weaver>youlysses: you need to specify an explicit absolute pathname.
<mark_weaver>youlysses: also, you shouldn't set it to /home/FOO/gnu/packages.. instead, set it to /home/FOO, if that directory contains gnu/packages/*.scm
<mark_weaver>Guix looks for modules of the form (gnu packages *), and that translates to looking for $DIR/gnu/packages/*.scm, where DIR is an element in the guile load path.
<youlysses>Ok, well the directory is on the top-level in my user's home and starts at "gnu" and I run "GUILE_LOAD_PATH=/home/youlysses/ guix build rtorrent and it's still not finding it... :
<youlysses>+
<youlysses>*:^P
<youlysses>Same for all different combinations of "guix build libtorrent && guix package -i libtorrent/rtorrent" etc. :^P
<mark_weaver>hmm
<mark_weaver>time to look at the code, I guess.
<youlysses>mark_weaver: It's possible I'm more tired than I thought and I'm making a misstep somewhere, but if that is the case, it's not obvious to-me where. :^P
<mark_weaver>oh, I see.
<mark_weaver>you don't have a 'define-module' declaration at the top of that file, do you?
<mark_weaver>it should be (gnu packages rtorrent), assuming that it's in $DIR/gnu/packages/rtorrent.scm
<mark_weaver>since you want to contribute this to upstream guix presumably, you might want to look at some of the other files in gnu/packages/ and emulate them.
<mark_weaver>youlysses: ^^
<mark_weaver>there are ways you could load that file anyway, and use it to build the package, but the easy integrated things like 'guix package -i' and 'guix build' only look in the (gnu packages *) modules for packages.
<mark_weaver>youlysses: if you want to know how to build arbitrary package objects from a Guile REPL, and generally for Guix internals, you could watch Ludovic's presentation at the GNU Hackers Meeting: http://audio-video.gnu.org/video/ghm2013/
<youlysses>Still not finding it. Here's the expression thus-far.
<youlysses> http://paste.lisp.org/display/138867
<youlysses>Also, yeah -- I was planning on doing so this/last weekend, but I ended up having to go home to my parents to deal with a minor "family emergency"... that being said, I think I'll have some time this coming weekend to finally watch it. :^)
<mark_weaver>youlysses: oh well, sorry to apparently be clueless about this. Like I said, I've only contributed a little bit to Guix and my method of operating is different.
<youlysses>mark_weaver: Really, no problem -- it's just a stronger motivation to get a lot more in-depth to/around the system in the weeks/months to come. :^)
*mark_weaver --> zzz
<youlysses>mark_weaver: o/
<mark_weaver>youlysses: hopefully civodul will be online soon and can provide better help :)
<youlysses>mark_weaver: Welp, I might be heading to bed soon too ... :^P