Re: core-updates call for testing

2020-04-23 Thread sirgazil
  On Thu, 23 Apr 2020 23:24:23 + Marius Bakke  
wrote 
 > Hello Guix!
 > 
 > The "core-updates" branch is ready for testing!  According to 'guix
 > weather', the substitute coverage is slightly better than on "master"
 > for x86_64.  You can get it by running:
 > 
 >   guix pull --branch=core-updates
 > 
 > Please try upgrading your profiles and systems and file bugs for
 > anything that does not work for you.  GNOME users in particular are
 > encouraged to try the new GNOME 3.34 and report any regressions.

I pulled from core-updates without problems, but "guix upgrade" failed.

First, when running "guix upgrade", I got the following message, which I think 
is confusing because I use GNU, not Guix on a foreign distro:

$ guix upgrade
guile: warning: failed to install locale
hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' 
package and defining `GUIX_LOCPATH', along these lines:

 guix package -i glibc-utf8-locales
 export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"

See the "Application Setup" section in the manual, for more info.

Then, everything was going alright, until building emacs-guix derivation failed:

building /gnu/store/6kdl0pyv7i571d6b4vcxskr75ffqw1mk-emacs-guix-0.5.2.drv...
\ 'configure' phasebuilder for 
`/gnu/store/6kdl0pyv7i571d6b4vcxskr75ffqw1mk-emacs-guix-0.5.2.drv' failed with 
exit code 1
build of /gnu/store/6kdl0pyv7i571d6b4vcxskr75ffqw1mk-emacs-guix-0.5.2.drv 
failed
View build log at 
'/var/log/guix/drvs/6k/dl0pyv7i571d6b4vcxskr75ffqw1mk-emacs-guix-0.5.2.drv.bz2'.
guix upgrade: error: build of 
`/gnu/store/6kdl0pyv7i571d6b4vcxskr75ffqw1mk-emacs-guix-0.5.2.drv' failed


The build log said:

starting phase `configure'
source directory: "/tmp/guix-build-emacs-guix-0.5.2.drv-0/emacs-guix-0.5.2" 
(relative from build: ".")
build directory: "/tmp/guix-build-emacs-guix-0.5.2.drv-0/emacs-guix-0.5.2"
configure flags: 
("CONFIG_SHELL=/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash"
 
"SHELL=/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash"
 "--prefix=/gnu/store/bqplgazij77awh62579p56wbnxdb1c2l-emacs-guix-0.5.2" 
"--enable-fast-install" "--build=x86_64-unknown-linux-gnu")
configure: WARNING: unrecognized options: --enable-fast-install
checking for a BSD-compatible install... 
/gnu/store/57xj5gcy1jbl9ai2lnrqnpr0dald9i65-coreutils-8.32/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... 
/gnu/store/57xj5gcy1jbl9ai2lnrqnpr0dald9i65-coreutils-8.32/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for pkg-config... 
/gnu/store/krpyb0zi700dcrg9cc8932w4v0qivdg9-pkg-config-0.29.2/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
configure: checking for guile 2.2
configure: checking for guile 2.0
configure: error: 
No Guile development packages were found.

Please verify that you have Guile installed.  If you installed Guile
from a binary distribution, please verify that you have also installed
the development packages.  If you installed it yourself, you might need
to adjust your PKG_CONFIG_PATH; see the pkg-config man page for more.

command 
"/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash" 
"./configure" 
"CONFIG_SHELL=/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash"
 
"SHELL=/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash"
 "--prefix=/gnu/store/bqplgazij77awh62579p56wbnxdb1c2l-emacs-guix-0.5.2" 
"--enable-fast-install" "--build=x86_64-unknown-linux-gnu" failed with status 1



core-updates call for testing

2020-04-23 Thread Marius Bakke
Hello Guix!

The "core-updates" branch is ready for testing!  According to 'guix
weather', the substitute coverage is slightly better than on "master"
for x86_64.  You can get it by running:

  guix pull --branch=core-updates

