From patchwork Fri May 8 00:32:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Soo X-Patchwork-Id: 21921 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 09B6C27BBE3; Fri, 8 May 2020 01:33:19 +0100 (BST) 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,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) by mira.cbaines.net (Postfix) with ESMTP id 0C06E27BBE1 for ; Fri, 8 May 2020 01:33:13 +0100 (BST) Received: from localhost ([::1]:38706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWqwy-0004jr-8d for patchwork@mira.cbaines.net; Thu, 07 May 2020 20:33:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWqwo-0004jR-1Q for guix-patches@gnu.org; Thu, 07 May 2020 20:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60866) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jWqwn-0002Ab-Nd for guix-patches@gnu.org; Thu, 07 May 2020 20:33:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jWqwn-0004rO-JC for guix-patches@gnu.org; Thu, 07 May 2020 20:33:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#38596] [PATCH] gnu: Add PureScript. Resent-From: John Soo Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 May 2020 00:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38596 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 38596@debbugs.gnu.org Received: via spool by 38596-submit@debbugs.gnu.org id=B38596.158889796718658 (code B ref 38596); Fri, 08 May 2020 00:33:01 +0000 Received: (at 38596) by debbugs.gnu.org; 8 May 2020 00:32:47 +0000 Received: from localhost ([127.0.0.1]:44179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWqwN-0004qi-Tx for submit@debbugs.gnu.org; Thu, 07 May 2020 20:32:46 -0400 Received: from mail-oo1-f66.google.com ([209.85.161.66]:42722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWqwI-0004qR-GP for 38596@debbugs.gnu.org; Thu, 07 May 2020 20:32:34 -0400 Received: by mail-oo1-f66.google.com with SMTP id e18so1782171oot.9 for <38596@debbugs.gnu.org>; Thu, 07 May 2020 17:32:30 -0700 (PDT) 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=cWBfoZdqID9f2BFCOZGHVq0MPt1ThkFxDMGI0H1XgSI=; b=nGxYls0WSAVM8nPZtYakBj8i0pov5fWsihqAtzIiTN2dPaRrBldFepOGLG8N4b4KtH PM0SDorftS8hBfw3rdFmfRUybLPUY8wM6xeUqnfN0XcDCTZBfLPyh7mv2ZkUXsjKHs44 NvP9ZbEpKHD0KBSIe4fYr4X2/8E6GQqru1fNCYgOyHWkxzBF9f+QjLlVqKx8rm8au+bx 5MK6Woxc7SONNm/tJe1P5LBOOI4Jg7BATKrdhYadW/b8hnAJMXXkoFlShqJEiAaTswyh wk1LTP8IIiaxldaJul3moBIi5pQ91AqYOoAOO2fi/PLzbmgfjZ8a85VC9Ka3TZfEeirA 8NLQ== 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=cWBfoZdqID9f2BFCOZGHVq0MPt1ThkFxDMGI0H1XgSI=; b=lKuqKVgU+JWyLPFrbSba93NGX32p3qD0Tce3OzVVdy/sx7Cr66tVW3Ppb2l0IDQBbT Nyoxgi99bhitzanrRBe0eCl2dUcJ2mQY4V3PlQiMrHwoUIc/WZKiPmO4QsQrmet0qeul uHvG4rcjESH2Tk2dtPECFWcMGMZ6jAyg3Je7BoUKxNw4V/hnJE+/ov+WF1cS2HQ+XspZ 3cQJHVBYtv5v7J6D/1EQvNct6PszAMt0o6X1YExIAeqzprozPOqfgRsKgFGOsfFtML3p l+fcW3LmPI5MDyApthRsxT3yVyuES9CQRmKMhyyzWZZuEJ9FJBcCCZ7nCIV6Pm84UJ9j Y0Tw== X-Gm-Message-State: AGi0PubuFyC7Y0Y4oc8P+TO+Dks5g9pk3gldWgABLLIoiFLJYC7TkVRz MBbzgCxg5aUpX2hx0gEpaJb3nLZT9Ju36w== X-Google-Smtp-Source: APiQypKuKAGYaqowwPRZ5hcnElDV4TDbr/bpCEeiKGfa1OndwrMqw7LneIBcKlt9+YKLX0ydMx53cQ== X-Received: by 2002:a4a:1445:: with SMTP id 66mr189973ood.87.1588897944394; Thu, 07 May 2020 17:32:24 -0700 (PDT) Received: from ecenter ([2600:1700:83b0:8bd0::479]) by smtp.gmail.com with ESMTPSA id 64sm1768624otb.14.2020.05.07.17.32.21 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 May 2020 17:32:22 -0700 (PDT) From: John Soo References: <87k12lrdd3.fsf@asu.edu> <87imhx6hpl.fsf@cbaines.net> <87k12cifxs.fsf@asu.edu> <87o8rl46iu.fsf@cbaines.net> Date: Thu, 07 May 2020 17:32:18 -0700 In-Reply-To: <87o8rl46iu.fsf@cbaines.net> (Christopher Baines's message of "Tue, 21 Apr 2020 08:55:37 +0100") Message-ID: <87sggb2rn1.fsf@asu.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hello, Christopher Baines writes: > Some really minor description things I missed earlier: > > ghc-aeson-better-errors, ghc-transformers and ghc-websockets have URLs > in the description, @url could probably be used. > > I'd also remove the following from the ghc-bower-json description, it > reads more like uninformative advertising to me and isn't really > relevant to this specific package: > > Bower is a package manager for the web (see http://bower.io). Done! > Maybe it would be good to note why the package in Guix didn't work, like > I tried to use ghc-happy@1.19.12, and the build phase failed with some > type errors. That'll at least point out clearly that there's an > incompatability. I don't think much detail is needed, the following > would be fine. > > `(("ghc-happy" ,ghc-happy-1.19.9) ; build fails with 1.19.12 Done! >> Ah thanks for the suggestion here. I found one that could be taken from >> the existing package in (gnu packages haskell-xyz). The rest seemed to >> be either pinned exactly or too strict to take from guix packages. > > Thanks, although my intent was more about adding something like this. > > #:phases > (modify-phases %standard-phases > (add-after 'unpack 'patch > (lambda _ > (substitute* "purescript.cabal" > (("clock .*$") > "clock,\n")) > #t))))) With the addition of a patch I was able to relax most of the package versions I introduced to ones we have. The final remaining required dependency seems to be happy which I kept at 1.19.9. > Now I'm not sure quite how risky this is, the purescript tests aren't > being run, but given this is Haskell and it compiles, hopefully that > provides some guarantees. > > What do you think? My only caveat too is now I have not really tested this version. I had done some work with a prior version. I wish I could run the tests but they seem to rely heavily on npm and bower. Thanks again, John From 474b6af6dbd79a8c93a457b99d1465d6e9ede306 Mon Sep 17 00:00:00 2001 From: John Soo Date: Fri, 13 Dec 2019 09:21:50 -0800 Subject: [PATCH 17/17] gnu: Add purescript. * gnu/packages/purescript.scm (purescript): New variable. * gnu/packages/patches/purescript-relax-dependencies.patch: Relax cabal dependencies. --- .../purescript-relax-dependencies.patch | 39 ++++++++ gnu/packages/purescript.scm | 89 +++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 gnu/packages/patches/purescript-relax-dependencies.patch diff --git a/gnu/packages/patches/purescript-relax-dependencies.patch b/gnu/packages/patches/purescript-relax-dependencies.patch new file mode 100644 index 0000000000..4571fea654 --- /dev/null +++ b/gnu/packages/patches/purescript-relax-dependencies.patch @@ -0,0 +1,39 @@ +diff --git purescript-0.13.6/purescript.cabal purescript-0.13.6/purescript.cabal.orig +index 7e38070..0724a0b 100644 +--- purescript-0.13.6/purescript.cabal ++++ purescript-0.13.6/purescript.cabal.orig +@@ -1167,1 +1167,1 @@ library +- Glob ==0.9.*, ++ Glob ==0.10.*, +@@ -1171,1 +1171,1 @@ library +- ansi-terminal >=0.7.1 && <0.9, ++ ansi-terminal ==0.9.*, +@@ -1180,1 +1180,1 @@ library +- clock <0.8, ++ clock ==0.8.*, +@@ -1246,1 +1246,1 @@ executable purs +- Glob ==0.9.*, ++ Glob ==0.10.*, +@@ -1250,1 +1250,1 @@ executable purs +- ansi-terminal >=0.7.1 && <0.9, ++ ansi-terminal ==0.9.*, +@@ -1260,1 +1260,1 @@ executable purs +- clock <0.8, ++ clock ==0.8.*, +@@ -1281,1 +1281,1 @@ executable purs +- network >=3.0.1.1 && <3.1, ++ network >=2.8 && <3.1, +@@ -1358,1 +1358,1 @@ test-suite tests +- Glob ==0.9.*, ++ Glob ==0.10.*, +@@ -1363,1 +1363,1 @@ test-suite tests +- ansi-terminal >=0.7.1 && <0.9, ++ ansi-terminal ==0.9.*, +@@ -1372,1 +1372,1 @@ test-suite tests +- clock <0.8, ++ clock ==0.8.*, +@@ -1384,2 +1384,2 @@ test-suite tests +- hspec <2.7, +- hspec-discover <2.7, ++ hspec ==2.7.*, ++ hspec-discover ==2.7.*, diff --git a/gnu/packages/purescript.scm b/gnu/packages/purescript.scm index 244fe0ed7d..13cd773839 100644 --- a/gnu/packages/purescript.scm +++ b/gnu/packages/purescript.scm @@ -17,6 +17,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages purescript) + #:use-module (gnu packages) #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages haskell-check) #:use-module (gnu packages haskell-crypto) @@ -42,3 +43,91 @@ (sha256 (base32 "138xpxdb7x62lpmgmb6b3v3vgdqqvqn4273jaap3mjmc2gla709y")))))) + +(define-public purescript + (package + (name "purescript") + (version "0.13.6") + (source + (origin + (method url-fetch) + (uri (string-append + "mirror://hackage/package/purescript/purescript-" + version + ".tar.gz")) + (sha256 + (base32 + "1xss3wpv6wb38gsh9r635s09cxzmiz81hhssdxzdba2pw6ifzx8j")) + (patches (search-patches "purescript-relax-dependencies.patch")))) + (build-system haskell-build-system) + (inputs + `(("ghc-glob" ,ghc-glob) + ("ghc-aeson" ,ghc-aeson) + ("ghc-aeson-better-errors" ,ghc-aeson-better-errors) + ("ghc-aeson-pretty" ,ghc-aeson-pretty) + ("ghc-ansi-terminal" ,ghc-ansi-terminal) + ("ghc-base-compat" ,ghc-base-compat) + ("ghc-blaze-html" ,ghc-blaze-html) + ("ghc-bower-json" ,ghc-bower-json) + ("ghc-boxes" ,ghc-boxes) + ("ghc-cheapskate" ,ghc-cheapskate) + ("ghc-clock" ,ghc-clock) + ("ghc-cryptonite" ,ghc-cryptonite) + ("ghc-data-ordlist" ,ghc-data-ordlist) + ("ghc-dlist" ,ghc-dlist) + ("ghc-edit-distance" ,ghc-edit-distance) + ("ghc-file-embed" ,ghc-file-embed) + ("ghc-fsnotify" ,ghc-fsnotify) + ("ghc-happy" ,ghc-happy) + ("ghc-language-javascript" ,ghc-language-javascript) + ("ghc-lifted-async" ,ghc-lifted-async) + ("ghc-lifted-base" ,ghc-lifted-base) + ("ghc-memory" ,ghc-memory) + ("ghc-microlens-platform" ,ghc-microlens-platform) + ("ghc-monad-control" ,ghc-monad-control) + ("ghc-monad-logger" ,ghc-monad-logger) + ("ghc-network" ,ghc-network) + ("ghc-parallel" ,ghc-parallel) + ("ghc-pattern-arrows" ,ghc-pattern-arrows) + ("ghc-protolude" ,ghc-protolude) + ("ghc-regex-tdfa" ,ghc-regex-tdfa) + ("ghc-safe" ,ghc-safe) + ("ghc-scientific" ,ghc-scientific) + ("ghc-semialign" ,ghc-semialign) + ("ghc-semigroups" ,ghc-semigroups) + ("ghc-sourcemap" ,ghc-sourcemap) + ("ghc-split" ,ghc-split) + ("ghc-stringsearch" ,ghc-stringsearch) + ("ghc-syb" ,ghc-syb) + ("ghc-these" ,ghc-these) + ("ghc-transformers-base" ,ghc-transformers-base) + ("ghc-transformers-compat" ,ghc-transformers-compat) + ("ghc-unordered-containers" ,ghc-unordered-containers) + ("ghc-utf8-string" ,ghc-utf8-string) + ("ghc-vector" ,ghc-vector) + ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint) + ("ghc-http-types" ,ghc-http-types) + ("ghc-network" ,ghc-network) + ("ghc-optparse-applicative" ,ghc-optparse-applicative) + ("ghc-wai" ,ghc-wai) + ("ghc-wai-websockets" ,ghc-wai-websockets) + ("ghc-warp" ,ghc-warp) + ("ghc-websockets" ,ghc-websockets))) + (native-inputs + `(("ghc-happy" ,ghc-happy-1.19.9) ; build fails with 1.19.12 + ("ghc-hunit" ,ghc-hunit) + ("ghc-hspec" ,ghc-hspec) + ("hspec-discover" ,hspec-discover) + ("ghc-tasty" ,ghc-tasty) + ("ghc-tasty-golden" ,ghc-tasty-golden) + ("ghc-tasty-hspec" ,ghc-tasty-hspec))) + (arguments + `(;; Tests require npm + #:tests? #f + #:configure-flags '("--flags=release"))) + (home-page "https://www.purescript.org/") + (synopsis "Haskell inspired programming language compiling to JavaScript") + (description + "Purescript is a small strongly, statically typed programming language with +expressive types, inspired by Haskell and compiling to JavaScript.") + (license license:bsd-3))) -- 2.26.2