haskellPackages.graphql-engine: 2.0.5 -> 2.0.7

lassulus af115b86 5ebd941b

+148 -55
+13 -4
pkgs/development/haskell-modules/configuration-common.nix
··· 1288 1288 Spock-core = dontCheck super.Spock-core; 1289 1289 1290 1290 # hasura packages need some extra care 1291 - graphql-engine = overrideCabal (super.graphql-engine.override { 1291 + graphql-engine = overrideCabal (super.graphql-engine.overrideScope (self: super: { 1292 1292 immortal = self.immortal_0_2_2_1; 1293 - }) (drv: { 1293 + resource-pool = self.hasura-resource-pool; 1294 + ekg-core = self.hasura-ekg-core; 1295 + ekg-json = self.hasura-ekg-json; 1296 + hspec = dontCheck self.hspec_2_8_3; 1297 + hspec-core = dontCheck self.hspec-core_2_8_3; 1298 + hspec-discover = dontCheck super.hspec-discover_2_8_3; 1299 + tasty-hspec = self.tasty-hspec_1_2; 1300 + })) (drv: { 1294 1301 patches = [ ./patches/graphql-engine-mapkeys.patch ]; 1295 1302 doHaddock = false; 1296 - version = "2.0.5"; 1303 + version = "2.0.7"; 1297 1304 }); 1298 - pg-client = overrideCabal super.pg-client (drv: { 1305 + pg-client = overrideCabal (super.pg-client.override { 1306 + resource-pool = self.hasura-resource-pool; 1307 + }) (drv: { 1299 1308 librarySystemDepends = with pkgs; [ postgresql krb5.dev openssl.dev ]; 1300 1309 # wants a running DB to check against 1301 1310 doCheck = false;
+5 -9
pkgs/development/haskell-modules/non-hackage-packages.nix
··· 28 28 29 29 # hasura graphql-engine is not released to hackage. 30 30 # https://github.com/hasura/graphql-engine/issues/7391 31 - # 32 - # pg-client and graphql-engine depend on a hasura fork of resource-pool 33 - # which is provided by pool.nix 34 31 ci-info = self.callPackage ../misc/haskell/hasura/ci-info.nix {}; 35 - pg-client = self.callPackage ../misc/haskell/hasura/pg-client.nix { 36 - resource-pool = self.callPackage ../misc/haskell/hasura/pool.nix {}; 37 - }; 32 + pg-client = self.callPackage ../misc/haskell/hasura/pg-client.nix {}; 38 33 graphql-parser = self.callPackage ../misc/haskell/hasura/graphql-parser.nix {}; 39 - graphql-engine = self.callPackage ../misc/haskell/hasura/graphql-engine.nix { 40 - resource-pool = self.callPackage ../misc/haskell/hasura/pool.nix {}; 41 - }; 34 + graphql-engine = self.callPackage ../misc/haskell/hasura/graphql-engine.nix {}; 35 + hasura-resource-pool = self.callPackage ../misc/haskell/hasura/pool.nix {}; 36 + hasura-ekg-core = self.callPackage ../misc/haskell/hasura/ekg-core.nix {}; 37 + hasura-ekg-json = self.callPackage ../misc/haskell/hasura/ekg-json.nix {}; 42 38 43 39 # Unofficial fork until PRs are merged https://github.com/pcapriotti/optparse-applicative/pulls/roberth 44 40 # cabal2nix --maintainer roberth https://github.com/hercules-ci/optparse-applicative.git > pkgs/development/misc/haskell/hercules-ci-optparse-applicative.nix
+29 -9
pkgs/development/haskell-modules/patches/graphql-engine-mapkeys.patch
··· 1 1 diff --git a/server/src-lib/Data/HashMap/Strict/Extended.hs b/server/src-lib/Data/HashMap/Strict/Extended.hs 2 - index eaff0dfba..5047a0e9d 100644 2 + index eaff0dfba..9902cadd0 100644 3 3 --- a/src-lib/Data/HashMap/Strict/Extended.hs 4 4 +++ b/src-lib/Data/HashMap/Strict/Extended.hs 5 - @@ -17,7 +17,7 @@ import qualified Data.Align as A 6 - import qualified Data.Foldable as F 5 + @@ -7,7 +7,6 @@ module Data.HashMap.Strict.Extended 6 + , groupOnNE 7 + , differenceOn 8 + , lpadZip 9 + - , mapKeys 10 + , unionsWith 11 + ) where 7 12 8 - import Data.Function 9 - -import Data.HashMap.Strict as M 10 - +import Data.HashMap.Strict as M hiding (mapKeys) 11 - import Data.Hashable 12 - import Data.List.NonEmpty (NonEmpty (..)) 13 - import Data.These 13 + @@ -54,20 +53,6 @@ lpadZip left = catMaybes . flip A.alignWith left \case 14 + That b -> Just (Nothing, b) 15 + These a b -> Just (Just a, b) 16 + 17 + --- | @'mapKeys' f s@ is the map obtained by applying @f@ to each key of @s@. 18 + --- 19 + --- The size of the result may be smaller if @f@ maps two or more distinct 20 + --- keys to the same new key. In this case the value at the greatest of the 21 + --- original keys is retained. 22 + --- 23 + --- > mapKeys (+ 1) (fromList [(5,"a"), (3,"b")]) == fromList [(4, "b"), (6, "a")] 24 + --- > mapKeys (\ _ -> 1) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")]) == singleton 1 "c" 25 + --- > mapKeys (\ _ -> 3) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")]) == singleton 3 "c" 26 + --- 27 + --- copied from https://hackage.haskell.org/package/containers-0.6.4.1/docs/src/Data.Map.Internal.html#mapKeys 28 + -mapKeys :: (Ord k2, Hashable k2) => (k1 -> k2) -> HashMap k1 a -> HashMap k2 a 29 + -mapKeys f = fromList . foldrWithKey (\k x xs -> (f k, x) : xs) [] 30 + - 31 + -- | The union of a list of maps, with a combining operation: 32 + -- (@'unionsWith' f == 'Prelude.foldl' ('unionWith' f) 'empty'@). 33 + --
+33
pkgs/development/misc/haskell/hasura/ekg-core.nix
··· 1 + # This has been automatically generated by the script 2 + # ./update.sh. This should not be changed by hand. 3 + { mkDerivation, async, atomic-primops, base, containers, criterion 4 + , fetchgit, generic-random, ghc-prim, hashable, hspec 5 + , hspec-smallcheck, HUnit, inspection-testing, lib, markdown-unlit 6 + , primitive, QuickCheck, smallcheck, text, unordered-containers 7 + }: 8 + mkDerivation { 9 + pname = "ekg-core"; 10 + version = "0.1.1.7"; 11 + src = fetchgit { 12 + url = "https://github.com/hasura/ekg-core.git"; 13 + sha256 = "1s58kjg1kbhsyfyj0zwhnnws9hg9zwj9jylpwicg54yi78w962ys"; 14 + rev = "9fc8f94685c149a909b66bad4167455d8ae1002c"; 15 + fetchSubmodules = true; 16 + }; 17 + libraryHaskellDepends = [ 18 + atomic-primops base containers ghc-prim hashable inspection-testing 19 + primitive text unordered-containers 20 + ]; 21 + testHaskellDepends = [ 22 + async atomic-primops base containers generic-random ghc-prim 23 + hashable hspec hspec-smallcheck HUnit inspection-testing 24 + markdown-unlit primitive QuickCheck smallcheck text 25 + unordered-containers 26 + ]; 27 + testToolDepends = [ markdown-unlit ]; 28 + benchmarkHaskellDepends = [ base criterion ]; 29 + doHaddock = false; 30 + homepage = "https://github.com/tibbe/ekg-core"; 31 + description = "Tracking of system metrics"; 32 + license = lib.licenses.bsd3; 33 + }
+21
pkgs/development/misc/haskell/hasura/ekg-json.nix
··· 1 + # This has been automatically generated by the script 2 + # ./update.sh. This should not be changed by hand. 3 + { mkDerivation, aeson, base, ekg-core, fetchgit, lib, text 4 + , unordered-containers, vector 5 + }: 6 + mkDerivation { 7 + pname = "ekg-json"; 8 + version = "0.1.0.7"; 9 + src = fetchgit { 10 + url = "https://github.com/hasura/ekg-json.git"; 11 + sha256 = "1yf9x7gh66q27c3wv5m00ijf2qpiwm53jjlhrj2yc1glv684wf4v"; 12 + rev = "f25b9ddb7aae18059ef707a5ce30d6a54a63db13"; 13 + fetchSubmodules = true; 14 + }; 15 + libraryHaskellDepends = [ 16 + aeson base ekg-core text unordered-containers vector 17 + ]; 18 + homepage = "https://github.com/tibbe/ekg-json"; 19 + description = "JSON encoding of ekg metrics"; 20 + license = lib.licenses.bsd3; 21 + }
+30 -30
pkgs/development/misc/haskell/hasura/graphql-engine.nix
··· 6 6 , bytestring, case-insensitive, ci-info, containers, cron 7 7 , cryptonite, data-has, deepseq, dependent-map, dependent-sum 8 8 , directory, ekg-core, ekg-json, exceptions, fast-logger, fetchgit 9 - , file-embed, filepath, generic-arbitrary, ghc-heap-view 10 - , graphql-parser, hashable, hashable-time, hspec, hspec-core 11 - , hspec-expectations, hspec-expectations-lifted, http-api-data 12 - , http-client, http-client-tls, http-conduit, http-types, immortal 9 + , file-embed, filepath, ghc-heap-view, graphql-parser, hashable 10 + , hashable-time, hspec, hspec-core, hspec-expectations 11 + , hspec-expectations-lifted, http-api-data, http-client 12 + , http-client-tls, http-conduit, http-types, immortal 13 13 , insert-ordered-containers, jose, kan-extensions, lens, lens-aeson 14 14 , lib, lifted-async, lifted-base, list-t, memory, mime-types 15 15 , mmorph, monad-control, monad-loops, monad-validate, mtl, mustache 16 16 , mysql, mysql-simple, natural-transformation, network, network-uri 17 17 , odbc, optparse-applicative, pem, pg-client, postgresql-binary 18 - , postgresql-libpq, process, profunctors, psqueues, QuickCheck 19 - , quickcheck-instances, random, regex-tdfa, resource-pool, retry 20 - , safe, safe-exceptions, scientific, semialign, semigroups, semver 21 - , shakespeare, some, split, Spock-core, stm, stm-containers, tagged 22 - , template-haskell, text, text-builder, text-conversions, these 23 - , time, transformers, transformers-base, unix, unordered-containers 24 - , uri-encode, utf8-string, uuid, validation, vector 25 - , vector-instances, wai, warp, websockets, wreq, x509, x509-store 26 - , yaml, zlib 18 + , postgresql-libpq, pretty-simple, process, profunctors, psqueues 19 + , QuickCheck, quickcheck-instances, random, regex-tdfa 20 + , resource-pool, retry, safe, safe-exceptions, scientific 21 + , semialign, semigroups, semver, shakespeare, some, split 22 + , Spock-core, stm, stm-containers, tagged, template-haskell, text 23 + , text-builder, text-conversions, these, time, transformers 24 + , transformers-base, unix, unordered-containers, uri-encode 25 + , utf8-string, uuid, validation, vector, vector-instances, wai 26 + , warp, websockets, wreq, x509, x509-store, yaml, zlib 27 27 }: 28 28 mkDerivation { 29 29 pname = "graphql-engine"; 30 30 version = "1.0.0"; 31 31 src = fetchgit { 32 32 url = "https://github.com/hasura/graphql-engine.git"; 33 - sha256 = "0sw7jwj3ixr0nnh3i9yagiqjsvf83w79jd7ac9vdvm410jfjcnxf"; 34 - rev = "5990ca403bf6e7dd66081720c329e513f0624fb6"; 33 + sha256 = "04s8rczvm0l5dbh14g2vav2wbqb4fg51471fncqf36s59img14b7"; 34 + rev = "cf6f3edc1f6df7843dfb91be6dcb0fd7cc94d133"; 35 35 fetchSubmodules = true; 36 36 }; 37 37 postUnpack = "sourceRoot+=/server; echo source root reset to $sourceRoot"; ··· 50 50 memory mime-types mmorph monad-control monad-loops monad-validate 51 51 mtl mustache mysql mysql-simple network network-uri odbc 52 52 optparse-applicative pem pg-client postgresql-binary 53 - postgresql-libpq process profunctors psqueues QuickCheck 54 - quickcheck-instances random regex-tdfa resource-pool retry 55 - safe-exceptions scientific semialign semigroups semver shakespeare 56 - some split Spock-core stm stm-containers tagged template-haskell 57 - text text-builder text-conversions these time transformers 58 - transformers-base unix unordered-containers uri-encode utf8-string 59 - uuid validation vector vector-instances wai warp websockets wreq 60 - x509 x509-store yaml zlib 53 + postgresql-libpq pretty-simple process profunctors psqueues 54 + QuickCheck quickcheck-instances random regex-tdfa resource-pool 55 + retry safe-exceptions scientific semialign semigroups semver 56 + shakespeare some split Spock-core stm stm-containers tagged 57 + template-haskell text text-builder text-conversions these time 58 + transformers transformers-base unix unordered-containers uri-encode 59 + utf8-string uuid validation vector vector-instances wai warp 60 + websockets wreq x509 x509-store yaml zlib 61 61 ]; 62 62 executableHaskellDepends = [ 63 63 base bytestring ekg-core kan-extensions pg-client text ··· 65 65 ]; 66 66 testHaskellDepends = [ 67 67 aeson base bytestring containers cron dependent-map dependent-sum 68 - generic-arbitrary graphql-parser hspec hspec-core 69 - hspec-expectations hspec-expectations-lifted http-client 70 - http-client-tls http-types insert-ordered-containers jose 71 - kan-extensions lens lifted-base mmorph monad-control mtl 72 - natural-transformation network-uri optparse-applicative pg-client 73 - process QuickCheck safe scientific split template-haskell text time 74 - transformers-base unordered-containers vector 68 + graphql-parser hspec hspec-core hspec-expectations 69 + hspec-expectations-lifted http-client http-client-tls http-types 70 + insert-ordered-containers jose kan-extensions lens lifted-base 71 + mmorph monad-control mtl natural-transformation network-uri 72 + optparse-applicative pg-client process QuickCheck safe scientific 73 + split template-haskell text time transformers-base 74 + unordered-containers vector 75 75 ]; 76 76 doCheck = false; 77 77 homepage = "https://www.hasura.io";
+17 -3
pkgs/development/misc/haskell/hasura/update.sh
··· 19 19 ciinfo_derivation_file="${script_dir}/ci-info.nix" 20 20 pgclient_derivation_file="${script_dir}/pg-client.nix" 21 21 pool_derivation_file="${script_dir}/pool.nix" 22 + ekgcore_derivation_file="${script_dir}/ekg-core.nix" 23 + ekgjson_derivation_file="${script_dir}/ekg-json.nix" 22 24 23 25 # TODO: get current revision of graphql-engine in Nixpkgs. 24 26 # old_version="$(sed -En 's/.*\bversion = "(.*?)".*/\1/p' "$engine_derivation_file")" ··· 31 33 echo "# This has been automatically generated by the script" > "$engine_derivation_file" 32 34 echo "# ./update.sh. This should not be changed by hand." >> "$engine_derivation_file" 33 35 34 - # 2.0.5 hardcoded for now, because 2.0.6 failed to build. should be removed when updating 35 - # cabal2nix --revision "$new_version" --subpath server --maintainer lassulus "https://github.com/hasura/graphql-engine.git" >> "$engine_derivation_file" 36 - cabal2nix --revision "v2.0.5" --subpath server --maintainer lassulus --no-check "https://github.com/hasura/graphql-engine.git" >> "$engine_derivation_file" 36 + cabal2nix --revision "$new_version" --subpath server --maintainer lassulus --no-check "https://github.com/hasura/graphql-engine.git" >> "$engine_derivation_file" 37 37 38 38 echo "Running cabal2nix and outputting to ${parser_derivation_file}..." 39 39 ··· 62 62 echo "# ./update.sh. This should not be changed by hand." >> "$pool_derivation_file" 63 63 64 64 cabal2nix "https://github.com/hasura/pool.git" >> "$pool_derivation_file" 65 + 66 + echo "Running cabal2nix and outputting to ${ekgcore_derivation_file}..." 67 + 68 + echo "# This has been automatically generated by the script" > "$ekgcore_derivation_file" 69 + echo "# ./update.sh. This should not be changed by hand." >> "$ekgcore_derivation_file" 70 + 71 + cabal2nix "https://github.com/hasura/ekg-core.git" >> "$ekgcore_derivation_file" 72 + 73 + echo "Running cabal2nix and outputting to ${ekgjson_derivation_file}..." 74 + 75 + echo "# This has been automatically generated by the script" > "$ekgjson_derivation_file" 76 + echo "# ./update.sh. This should not be changed by hand." >> "$ekgjson_derivation_file" 77 + 78 + cabal2nix "https://github.com/hasura/ekg-json.git" >> "$ekgjson_derivation_file" 65 79 66 80 echo "###################" 67 81 echo "please update pkgs/servers/hasura/cli.nix vendorSha256"