Please try upgrading your profiles and systems and file bugs for
anything that does not work for you.  GNOME users in particular are
encouraged to try the new GNOME 3.34 and report any regressions.

If you don't feel like jumping into the deep end, you can pull it to a
temporary location instead of the default ~/.config/guix/current:

  guix pull -p /tmp/core-updates --branch=core-updates
  /tmp/core-updates/bin/guix package -u

That way you don't have to 'guix pull --roll-back' to get at your
previous Guix (from the "master" branch).

Enjoy!


signature.asc
Description: PGP signature


Re: Guixsd and meshlab ?

2020-04-23 Thread Ekaitz Zarraga
>
> I see you submitted it in the meantime:
>
> https://issues.guix.gnu.org/issue/40492
>
> Almost there! :-)
>
> Thanks,
> Ludo’.


Yeah, still have to fight a little with it.

Thanks!



Re: Wi-Fi connection during gui-based installation

2020-04-23 Thread Ludovic Courtès
Hi Stephen,

Stephen Minton  skribis:

> I successfully put guix-system-install-1.0.1.x86_64-linux.iso on a mem stick 
> and booted.
>
> GUI installer hung up on connecting to wifi network (successfully found 
> interface and scanned, showing target wifi name) on message "connection in 
> progress  Connecting to ... please wait.

Yeah, unfortunately we discovered this bug in the 1.1.0 image (it’s now
fixed: ).

If it’s an option for you, I’d suggest installing over Ethernet.

> I went to manual install, network wifi and successfully entered a 
> wpa_supplicant.conf and connected (ping -c 3 gnu.org)
>
> I think the script's wpa_supplicant.conf is missing some parameter.  How do I 
> specify that, or break out of the script to connect to the network manually 
> and then return?  

What does ‘wpa_supplicant.conf’ contains?

> Is there some other forum to ask this question?

This is the right forum.

Thanks for your feedback, and apologies for the bug!

Ludo’.



Re: Italian translation

2020-04-23 Thread Ludovic Courtès
Hello Alessandro & all!

Miguel Arruga Vivas  skribis:

> Alessandro Cipriani  writes:
>> Hi guys,
>
> Ciao, Alessandro!
>  
>> i'm alessandro and i'm from italy. I'd like to participate in this 
>> project, i like it very much. I'm a software developer since 2007.
>
> I'm sure your work will be appreciated.  Please, make sure to read the
> section of the manual about contributions[1] and don't be afraid to
> ask.

Seconded!

There are several things up for translation:

  1. Messages printed by the commands:
 .

  2. Package descriptions:
 .

  3. The manual:
 .

  4. The Cookbook, which can be seen at
 , but I think it’s not on the
 Translation Project (yet?).  Julien and Florian should know more.

Looking forward to Italian translations!  :-)

Ludo’.



Re: Guixsd and meshlab ?

2020-04-23 Thread Ludovic Courtès
Hi,

Ekaitz Zarraga  skribis:

> On Tuesday, April 7, 2020 1:25 AM, Olivier Farges 
>  wrote:
>
>> Hi Guix,
>>
>> has anyone ever had the opportunity to install meshlab and could possibly 
>> provide a corresponding .scm file?

[...]

> I didn't but I'm interested on it and I would take the time to make one.
>
> If you are not in a hurry and can wait a couple of days I can make the 
> package for you.

I see you submitted it in the meantime:

  https://issues.guix.gnu.org/issue/40492

Almost there!  :-)

Thanks,
Ludo’.



Re: failure to create disk-image

2020-04-23 Thread Ludovic Courtès
Hi Roy,

Roy Lemmon  skribis:

