From 75d70f7551514ba5e929a9e90b7777ca2af145e8 Mon Sep 17 00:00:00 2001 From: rowanG077 Date: Wed, 20 Sep 2023 13:44:19 +0200 Subject: [PATCH] Add attoparsec-aeson to nix flake --- flake.lock | 18 ++++++++++++++++++ flake.nix | 7 +++++++ nix/overlay.nix | 10 +++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 51fa489ccf..1335d6687c 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,22 @@ { "nodes": { + "attoparsec-aeson": { + "flake": false, + "locked": { + "lastModified": 1510733552, + "narHash": "sha256-OI3tlM6YUzQIUKTTdn7O8Kmor7xOXGxlhimBeY9MCww=", + "owner": "athanclark", + "repo": "aeson-attoparsec", + "rev": "aea0a844e0f4871caf028a45efaaffeeb2a8e186", + "type": "github" + }, + "original": { + "owner": "athanclark", + "ref": "v0.0.0", + "repo": "aeson-attoparsec", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -116,6 +133,7 @@ }, "root": { "inputs": { + "attoparsec-aeson": "attoparsec-aeson", "flake-compat": "flake-compat", "flake-utils": "flake-utils", "ghc-tcplugins-extra": "ghc-tcplugins-extra", diff --git a/flake.nix b/flake.nix index 02654bd348..3977803f4f 100644 --- a/flake.nix +++ b/flake.nix @@ -9,6 +9,12 @@ url = "github:edolstra/flake-compat"; flake = false; }; + # TODO: Package is not yet in 23.05 but it is in unstable. Once 23.11 + # Has been released remove this + attoparsec-aeson = { + url = "github:athanclark/aeson-attoparsec/v0.0.0"; + flake = false; + }; ghc-tcplugins-extra = { url = "github:clash-lang/ghc-tcplugins-extra"; @@ -51,6 +57,7 @@ makeOverlay = import (./. + "/nix/overlay.nix") { inherit (args) + attoparsec-aeson ghc-tcplugins-extra ghc-typelits-extra ghc-typelits-knownnat diff --git a/nix/overlay.nix b/nix/overlay.nix index 40274a9f60..dfda4a41d4 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -6,7 +6,8 @@ # packages to the environment, or need to change the configuration of the # different packages maintained by QBayLogic. -{ ghc-tcplugins-extra +{ attoparsec-aeson +, ghc-tcplugins-extra , ghc-typelits-extra , ghc-typelits-knownnat , ghc-typelits-natnormalise @@ -25,6 +26,13 @@ let # standalone repositories, e.g. the typechecker plugins needed for Clash. haskellExternalPackages = hfinal: hprev: { + # TODO: Package is not yet in 23.05 but it is in unstable. Once 23.11 + # Has been released remove this + attoparsec-aeson = hprev.callCabal2nix + "attoparsec-aeson" + "${attoparsec-aeson}" + { }; + ghc-tcplugins-extra = hprev.callCabal2nix "ghc-tcplugins-extra"