From owner-freebsd-haskell@freebsd.org Mon Oct 28 06:39:27 2019 Return-Path: Delivered-To: freebsd-haskell@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 19606176C36 for ; Mon, 28 Oct 2019 06:39:27 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 471lSG5Qw2z4b6h for ; Mon, 28 Oct 2019 06:39:26 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id B8988176C35; Mon, 28 Oct 2019 06:39:26 +0000 (UTC) Delivered-To: haskell@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B85C0176C34 for ; Mon, 28 Oct 2019 06:39:26 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 471lSD2S42z4b6g for ; Mon, 28 Oct 2019 06:39:24 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-pf1-x42a.google.com with SMTP id r4so545008pfl.7 for ; Sun, 27 Oct 2019 23:39:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YswXamIIt1U/V5Sb6OG5tBPrJfVVe3vN+MA9tlT9LuI=; b=gvEwx8hZELOwA4oi5/3jmmghXPu+Mdlsy3nCHWHI1izWplc2c0hAWwWWTfq2RHwaog 4sObRAF/+C/w5villBXdMEOVbxphzq2JzPR67c9JApQqTAKfWxvow5XZnBcmwzR6dXDE uHG3K7hZMiqpsiyOhGQlg/UuOWMGB9u3pdw/k92jstYgU2m4o1a5HbekAmy32qfkYgVh 9EgrtdRdDXBcB4J09s1YN/EdSHlB2t2XbhDpkB2f36a7sl7J9Ak3wsPioO3LCnsT8qWP ChxoZcTNav8oMWwNCM5AoYhFXLbZUiLPYr+lECuDO/Uhqy4DxYr0cjlRShLLZuRRjgqc eEQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YswXamIIt1U/V5Sb6OG5tBPrJfVVe3vN+MA9tlT9LuI=; b=cwgGO545InITGEnCib201SwV1rc+JLSxMmZcufGc+QCap5Tdb1bOwz4zDgOasx0gu6 36JjrxJavxdOJQnZP3l/fxPUhPNQjkZx6hBazejPYITN6evqepwWhQvWONGlwkyg/0YM uPyrMzq1v0MV0uJoZGFOELuRWexlOH8WXygG7YFzELR20dfreYBpD8+T2AS1vS4NEGRn Aw+cAYcZGirRYILsiT6i6Mgl+K12l/AfvRqfa+1c37s8E/Spm4rQ+0pQSezBMY3uXnCa Mv31codpXwTRI0CfDLWSirwJa4Zw49iSMidkCFGSPXSztjOd0CnOp+D/UzxYtQvbg2M2 zHqg== X-Gm-Message-State: APjAAAWL/GTdTFCFQv+rP8FqNfcFZFuMYqiQt7eGEDBV5VMc5C+tbdMp +IOTPmkOkZV79qbST++djMwu96VXXVRYYtu/0lY= X-Google-Smtp-Source: APXvYqwSjZEHddEAkevhgvqohopmnkPk/u4QCE7Cg7LcYzoHmmtsfhAfMk/Jd5MkIM5pHEa2GLVjz/wtuD5CF4ikfws= X-Received: by 2002:a17:90a:ad44:: with SMTP id w4mr255256pjv.11.1572244762415; Sun, 27 Oct 2019 23:39:22 -0700 (PDT) MIME-Version: 1.0 References: <3B62DE49-9516-4267-9DD1-31CDC37F9CC7@doublecrown.co> In-Reply-To: <3B62DE49-9516-4267-9DD1-31CDC37F9CC7@doublecrown.co> From: Gleb Popov <6yearold@gmail.com> Date: Mon, 28 Oct 2019 10:38:44 +0400 Message-ID: Subject: Re: Packaging stack projects as ports To: Jesse Kempf Cc: haskell@freebsd.org X-Rspamd-Queue-Id: 471lSD2S42z4b6g X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=gvEwx8hZ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of 6yearold@gmail.com designates 2607:f8b0:4864:20::42a as permitted sender) smtp.mailfrom=6yearold@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[haskell@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; URI_COUNT_ODD(1.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[a.2.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; IP_SCORE(0.00)[ip: (-8.88), ipnet: 2607:f8b0::/32(-2.40), asn: 15169(-2.05), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-haskell@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD-specific Haskell issues and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Oct 2019 06:39:27 -0000 On Sun, Oct 27, 2019 at 11:53 PM Jesse Kempf wrote: > Hi, > > What=E2=80=99s the preferred way of making ports for projects that use St= ack and > don=E2=80=99t and won=E2=80=99t appear on Hackage? > Stack projects should also have a .cabal file, so the port looks almost the same. You just only need to override MASTER_SITES and set it to GitHub instead of Hackage. See lang/elm port for an example. There are also some auxiliary Makefile targets to aid porting in Mk/Uses/cabal.mk, take a look at that too. > I=E2=80=99ve got an app up on Github, so I set what=E2=80=99s needed and = then the meat of > my port is: > > > do-build: > @(cd ${WRKSRC} && stack build) > do-install: > @(cd ${WRKSRC} && stack install > --local-bin-path=3D${STAGEDIR}${PREFIX}/bin) > post-install: > @(${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.cfg.sample > ${STAGEDIR}${PREFIX}/etc) > > > For my company=E2=80=99s purposes, this is perfectly adequate, however st= ack > (installed from devel/stack) doesn=E2=80=99t seem to honor =E2=80=94syste= m-ghc and so > always installs its own version of GHC. It turns out that you need both --system-ghc and --no-install-ghc to build using system GHC with Stack. On the one hand, this means that the app will be built with the correct > compiler for Stackage snapshot. On the other hand, this means that port > compiling is slow and more memory intensive than it needs to be because > compiling GHC is more resource intensive than compiling small application= s. > And, finally, stack installs its own version of GHC into the invoking > user=E2=80=99s home directory, not only affecting files outside `/usr/loc= al` but > also meaning that `make package` and `sudo make package` will build and > install GHC twice. > > We=E2=80=99d like to contribute our tool to the ports tree since it=E2=80= =99s a > general-purpose thing but what I just mentioned seems like an obvious > show-stopper. > That's great, feel free to ask for help there, or at #haskell-FreeBSD IRC channel at Freenode. > Regards, > -Jesse > _______________________________________________ > freebsd-haskell@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-haskell > To unsubscribe, send any mail to "freebsd-haskell-unsubscribe@freebsd.org= " >