> installing bootloader...
> Backtrace:
>1 (primitive-load "/gnu/store/abqhniaagz11v7w8kz83ha1s6fc…")
> In ./gnu/build/vm.scm:
> 590:6  0 (initialize-hard-disk "/dev/vda" #:bootloader-package _ …)
>
> ./gnu/build/vm.scm:590:6: In procedure initialize-hard-disk:
> Throw to key `srfi-34' with args `(# "'/gnu/store/xlcbi7dc89n4wvyz4jk6j0g4590ymi6q-grub-efi-2.04/sbin/grub-install
> --boot-directory /fs/boot --bootloader-id=Guix --efi-directory /fs/dev/vda'
> exited with status 1; output follows:\n\n
>  /gnu/store/xlcbi7dc89n4wvyz4jk6j0g4590ymi6q-grub-efi-2.04/sbin/grub-install:
> error:
> /gnu/store/xlcbi7dc89n4wvyz4jk6j0g4590ymi6q-grub-efi-2.04/lib/grub/i386-pc/modinfo.sh
> doesn't exist. Please specify --target or --directory.\n"] 7fe479410240>)'.

I think the key issue here was GRUB failing to install itself.

Did you eventually find out wha was going wrong?

It looks like ‘grub-efi’ was chosen whereas the VM is actually “legacy
BIOS”, not EFI.

Thanks,
Ludo’.



Re: Guix does not find packages

2020-04-23 Thread Ludovic Courtès
Hi,

Ricardo Wurmus  skribis:

> Tobias Geerinckx-Rice  writes:
>
>> I *still* think we should either do nothing, or call $PAGER
>> automatically when stdout is a TTY.
>
> We should call $PAGER when it’s set.
>
> Isn’t there a bug report about this…?

I’m noticing this thread just now (oops!) and I think a bug report is in
order.  I didn’t know there was consensus on invoking $PAGER, but since
there is, let’s do that!

Ludo’, who would like to not prevent progress.  :-)



Re: Configuring Guix with JavaScript?

2020-04-23 Thread Christopher Lemmer Webber
The main challenge in configuring-Guix-with-Javascript probably
surrounds usage of macros that are not available in Javascript... I'm
not sure how many there are that are a sufficient barrier to use.  That
and that the Javascript implementation is still a little bit shaky (but
could use help).  But this is all said without having tried it.

I would think that defining packages would not be possible with
Javascript, but defining a system definition probably would be.  I am
not sure.  It could be worth exploring, and at minimum would be an
interesting result.

zimoun writes:

> Dear,
>
> On Wed, 22 Apr 2020 at 03:09, Stephen Paul Weber
>  wrote:
>
>> However, Guile can also understand other syntaxes, notably advertising
>> ECMAscript (JavaScript) and EMACS Lisp syntax.  So my question is: can I
>> configure Guix using JavaScript instead of Scheme?  If not, is it a
>> fundamental limitation or something worth me poking at?  If so, has anyone
>> tried it?  Does anyone have a suggestion where I should start in trying this
>> out?
>
> Interesting idea. :-)
>
> AFAIK, it is currently not possible.
> Recently, experimental JSON support has been added [1].
>
> Well, I am not sure that Guile can combine several languages. Other
> said, Guile can compile and run Scheme scripts and it can too compile
> and run say ECMAscript but I do not know if one could write/define a
> module using Scheme and call this very module from ECMAscript; as for
> example Python and Hy [2] (lisp) do using the Python AST module.
>
> And combining is not easy because some "concepts" in one language does
> not necessary apply to another language.
> It is not because the compiler has several front-ends (for different
> languages) and use the same internals [3] that it can mix them; e.g.,
> GCC: Fortran, C, Ada, etc. and it is not straightforward to combing
> them.
> Otherwise, life would be too simple. ;-)
>
>
> But I should miss a point...
>
>
> [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40629
> [2] https://docs.hylang.org/en/stable/
> [3] 
> https://www.gnu.org/software/guile/manual/html_node/Compiling-to-the-Virtual-Machine.html
>
>
>
> As a starting point, I would ask to Guile's mailing list how to write
> a module in say Scheme and use it from say ECMAscript --- or least
> where start from to do so.
>
>
> All the best,
> simon



Re: Configuring Guix with JavaScript?

2020-04-23 Thread zimoun
Dear,

On Wed, 22 Apr 2020 at 03:09, Stephen Paul Weber
 wrote:

> However, Guile can also understand other syntaxes, notably advertising
> ECMAscript (JavaScript) and EMACS Lisp syntax.  So my question is: can I
> configure Guix using JavaScript instead of Scheme?  If not, is it a
> fundamental limitation or something worth me poking at?  If so, has anyone
> tried it?  Does anyone have a suggestion where I should start in trying this
> out?

Interesting idea. :-)

