* Mixing build systems
@ 2019-05-01 19:53 Pronaip
2019-05-03 5:26 ` Ricardo Wurmus
0 siblings, 1 reply; 2+ messages in thread
From: Pronaip @ 2019-05-01 19:53 UTC (permalink / raw)
To: guix-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
Hi, I'm (still) trying to build Mininet and it uses both a Makefile for building an C executable and setup.py to install its Python modules. I looked at the soundconverter package to get some hints for mixing build systems but couldn't get very far, I get all sorts of (mostly cryptic) error messages, usually about missing modules.
What should I do? I'm pretty new to Guile and Guix but I've packaged software for the AUR before.
I attached the code I currently have.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mininet.scm --]
[-- Type: text/x-scheme; name="mininet.scm", Size: 2668 bytes --]
(define-module (raingloom packages mininet)
#:use-module (gnu packages networking)
#:use-module (gnu packages admin)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages linux)
#:use-module (gnu packages man)
#:use-module (gnu packages bash)
#:use-module (gnu packages gcc)
#:use-module (gnu packages)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (guix licenses))
(define-public mininet
(package
(name "mininet")
(version "2.2.2")
(source (origin
(method git-fetch)
(uri (git-reference
(url "git://github.com/mininet/mininet.git")
(commit version)))
(sha256 (base32 "18w9vfszhnx4j3b8dd1rvrg8xnfk6rgh066hfpzspzqngd5qzakg"))
(file-name (git-file-name name version))
(modules '((guix build utils)))
(snippet
'(begin
(substitute* "Makefile"
(("cc") "gcc")
(("BINDIR =") "BINDIR ?=")
(("MANDIR =") "MANDIR ?="))
#t))))
(build-system gnu-build-system)
(arguments
`(#:imported-modules
((guix build python-build-system)
(guix build gnu-build-system))
#:modules
((guix build utils)
(guix build python-build-system) #:prefix python:
(guix build gnu-build-system))
#:phases
(modify-phases %standard-phases
(delete 'configure)
(delete 'check)
(delete 'build)
;(add-after 'unpack 'ensure-no-mtimes-pre-1980 ensure-no-mtimes-pre-1980)
;(add-after 'ensure-no-mtimes-pre-1980 'enable-bytecode-determinism)
(add-before 'install 'create-dirs
(lambda _
(mkdir-p (string-append %output "/bin"))
(mkdir-p (string-append %output "/share/man/man1"))))) ;why does build run test???
#:make-flags
(list (string-append "MANDIR=" %output "/bin")
(string-append "BINDIR=" %output "/share/man/man1"))))
(inputs
`(("openvswitch" ,openvswitch)
("python2" ,python-2.7)
("python2-pyflakes" ,python2-pyflakes)
("ethtool" ,ethtool)
("inetutils" ,inetutils)
("net-tools" ,net-tools)
("psmisc" ,psmisc)
("libcgroup" ,libcgroup)
("iproute2" ,iproute)
("iperf" ,iperf)
("bash" ,bash)))
(native-inputs
`(("gcc" ,gcc)
("help2man" ,help2man)))
(synopsis "Rapid Prototyping for Software Defined Networks")
(description "Mininet emulates a complete network of hosts, links, and switches on a single machine.")
(home-page "http://mininet.org/")
(license bsd-style)))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Mixing build systems
2019-05-01 19:53 Mixing build systems Pronaip
@ 2019-05-03 5:26 ` Ricardo Wurmus
0 siblings, 0 replies; 2+ messages in thread
From: Ricardo Wurmus @ 2019-05-03 5:26 UTC (permalink / raw)
To: Pronaip; +Cc: guix-devel@gnu.org
Pronaip <pronaip@protonmail.com> writes:
> Hi, I'm (still) trying to build Mininet and it uses both a Makefile
> for building an C executable and setup.py to install its Python
> modules. I looked at the soundconverter package to get some hints for
> mixing build systems but couldn't get very far, I get all sorts of
> (mostly cryptic) error messages, usually about missing modules.
For future messages please always include the error messages.
Looking at the soundconverter package we see this:
(arguments
`(#:imported-modules ((guix build python-build-system)
(guix build glib-or-gtk-build-system)
,@%gnu-build-system-modules)
#:modules ((guix build glib-or-gtk-build-system)
(guix build utils)
((guix build gnu-build-system) #:prefix gnu:)
((guix build python-build-system) #:prefix python:))
#:phases …
))
What you have is:
#:imported-modules
((guix build python-build-system)
(guix build gnu-build-system)
^— add ,@%gnu-build-system-modules here
)
#:modules
((guix build utils)
(guix build python-build-system) #:prefix python:
^— wrap this in parentheses
(guix build gnu-build-system))
Note that the license field is also incorrect. There is no license by
the name “bsd-style”.
--
Ricardo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-03 5:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-01 19:53 Mixing build systems Pronaip
2019-05-03 5:26 ` Ricardo Wurmus
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.