From patchwork Fri Jan 1 18:04:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Soo X-Patchwork-Id: 26157 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 73D1C27BC09; Fri, 1 Jan 2021 18:05:35 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8707727BC08 for ; Fri, 1 Jan 2021 18:05:29 +0000 (GMT) Received: from localhost ([::1]:40520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kvOno-0007bG-K1 for patchwork@mira.cbaines.net; Fri, 01 Jan 2021 13:05:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvOnO-0007ay-GD for guix-patches@gnu.org; Fri, 01 Jan 2021 13:05:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51460) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kvOnO-0003fv-99 for guix-patches@gnu.org; Fri, 01 Jan 2021 13:05:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kvOnO-0000qZ-2n for guix-patches@gnu.org; Fri, 01 Jan 2021 13:05:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#39309] .[PATCH] WIP gnu: add stack. Resent-From: John Soo Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Jan 2021 18:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39309 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Timothy Sample Received: via spool by 39309-submit@debbugs.gnu.org id=B39309.16095242993243 (code B ref 39309); Fri, 01 Jan 2021 18:05:01 +0000 Received: (at 39309) by debbugs.gnu.org; 1 Jan 2021 18:04:59 +0000 Received: from localhost ([127.0.0.1]:34773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kvOnG-0000qB-39 for submit@debbugs.gnu.org; Fri, 01 Jan 2021 13:04:59 -0500 Received: from mail-pl1-f172.google.com ([209.85.214.172]:46891) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kvOnA-0000pt-Io for 39309@debbugs.gnu.org; Fri, 01 Jan 2021 13:04:52 -0500 Received: by mail-pl1-f172.google.com with SMTP id v3so11293675plz.13 for <39309@debbugs.gnu.org>; Fri, 01 Jan 2021 10:04:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asu-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=zNs4RC+nGFrTQv8DaJCqABU6hZDPL6z2bygdFooBMrM=; b=f3FQFnHkUkSpfrGIO3+NMFCV49p65Ir2uHyA7pCvlp+9fKhoZAWTu+rbwzZmOaE87p i0b83HgftUIZB5cGv60n0hf//0pVsgxvUMILPHLfdJfcu2mF8OsDsI3MEcEooqileDSz 3KOnbdLO4jJoqMaPUbXrTU3m13Yu5sMN+nIKlbZDrMtL3sjOK1kgJtnorEgEhPQRY5Pv jQ5NTS8YLXMJOnBiPVrmVklRZbk5BUxXt/ViwwYSSgoxrllRleXUvlNFs9OfkfnKE/Fg k6HGBYzxFboUUVUmA6v+IqgU0r6eoI3NJeakIqzp84xw9qGFLzKEWNZiHTf9R/nj/IU+ Tjlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=zNs4RC+nGFrTQv8DaJCqABU6hZDPL6z2bygdFooBMrM=; b=Cy/2sCczxAKBuAMKx0hB35McqCqyeObvYuaYNkhGBmddsxncBiAcVeTBORJDExHQQ0 xuJE4p6HZ4J9RqFY/krfI7j51xliOccw6sKLUfkcru847u41ztOTLX4kFSMI78U6iDyD +YIDvbJ2Ob9H9RdFu/v+I0lPAeu1Gvci0y9fr3unwt+hjkT/EL5XfvWmWam4MIxfRa4N aYuIuDYp5j6dRWc6qgapZPGTirQDZVz68i4BOU03r54E5AwCxlOBuvbOTCqVCd77BYbL nggGM4J5NK1/hT6y7EeJls6QSV4wU6tHi/yXU/rTebkZt8mFp3edmED3u7n9gZEeS3oj hrYw== X-Gm-Message-State: AOAM5326faSijm2mc70MdTb9mYyPIBH++X7N9rMni3vqIpU8bP9weVhf 8pL1aljaEEZW1I5ZK+fMi8twtSYydHdNfyBy X-Google-Smtp-Source: ABdhPJyhgWqmPkca8DbwogZ9WM0rmX9JYdBsDwAgiFurBKYAHBcNyCyTfppSbjvgsVCF7Y7kKk2wXg== X-Received: by 2002:a17:90a:e64a:: with SMTP id ep10mr17967586pjb.60.1609524282359; Fri, 01 Jan 2021 10:04:42 -0800 (PST) Received: from ecenter ([2600:1700:83b0:8bd0::7a8]) by smtp.gmail.com with ESMTPSA id x125sm39574319pgb.35.2021.01.01.10.04.39 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Jan 2021 10:04:40 -0800 (PST) From: John Soo References: <87mu9ahbz8.fsf@ngyro.com> <2FD91328-10FF-41C7-AFDF-E14F66916116@asu.edu> <87lfo72cwt.fsf@ngyro.com> Date: Fri, 01 Jan 2021 10:04:39 -0800 In-Reply-To: (John Soo's message of "Fri, 13 Mar 2020 15:05:28 +0000") Message-ID: <87zh1s3554.fsf_-_@asu.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 39309@debbugs.gnu.org Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi Tim and Guix! Stack now builds but some tests fail! Here are the updated patches :) - John From 4085284414b279b064a9ac756bfaefe92c33e0de Mon Sep 17 00:00:00 2001 From: John Soo Date: Sun, 26 Jan 2020 11:19:47 -0800 Subject: [PATCH 31/31] gnu: Add stack. * gnu/packages/haskell-xyz.scm (stack): New variable. --- gnu/packages/haskell-apps.scm | 115 ++++++++++++++++++ .../patches/stack-ghc8.8-compatibility.patch | 27 ++++ 2 files changed, 142 insertions(+) create mode 100644 gnu/packages/patches/stack-ghc8.8-compatibility.patch diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm index 19a0fc8a44..b7eb0380bf 100644 --- a/gnu/packages/haskell-apps.scm +++ b/gnu/packages/haskell-apps.scm @@ -37,6 +37,8 @@ #:use-module (guix packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system haskell) + #:use-module (guix utils) + #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages curl) #:use-module (gnu packages gl) @@ -864,6 +866,119 @@ test specifications defining a command to run, some input, and the expected output, stderr, and exit status.") (license license:gpl3+))) +(define-public stack + (package + (name "stack") + (version "2.1.3.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://hackage.haskell.org/package/stack/stack-" + version + ".tar.gz")) + (sha256 + (base32 + "1q2nagnc24fvyj3hwnpgyp3rqhxswhscyw4pw2dazqx34ad3d0zr")) + (patches (search-patches "stack-ghc8.8-compatibility.patch")))) + (build-system haskell-build-system) + ;; FIXME: Some tests fail to access root directory + (arguments `(#:tests? #f)) + (inputs + `(("ghc-aeson" ,ghc-aeson) + ("ghc-annotated-wl-pprint" ,ghc-annotated-wl-pprint) + ("ghc-ansi-terminal" ,ghc-ansi-terminal) + ("ghc-async" ,ghc-async) + ("ghc-attoparsec" ,ghc-attoparsec) + ("ghc-base64-bytestring" ,ghc-base64-bytestring) + ("ghc-colour" ,ghc-colour) + ("ghc-conduit" ,ghc-conduit) + ("ghc-conduit-extra" ,ghc-conduit-extra) + ("ghc-cryptonite" ,ghc-cryptonite) + ("ghc-cryptonite-conduit" ,ghc-cryptonite-conduit) + ("ghc-echo" ,ghc-echo) + ("ghc-exceptions" ,ghc-exceptions) + ("ghc-extra" ,ghc-extra) + ("ghc-file-embed" ,ghc-file-embed) + ("ghc-filelock" ,ghc-filelock) + ("ghc-fsnotify" ,ghc-fsnotify) + ("ghc-generic-deriving" ,ghc-generic-deriving) + ("ghc-hackage-security" ,ghc-hackage-security) + ("ghc-hashable" ,ghc-hashable) + ("ghc-hi-file-parser" ,ghc-hi-file-parser) + ("ghc-hpack" ,ghc-hpack) + ("ghc-http-client" ,ghc-http-client) + ("ghc-http-client-tls" ,ghc-http-client-tls) + ("ghc-http-conduit" ,ghc-http-conduit) + ("ghc-http-download" ,ghc-http-download) + ("ghc-http-types" ,ghc-http-types) + ("ghc-memory" ,ghc-memory) + ("ghc-microlens" ,ghc-microlens) + ("ghc-mintty" ,ghc-mintty) + ("ghc-mono-traversable" ,ghc-mono-traversable) + ("ghc-mustache" ,ghc-mustache) + ("ghc-neat-interpolation" ,ghc-neat-interpolation) + ("ghc-network-uri" ,ghc-network-uri) + ("ghc-open-browser" ,ghc-open-browser) + ("ghc-optparse-applicative" ,ghc-optparse-applicative) + ("ghc-pantry" ,ghc-pantry) + ("ghc-path" ,ghc-path) + ("ghc-path-io" ,ghc-path-io) + ("ghc-persistent" ,ghc-persistent) + ("ghc-persistent-sqlite" ,ghc-persistent-sqlite) + ("ghc-persistent-template" ,ghc-persistent-template) + ("ghc-primitive" ,ghc-primitive) + ("ghc-project-template" ,ghc-project-template) + ("ghc-regex-applicative-text" ,ghc-regex-applicative-text) + ("ghc-resource-pool" ,ghc-resource-pool) + ("ghc-resourcet" ,ghc-resourcet) + ("ghc-retry" ,ghc-retry) + ("ghc-rio" ,ghc-rio) + ("ghc-rio-prettyprint" ,ghc-rio-prettyprint) + ("ghc-semigroups" ,ghc-semigroups) + ("ghc-split" ,ghc-split) + ("ghc-streaming-commons" ,ghc-streaming-commons) + ("ghc-tar" ,ghc-tar) + ("ghc-temporary" ,ghc-temporary) + ("ghc-terminal-size" ,ghc-terminal-size) + ("ghc-text-metrics" ,ghc-text-metrics) + ("ghc-th-reify-many" ,ghc-th-reify-many) + ("ghc-tls" ,ghc-tls) + ("ghc-typed-process" ,ghc-typed-process) + ("ghc-unicode-transforms" ,ghc-unicode-transforms) + ("ghc-unix-compat" ,ghc-unix-compat) + ("ghc-unliftio" ,ghc-unliftio) + ("ghc-unordered-containers" ,ghc-unordered-containers) + ("ghc-vector" ,ghc-vector) + ("ghc-yaml" ,ghc-yaml) + ("ghc-zip-archive" ,ghc-zip-archive) + ("ghc-zlib" ,ghc-zlib) + ("ghc-githash" ,ghc-githash) + ("ghc-optparse-simple" ,ghc-optparse-simple) + ("ghc-hspec" ,ghc-hspec) + ("ghc-optparse-generic" ,ghc-optparse-generic))) + (native-inputs + `(("ghc-quickcheck" ,ghc-quickcheck) + ("ghc-raw-strings-qq" ,ghc-raw-strings-qq) + ("ghc-smallcheck" ,ghc-smallcheck) + ("hspec-discover" ,hspec-discover))) + (home-page "http://haskellstack.org") + (synopsis "Haskell Tool Stack") + (description + "Stack is a cross-platform program for developing Haskell projects. It +is aimed at Haskellers both new and experienced. + +It features: + +@itemize +@item Installing GHC automatically, in an isolated location. +@item Installing packages needed for your project. +@item Building your project. +@item Testing your project. +@item Benchmarking your project. +@end itemize") + (license license:bsd-3))) + (define-public stylish-haskell (package (name "stylish-haskell") diff --git a/gnu/packages/patches/stack-ghc8.8-compatibility.patch b/gnu/packages/patches/stack-ghc8.8-compatibility.patch new file mode 100644 index 0000000000..1bfaa14b8b --- /dev/null +++ b/gnu/packages/patches/stack-ghc8.8-compatibility.patch @@ -0,0 +1,27 @@ +This version of stack uses some language features that changed from 8.6 to +8.8. + +diff --git a/src/Stack/Storage/User.hs.old b/src/Stack/Storage/User.hs +index 3845b09..cfc17d5 100644 +--- a/src/Stack/Storage/User.hs ++++ b/src/Stack/Storage/User.hs +@@ -10,6 +10,8 @@ + {-# LANGUAGE TupleSections #-} + {-# LANGUAGE TypeFamilies #-} + {-# LANGUAGE UndecidableInstances #-} ++{-# LANGUAGE DerivingStrategies #-} ++{-# LANGUAGE StandaloneDeriving #-} + {-# OPTIONS_GHC -Wno-unused-top-binds -Wno-identities #-} + + -- | Work with SQLite database used for caches across an entire user account. +--- a/src/Stack/Storage/Project.hs.old ++++ b/src/Stack/Storage/Project.hs +@@ -10,4 +10,6 @@ + {-# LANGUAGE TupleSections #-} + {-# LANGUAGE TypeFamilies #-} + {-# LANGUAGE UndecidableInstances #-} ++{-# LANGUAGE DerivingStrategies #-} ++{-# LANGUAGE StandaloneDeriving #-} + {-# OPTIONS_GHC -Wno-unused-top-binds -Wno-identities #-} + + -- | Work with SQLite database used for caches across a single project. -- 2.29.2