AFAIK, it is currently not possible.
Recently, experimental JSON support has been added [1].

Well, I am not sure that Guile can combine several languages. Other
said, Guile can compile and run Scheme scripts and it can too compile
and run say ECMAscript but I do not know if one could write/define a
module using Scheme and call this very module from ECMAscript; as for
example Python and Hy [2] (lisp) do using the Python AST module.

And combining is not easy because some "concepts" in one language does
not necessary apply to another language.
It is not because the compiler has several front-ends (for different
languages) and use the same internals [3] that it can mix them; e.g.,
GCC: Fortran, C, Ada, etc. and it is not straightforward to combing
them.
Otherwise, life would be too simple. ;-)


But I should miss a point...


[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40629
[2] https://docs.hylang.org/en/stable/
[3] 
https://www.gnu.org/software/guile/manual/html_node/Compiling-to-the-Virtual-Machine.html



As a starting point, I would ask to Guile's mailing list how to write
a module in say Scheme and use it from say ECMAscript --- or least
where start from to do so.


All the best,
simon



Re: Help on writing package definitions

2020-04-23 Thread zimoun
On Thu, 23 Apr 2020 at 18:55, Leo Famulari  wrote:
>
> On Thu, Apr 23, 2020 at 08:32:35AM +0200, Emmanuel Medernach wrote:
> > - Why not export the license record type from license.scm ? Some project
> > has its own license and I cannot create it.
>
> In general, we don't add project-specific licenses to licenses.scm or as
> their own variables.
>
> Instead, we use the non-copyleft, fsf-free, or fsdg-compatible license
> variables.

Considering the inclusion of such packages in Guix.

But if one wants to define its own custom license used by its own
custom package living in its own custom channel, then the API needs to
expose the 'license' record. Done here [1].

[1] http://issues.guix.gnu.org/40795


Cheers,
simon



Re: Help on writing package definitions

2020-04-23 Thread Leo Famulari
On Thu, Apr 23, 2020 at 08:32:35AM +0200, Emmanuel Medernach wrote:
> - Why not export the license record type from license.scm ? Some project
> has its own license and I cannot create it.

In general, we don't add project-specific licenses to licenses.scm or as
their own variables.

Instead, we use the non-copyleft, fsf-free, or fsdg-compatible license
variables.



Re: Help on writing package definitions

2020-04-23 Thread zimoun
On Thu, 23 Apr 2020 at 14:21, Emmanuel Medernach
 wrote:

> Yes, it is not listed in this list because it is specific to the project. I 
> would like to be able to create one new license but the license function is 
> not exported.

It appears to me a good idea to export the record 'license'.

The tiniest trivial patch [1] ;-)

[1] http://issues.guix.gnu.org/40795


> How do you debugged this issue to find that we have to add pkgconfig ?

Because the 'modify-phases' uses pkg-config and everything is isolated.

To be fully clean, 'pkg-config' should go to 'native-inputs' [2];
maybe the others too, do not know enough about your package.

[2] https://guix.gnu.org/manual/en/guix.html#package-Reference


All the best,
simon



Re: Help on writing package definitions

2020-04-23 Thread Vincent Legoll

