From mboxrd@z Thu Jan 1 00:00:00 1970 From: swedebugia Subject: Help with substitute* Date: Tue, 13 Nov 2018 22:29:34 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------E0560258CE461D7CC7B7A193" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMgox-0001CH-Ge for guix-devel@gnu.org; Tue, 13 Nov 2018 17:06:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMgot-0006rF-7h for guix-devel@gnu.org; Tue, 13 Nov 2018 17:06:07 -0500 Received: from mx1.riseup.net ([198.252.153.129]:35333) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gMgos-0006qr-RT for guix-devel@gnu.org; Tue, 13 Nov 2018 17:06:03 -0500 Received: from piha.riseup.net (piha-pn.riseup.net [10.0.1.163]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id 89B0B1A0221 for ; Tue, 13 Nov 2018 13:29:36 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by piha.riseup.net with ESMTPSA id E6DF8666B4 for ; Tue, 13 Nov 2018 13:29:35 -0800 (PST) Content-Language: en-US List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org This is a multi-part message in MIME format. --------------E0560258CE461D7CC7B7A193 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi I refactored my substitute* into that below. Now it runs without substitute anything :S Can some of you spot the error causing this? -- Cheers Swedebugia --------------E0560258CE461D7CC7B7A193 Content-Type: text/x-patch; name="0001-gnu-Add-ufw.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-gnu-Add-ufw.patch" >From ad2a9291cefeed2f2e7294b1608b1e067bdf06f6 Mon Sep 17 00:00:00 2001 From: swedebugia Date: Sat, 10 Nov 2018 21:39:04 +0100 Subject: [PATCH] gnu: Add ufw * gnu/packages/networking.scm: New variable. --- gnu/packages/networking.scm | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 5504742fa..5d9110138 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -2262,3 +2262,48 @@ allow all other machines, without direct access to that network, to be relayed through the machine the Dante server is running on. The external network will never see any machines other than the one Dante is running on.") (license (license:non-copyleft "file://LICENSE")))) + +(define-public ufw + ;; Select the branch named "release/0.35": + (let* ((commit "fd93d37a782d4f736201df508fb86e72641874d8")) + (package + (name "ufw") + (version "0.35") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.launchpad.net/ufw") + (commit commit))) + (sha256 + (base32 + "10r2ga1w5vmg8m4z5yim01cd0g8cs6ws2h65vaj6ilg8yp8d90f9")) + (file-name (git-file-name name version)))) + (build-system python-build-system) + (inputs `(("iptables" ,iptables))) + (arguments + ;; FIXME: All tests fail with: ModuleNotFoundError: No module named + ;; 'ufw' + `(#:tests? #f + #:use-setuptools? #f + #:phases (modify-phases %standard-phases + (add-before 'build 'fix-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (iptables (assoc-ref inputs "iptables"))) + (substitute* "setup.py" + (("iptables_exe = ''") + (string-append "iptables_exe = '" iptables "/sbin/iptables'")) + (("iptables_dir = ''") + (string-append "iptables_dir = '" iptables "/sbin/'")) + (("real_confdir = os.path.join('/etc')") + (string-append "real_confdir = '" out "/etc/'")) + (("real_statedir = os.path.join('/lib', 'ufw')") + (string-append "real_statedir = '" out "/lib/ufw'")))) + #t))))) + (home-page "https://launchpad.net/ufw") + (synopsis "Uncomplicated firewall") + (description "Uncomplicated Firewall (UFW) is a program for managing a +netfilter firewall designed to be easy to use. It uses a command-line +interface consisting of a small number of simple commands, and uses iptables +for configuration.") + (license license:gpl3)))) -- 2.18.0 --------------E0560258CE461D7CC7B7A193--