(let* ((gnu-phases (@ (guix build gnu-build-system) %standard-phases))) (modify-phases %standard-phases (add-before 'build 'configure (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin")) (man1 (string-append out "/share/man/man1"))) (mkdir-p bin) (mkdir-p man1) (substitute* "Makefile" (("/usr/bin") bin) (("/usr/share/man/man1") man1) (("all: codecheck test") "all: mnexec") (("cc") "gcc") (("python setup\\.py install") ":")) (substitute* "mininet/node.py" (("'mnexec'") (string-append "'" bin "/mnexec'"))) #t))) (add-before 'build 'build-mnexec (assoc-ref gnu-phases 'build)) (add-before 'install 'install-mnexec (assoc-ref gnu-phases 'install))))