On 23/04/2020 14:09, Emmanuel Medernach wrote:

Hello Vincent, glad to read from you here !


Small world ;-)

Hope to see you soon(-ish) in Strasbourg ! [1]


Thanks for your hints, I didn't realize that it should return
#t at the  end. However I still have the same error.


Yes, this is not the one breaking the build. I'm still low on
the scheme/guix learning curve.

I think you got a more complete answer from Simon.

The pkgconfig & libfabric hints should help.

[1] BTW, I ate with Jérôme a few weeks before the lock-down.

--
Vincent Legoll



Re: Help on writing package definitions

2020-04-23 Thread Vincent Legoll

Hello Emmanuel,

really nice to see you here !

A few smallish comments on your code (I'll try to build it later)

You mixed tabs & spaces for indentation.

Looks like the second lambda does not return #t, if I'm not mistaken
the return value will be setenv's which is unspecified.

I'll try to be more helpful in my next reply ;-)

And sorry if my answer broke the threading, I just subscribed...

--
Vincent Legoll



sane-airscan (Re: [OT] Free software compatible Multifuncion printer

2020-04-23 Thread Giovanni Biscuolo
Hello Guix,

sorry for the OT but maybe this could be useful for someone else here

Giovanni Biscuolo  writes:

[...]

> I just got a brend new HP LaserJet MFP M227sdn, HP ships hplip &
> co. since long ago and they have a pretty informative list of supported
> printers

[...]

> ...that means a bug report on Ubuntu Launchpad :-S
> https://bugs.launchpad.net/hplip/+bug/1874254

in that thread brian_p pointed me to sane-airscan
https://github.com/alexpevzner/sane-airscan

--8<---cut here---start->8---

If you are a lucky owner of scanner or MFP which works via network with
Apple devices, I have a good news for you: now your scanner works with
Linux as well!

In theory, this backend should work with any scanner that supports the
eSCL protocol (unofficially known as AirScan or AirPrint scanning). In
practice, it was tested on several devices from Canon, Kyocera and HP,
and this list constantly grows, though slowly, so feedback regarding
other devices is very welcomed.

Apple maintains a comprehensive list of compatible devices, but please
note, this list contains not only scanners and MFP, but pure printers as
well.

To use this backend, you don't need to install ScanGear from Canon,
HPLIP from HP or some other proprietary software from hardware
vendor. This backend works directly with your device and doesn't depend
on a 3rd party closed source components.

--8<---cut here---end--->8---

I've tested it using the provided Debian 10 packages (personal repo
hosted on software.opensuse.org) and it works.

It's GPL2+ but I still have to check if there are really no blobs

I'll try and make a Guix package, if I'll be able

HTH! Gio'


-- 
Giovanni Biscuolo

Xelera IT Infrastructures


signature.asc
Description: PGP signature


Re: Help on writing package definitions

2020-04-23 Thread Emmanuel Medernach
On Thu, Apr 23, 2020 at 12:00 PM zimoun  wrote:

> Dear,
>
>
> On Thu, 23 Apr 2020 at 10:29, Emmanuel Medernach
>  wrote:
>
> > - Why not export the license record type from license.scm ? Some project
> > has its own license and I cannot create it.
>
> You mean the project's license is not part of this list [1], right?
>
> [1] https://www.gnu.org/licenses/license-list.html
>
>
> Otherwise, I do not have the answer for your question. :-)
>
>
Yes, it is not listed in this list because it is specific to the project. I
would like to be able to create one new license but the license function is
not exported.


> > - I have errors when I try to build with guix that I don't have when I
> > build manually. I have a package (asiofi) which depends on another one
> > (libfabric) but the build does not find it. Here is my current file
> > attached and the command I use:
> >
> > # guix build -K --load-path=/home/emederna/src/packages -e '(@ (CBM)
> > asiofi)'
>
> Does the '#' at the beginning mean that your are running as root?
>
> Well, I find easier 1/ to log in as 'emederna' user and 2/ to run
>
>   guix build -L ~/src/packages asiofi
>
>
No, I am not root, this is my prompt :)

