From owner-freebsd-haskell@freebsd.org Sun Oct 27 19:53:53 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 2883A1A445E for ; Sun, 27 Oct 2019 19:53:53 +0000 (UTC) (envelope-from jesse.kempf@doublecrown.co) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 471T7N6YGbz44QB for ; Sun, 27 Oct 2019 19:53:52 +0000 (UTC) (envelope-from jesse.kempf@doublecrown.co) Received: by mailman.nyi.freebsd.org (Postfix) id DF0E21A445D; Sun, 27 Oct 2019 19:53:52 +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 DECEC1A445C for ; Sun, 27 Oct 2019 19:53:52 +0000 (UTC) (envelope-from jesse.kempf@doublecrown.co) Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (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 471T7M54BQz44Q7 for ; Sun, 27 Oct 2019 19:53:51 +0000 (UTC) (envelope-from jesse.kempf@doublecrown.co) Received: by mail-pf1-x435.google.com with SMTP id c7so3961877pfo.12 for ; Sun, 27 Oct 2019 12:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=doublecrown.co; s=google; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=bgxHzLxdAbNHTnlF+2I8QiWxYM2mKxYIjG9AgFMvR7o=; b=I8+oWB/DtkqdJ2Me7tlFXiaWi7jP1DI3hyAMR8Yof/2gXbVcJ9GAmwemylX8J4yZ8S tqij2V3FLwJ6yTva51ePBrQBpGRpN5DjZ6naKrgtgpPbl/4PH3D92FtZrCna46smRFvw Pc9cStqo7CODbd85LjYsxxV3pI7nxr+06TH1s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=bgxHzLxdAbNHTnlF+2I8QiWxYM2mKxYIjG9AgFMvR7o=; b=Eulp3poFnlq+KcSGzjZEL3HdDEYYKqE9eWSdZo/nYObpMuzIkf0Eo1MABkJSOk3SJV APJmlpeLj7me4bUbbc9lq14H7r7tlzLhTzxwX7AAjxI+Jc1J1A62+KOppa8XDjdneuB6 izNuVz6sn7Ko1jSHk21k61OyJr5Lxs1t0kUireTG/Ey3FBVnk4qL7Z+nu9BtulAGNfXj H2kqL+ib7nb/2KVOFJ7FRP5/sO89+Fz83wINsc5RRN2RKgMrDICPvirISKTYZAMHX1u1 IM8H+E6MX3xCTJ+0seLkHJ0ORoMET/KIi2DdfjZB2BLaLIaiKlv0FvUU7xq/U6NdCRgM yIMA== X-Gm-Message-State: APjAAAUE3PzeuFkn3pGokjEnJIlGMpJHh3pgfIkfL6tDHTrNZgERfWmU UVhZEs9I0KjtEs64L8NKKBRlIkBskBzf9Q== X-Google-Smtp-Source: APXvYqxVYcqQA+HkDEg2FoM0XJtCw+CJABuR5KnUkKRyfh4/qFsY05DjAYEa5ZacndZDSDZ+vK3g/w== X-Received: by 2002:a63:e509:: with SMTP id r9mr7410107pgh.431.1572206029358; Sun, 27 Oct 2019 12:53:49 -0700 (PDT) Received: from [192.168.42.67] (157-131-77-130.fiber.dynamic.sonic.net. [157.131.77.130]) by smtp.gmail.com with ESMTPSA id n23sm8694382pff.137.2019.10.27.12.53.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Oct 2019 12:53:48 -0700 (PDT) From: Jesse Kempf Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Packaging stack projects as ports Message-Id: <3B62DE49-9516-4267-9DD1-31CDC37F9CC7@doublecrown.co> Date: Sun, 27 Oct 2019 12:53:46 -0700 To: haskell@freebsd.org X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 471T7M54BQz44Q7 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=doublecrown.co header.s=google header.b=I8+oWB/D; dmarc=none; spf=none (mx1.freebsd.org: domain of jesse.kempf@doublecrown.co has no SPF policy when checking 2607:f8b0:4864:20::435) smtp.mailfrom=jesse.kempf@doublecrown.co X-Spamd-Result: default: False [-4.52 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[doublecrown.co:s=google]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[haskell@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[doublecrown.co]; DKIM_TRACE(0.00)[doublecrown.co:+]; RCVD_IN_DNSWL_NONE(0.00)[5.3.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]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-2.73)[ip: (-9.12), ipnet: 2607:f8b0::/32(-2.40), asn: 15169(-2.05), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] 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: Sun, 27 Oct 2019 19:53:53 -0000 Hi, What=E2=80=99s the preferred way of making ports for projects that use = Stack and don=E2=80=99t and won=E2=80=99t appear on Hackage? 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 = stack (installed from devel/stack) doesn=E2=80=99t seem to honor = =E2=80=94system-ghc and so always installs its own version of GHC. 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 = applications. And, finally, stack installs its own version of GHC into = the invoking user=E2=80=99s home directory, not only affecting files = outside `/usr/local` 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=99= s a general-purpose thing but what I just mentioned seems like an = obvious show-stopper. Regards, -Jesse=