* guix packages
@ 2014-08-24 8:02 Federico Beffa
2014-08-24 14:10 ` Andreas Enge
2014-08-25 18:46 ` Ludovic Courtès
0 siblings, 2 replies; 3+ messages in thread
From: Federico Beffa @ 2014-08-24 8:02 UTC (permalink / raw)
To: guix-devel
Hallo,
I've just discovered guix and have a question:
Given that guix is based on nix and currently nix has many more
packages available than guix, is there (or is it planned to have) an
automated procedure for porting nix packages to guix? (Actually a
bidirectional procedure would be interesting.)
If not, what is the main reason against that? If the problem has to do
with licenses, is it not enough to check the license declared withing
the package "recipe"?
Regards,
Fede
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: guix packages
2014-08-24 8:02 guix packages Federico Beffa
@ 2014-08-24 14:10 ` Andreas Enge
2014-08-25 18:46 ` Ludovic Courtès
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Enge @ 2014-08-24 14:10 UTC (permalink / raw)
To: Federico Beffa; +Cc: guix-devel
On Sun, Aug 24, 2014 at 10:02:30AM +0200, Federico Beffa wrote:
> Given that guix is based on nix and currently nix has many more
> packages available than guix, is there (or is it planned to have) an
> automated procedure for porting nix packages to guix? (Actually a
> bidirectional procedure would be interesting.)
The package declaration language is too different to import them from one
to the other. Also, we try to run the test suites of packages, and nix does
not. Regularly, there is a bit of work involved in getting the tests to run
(including patching and reporting bugs upstream).
But notice that you can run one on top of the other.
Andreas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: guix packages
2014-08-24 8:02 guix packages Federico Beffa
2014-08-24 14:10 ` Andreas Enge
@ 2014-08-25 18:46 ` Ludovic Courtès
1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2014-08-25 18:46 UTC (permalink / raw)
To: Federico Beffa; +Cc: guix-devel
Hello,
Just to complete Andreas’s response: there actually is a tool to import
package definitions from Nixpkgs, but it’s only stealthily mentioned in
the manual. However, it only imports the skeleton and not all the
details:
--8<---------------cut here---------------start------------->8---
$ guix import ~/src/nixpkgs guile
;;; SSAX warning: Skipping PI: xml
trace: lib.zip is deprecated, use lib.zipAttrsWith instead
trace: `mkStrict' is obsolete; use `mkOverride 0' instead.
trace: `types.list' is deprecated; use `types.listOf' instead
;; converted from /home/ludo/src/nixpkgs/pkgs/development/interpreters/guile/default.nix:10
(package
(name "guile")
(version "2.0.9")
(source
(origin
(method url-fetch)
(uri (string-append
"mirror://gnu/guile/guile-"
version
".tar.xz"))
(sha256
(base32
"0nw9y8vjyz4r61v06p9msks5lm58pd91irmzg4k487vmv743h2pp"))))
(build-system gnu-build-system)
(inputs
`(("libffi" ,libffi)
("libunistring" ,libunistring)
("libtool" ,libtool)
("readline" ,readline)
("pkg-config" ,pkg-config)
("gawk" ,gawk)
("hook" ,hook)))
(propagated-inputs
`(("libunistring" ,libunistring)
("libtool" ,libtool)
("boehm-gc" ,boehm-gc)
("gmp" ,gmp)))
(home-page "http://www.gnu.org/software/guile/")
(synopsis
"GNU Guile 2.0, an embeddable Scheme implementation")
(description
"GNU Guile is an implementation of the Scheme programming language, with
support for many SRFIs, packaged for use in a wide variety of
environments. In addition to implementing the R5RS Scheme standard
and a large subset of R6RS, Guile includes a module system, full access
to POSIX system calls, networking support, multiple threads, dynamic
linking, a foreign function call interface, and powerful string
processing.
")
(license
(attribute-set
((attribute
#<<location> file: "/home/ludo/src/nixpkgs/lib/licenses.nix" line: "197" column: "5">
"fullName"
"GNU Lesser General Public License version 3 or later")
(attribute
#<<location> file: "/home/ludo/src/nixpkgs/lib/licenses.nix" line: "196" column: "5">
"shortName"
"LGPLv3+")
(attribute
#<<location> file: "/home/ludo/src/nixpkgs/lib/licenses.nix" line: "198" column: "5">
"url"
"http://www.fsf.org/licensing/licenses/lgpl.html")))))
--8<---------------cut here---------------end--------------->8---
Apart from the license SNAFU, it actually works. ;-) (It works by
invoking ‘nix-instantiate’, so Nix must be installed.)
But if you look at the original definition in guile/default.nix, you’ll
notice that it contains things like this:
--8<---------------cut here---------------start------------->8---
# don't have "libgcc_s.so.1" on darwin
LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
postInstall = ''
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
# XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for
# why `--with-libunistring-prefix' and similar options coming from
# `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64.
sed -i "$out/lib/pkgconfig/guile-2.0.pc" \
-e 's|-lunistring|-L${libunistring}/lib -lunistring|g ;
s|^Cflags:\(.*\)$|Cflags: -I${libunistring}/include \1|g ;
s|-lltdl|-L${libtool}/lib -lltdl|g'
'';
--8<---------------cut here---------------end--------------->8---
The ‘LDFLAGS’ setting defines ‘LDFLAGS’ as an environment variable in
the build process, and the ‘postInstall’ thing defines a ‘postInstall’
environment variable, which Nixpkgs’s build tool, written in Bash, will
‘eval’.
This differs from Guix where the build-side code is written in Scheme,
not Bash, and where there’s no direct way to define environment
variables.
Long story short: ‘guix import’ gives you the skeleton of a package
definition, but doesn’t convert the more difficult part.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-25 18:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-24 8:02 guix packages Federico Beffa
2014-08-24 14:10 ` Andreas Enge
2014-08-25 18:46 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).