Ok, this command is much shorter.


> > CMake Error at test/CMakeLists.txt:9 (add_executable):
> >   Target "afi_msg_bw" links to target "OFI::libfabric" but the target was
> > not
> >   found.  Perhaps a find_package() call is missing for an IMPORTED
> target,
> > or
> >   an ALIAS target is missing?
>
> From my understanding, there are 3 "issues":
>
>  a) instead of create a full new package for libfabric, you could
> update the Guix one or use 'inherit', e.g., (not tested)
>
> (define-public my-libfabric
>   (inherit libfabric
>  (version "X.Y")
>  (source blablabla)))
>
>  b) missing '#t' to the phase 'add-before'
>
>  c) missing the package 'pkg-config', i.e.,
>#:use-module  (gnu packages pkg-config)
> and
> ("pkgconfig" ,pkg-config)
> in the list of inputs.
>
>
> Now, it seems compiling on my machine. :-)
>
>
Wonderful ! It works now. Thanks for your help.

How do you debugged this issue to find that we have to add pkgconfig ?

Emmanuel

>
> Hope that helps.
> simon
>


Re: Help on writing package definitions

2020-04-23 Thread Emmanuel Medernach
Hello Vincent, glad to read from you here !

Thanks for your hints, I didn't realize that it should return #t at the
end. However I still have the same error.

Emmanuel

On Thu, Apr 23, 2020 at 11:41 AM Vincent Legoll 
wrote:

> Hello Emmanuel,
>
> really nice to see you here !
>
> A few smallish comments on your code (I'll try to build it later)
>
> You mixed tabs & spaces for indentation.
>
> Looks like the second lambda does not return #t, if I'm not mistaken
> the return value will be setenv's which is unspecified.
>
> I'll try to be more helpful in my next reply ;-)
>
> And sorry if my answer broke the threading, I just subscribed...
>
> --
> Vincent Legoll
>


Re: Help on writing package definitions

2020-04-23 Thread zimoun
Dear,


On Thu, 23 Apr 2020 at 10:29, Emmanuel Medernach
 wrote:

> - Why not export the license record type from license.scm ? Some project
> has its own license and I cannot create it.

You mean the project's license is not part of this list [1], right?

[1] https://www.gnu.org/licenses/license-list.html


Otherwise, I do not have the answer for your question. :-)


> - I have errors when I try to build with guix that I don't have when I
> build manually. I have a package (asiofi) which depends on another one
> (libfabric) but the build does not find it. Here is my current file
> attached and the command I use:
>
> # guix build -K --load-path=/home/emederna/src/packages -e '(@ (CBM)
> asiofi)'

Does the '#' at the beginning mean that your are running as root?

Well, I find easier 1/ to log in as 'emederna' user and 2/ to run

  guix build -L ~/src/packages asiofi


> CMake Error at test/CMakeLists.txt:9 (add_executable):
>   Target "afi_msg_bw" links to target "OFI::libfabric" but the target was
> not
>   found.  Perhaps a find_package() call is missing for an IMPORTED target,
> or
>   an ALIAS target is missing?

>From my understanding, there are 3 "issues":

 a) instead of create a full new package for libfabric, you could
update the Guix one or use 'inherit', e.g., (not tested)

(define-public my-libfabric
  (inherit libfabric
 (version "X.Y")
 (source blablabla)))

 b) missing '#t' to the phase 'add-before'

 c) missing the package 'pkg-config', i.e.,
   #:use-module  (gnu packages pkg-config)
and
("pkgconfig" ,pkg-config)
in the list of inputs.


Now, it seems compiling on my machine. :-)


Hope that helps.
simon



Help on writing package definitions

2020-04-23 Thread Emmanuel Medernach
Hello Guixers !

I am new to Guix and try to write package definitions to automate and make
some installation reproducible.

I have few questions:

- Why not export the license record type from license.scm ? Some project
has its own license and I cannot create it.

- I have errors when I try to build with guix that I don't have when I
build manually. I have a package (asiofi) which depends on another one
(libfabric) but the build does not find it. Here is my current file
attached and the command I use:

# guix build -K --load-path=/home/emederna/src/packages -e '(@ (CBM)
asiofi)'
...
CMake Error at test/CMakeLists.txt:9 (add_executable):
  Target "afi_msg_bw" links to target "OFI::libfabric" but the target was
not
  found.  Perhaps a find_package() call is missing for an IMPORTED target,
or
  an ALIAS target is missing?

Manually the compilation works fine, what am I missing ?

Thanks in advance

Best regards,

Emmanuel Medernach

(define-module (CBM)

  #:use-module  (guix packages)
  #:use-module  (guix download)
  #:use-module  (guix build-system cmake)
  #:use-module  (guix build-system gnu)

  #:use-module  (gnu packages autotools)
  #:use-module  (gnu packages commencement) ;; gcc-toolchain

  #:use-module  (gnu packages boost)
  #:use-module  (gnu packages sqlite)

  #:use-module  ((guix licenses) #:prefix license:))


(define-public libfabric
  (package
(name "libfabric")
(version "1.9.1")
(source
 (origin
   (method url-fetch)
   (uri (string-append
 "https://github.com/ofiwg/libfabric/archive/v;
 version
 ".tar.gz"))
   (sha256
(base32
 "0sic649kg9jhljqhffgyc5pihpysc8gjg0hc924rs5wxv5qxypvn"
(build-system gnu-build-system)
(inputs
 `(("autoconf" ,autoconf) ;; autogen autoreconf
   ("automake" ,automake) ;; aclocal
   ("libtool" ,libtool) 
   ))

(home-page "https://github.com/ofiwg/libfabric;)
(synopsis "Open Fabrics Interfaces")
(description "Framework focused on exporting fabric communication services to applications.")
(license license:bsd-2)))

(define-public asiofi
  (package
(name "asiofi")
(version "0.4.1")
(source
 (origin
   (method url-fetch)
   (uri (string-append
 "https://github.com/FairRootGroup/asiofi/archive/v;
 version
 ".tar.gz"))
   (sha256
(base32
 "0q88k7kffpa66327gnd7wwzrhqnhmqxpgyqa68aqs7l28f4iq9sn"
(build-system cmake-build-system)
(inputs
 `(("gcc-toolchain" ,gcc-toolchain)
   ("libfabric" ,libfabric)
   ("boost" ,boost)))
(arguments
 `(;; #:configure-flags
   ;; (list
   ;; 	;; find_package uses _ROOT variables.
   ;; 	;; For compatibility, CMake is ignoring the variable.
   ;; 	(string-append "-DOFI_ROOT="
   ;; 		   (assoc-ref %build-inputs "libfabric")
   ;; 		   ))
   
   #:phases   
   (modify-phases
	%standard-phases
	(add-after
	 'unpack 'use-system-libraries
	 (lambda _
	   (substitute*
	"cmake/asiofiLib.cmake"
	(("### PUBLIC") "cmake_policy(SET CMP0074 NEW)"))
	   #t))
	(add-before
	 'configure 'OFI
	 (lambda _
	   (let ((libfabric-path (assoc-ref %build-inputs "libfabric")))
	 (let* ((var (getenv "PKG_CONFIG_PATH"))
	 	(result (string-append 
			 (if var (string-append var ":") "")
			 libfabric-path
			 "/lib/pkgconfig")))
	   (setenv "PKG_CONFIG_PATH" result

(home-page "https://github.com/FairRootGroup/asiofi;)
(synopsis "C++ Boost.Asio language bindings for OFI libfabric")
(description "")
(license license:lgpl2.1+)))