From 31f1c125eb2d15e5269d1c8b285b508df6c24dd1 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Fri, 14 Feb 2025 01:34:04 +0100 Subject: [PATCH 1/2] hasura-graphql-engine, haskellPackages: remove all broken hasura pkgs These have been broken for a long time and are severly outdated. I'm taking the lack of maintenance as a lack of interest and dropping these. It may be better to start from scratch anyways when packaging a newer version of hasura (they have added 9.10 support, so there's no reason it couldn't be resurrected in theory). From experience, Hasura is a huge can of worms and I'm personally not interested in maintaining it. I've tried to get the ball rolling again in the past (https://github.com/NixOS/nixpkgs/pull/250035) which also didn't garner any interest. --- .../haskell-modules/configuration-common.nix | 59 --- .../configuration-hackage2nix/broken.yaml | 2 - .../configuration-hackage2nix/main.yaml | 1 - .../haskell-modules/hackage-packages.nix | 19 - .../haskell-modules/non-hackage-packages.nix | 6 - .../misc/haskell/hasura/ekg-core.nix | 75 ---- .../misc/haskell/hasura/ekg-json.nix | 46 -- .../misc/haskell/hasura/graphql-engine.nix | 406 ------------------ .../misc/haskell/hasura/graphql-parser.nix | 74 ---- .../misc/haskell/hasura/kriti-lang.nix | 119 ----- .../misc/haskell/hasura/pg-client.nix | 100 ----- .../development/misc/haskell/hasura/update.sh | 55 --- pkgs/servers/hasura/cli.nix | 19 +- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 - pkgs/top-level/release-haskell.nix | 1 - 16 files changed, 16 insertions(+), 969 deletions(-) delete mode 100644 pkgs/development/misc/haskell/hasura/ekg-core.nix delete mode 100644 pkgs/development/misc/haskell/hasura/ekg-json.nix delete mode 100644 pkgs/development/misc/haskell/hasura/graphql-engine.nix delete mode 100644 pkgs/development/misc/haskell/hasura/graphql-parser.nix delete mode 100644 pkgs/development/misc/haskell/hasura/kriti-lang.nix delete mode 100644 pkgs/development/misc/haskell/hasura/pg-client.nix diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 1258dcc7d956..f7c7b5b08a78 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1667,62 +1667,6 @@ self: super: { # https://github.com/strake/filtrable.hs/issues/6 filtrable = doJailbreak super.filtrable; - # hasura packages need some extra care - graphql-engine = overrideCabal (drv: { - patches = [ - # Compat with unordered-containers >= 0.2.15.0 - (fetchpatch { - name = "hasura-graphql-engine-updated-deps.patch"; - url = "https://github.com/hasura/graphql-engine/commit/d50aae87a58794bc1fc66c7a60acb0c34b5e70c7.patch"; - stripLen = 1; - excludes = [ "cabal.project.freeze" ]; - sha256 = "0lb5l9vfynr85i9xs53w4mpgczp04ncxz7846n3y91ri34fa87v3"; - }) - # Compat with hashable >= 1.3.4.0 - (fetchpatch { - name = "hasura-graphql-engine-hashable-1.3.4.0.patch"; - url = "https://github.com/hasura/graphql-engine/commit/e48b2287315fb09005ffd52c0a686dc321171ae2.patch"; - sha256 = "1jppnanmsyl8npyf59s0d8bgjy7bq50vkh5zx4888jy6jqh27jb6"; - stripLen = 1; - }) - # Compat with unordered-containers >= 0.2.17.0 - (fetchpatch { - name = "hasura-graphql-engine-unordered-containers-0.2.17.0.patch"; - url = "https://github.com/hasura/graphql-engine/commit/3a1eb3128a2ded2da7c5fef089738890828cce03.patch"; - sha256 = "0vz7s8m8mjvv728vm4q0dvvrirvydaw7xks30b5ddj9f6a72a2f1"; - stripLen = 1; - }) - ]; - doHaddock = false; - version = "2.3.1"; - }) (super.graphql-engine.override { - immortal = self.immortal_0_2_2_1; - resource-pool = self.hasura-resource-pool; - ekg-core = self.hasura-ekg-core; - ekg-json = self.hasura-ekg-json; - }); - hasura-ekg-json = super.hasura-ekg-json.override { - ekg-core = self.hasura-ekg-core; - }; - pg-client = lib.pipe - (super.pg-client.override { - resource-pool = self.hasura-resource-pool; - ekg-core = self.hasura-ekg-core; - }) [ - (overrideCabal (drv: { - librarySystemDepends = with pkgs; [ postgresql krb5.dev openssl.dev ]; - testToolDepends = drv.testToolDepends or [] ++ [ - pkgs.postgresql pkgs.postgresqlTestHook - ]; - preCheck = drv.preCheck or "" + '' - # empty string means use default connection - export DATABASE_URL="" - ''; - })) - # https://github.com/NixOS/nixpkgs/issues/198495 - (dontCheckIf (!pkgs.postgresql.doCheck)) - ]; - hcoord = overrideCabal (drv: { # Remove when https://github.com/danfran/hcoord/pull/8 is merged. patches = [ @@ -2349,9 +2293,6 @@ self: super: { # dontCheck: tests don't typecheck after ghc 8.4 (possibly introduced by api change of unix library) system-fileio = dontCheck super.system-fileio; - # Bounds too strict on base and ghc-prim: https://github.com/tibbe/ekg-core/pull/43 (merged); waiting on hackage release - hasura-ekg-core = doJailbreak super.hasura-ekg-core; - # Test suite doesn't support hspec 2.8 # https://github.com/zellige/hs-geojson/issues/29 geojson = dontCheck super.geojson; diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index e4ed937ca510..7478743dd1e7 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -2443,8 +2443,6 @@ broken-packages: - hastache # failure in job https://hydra.nixos.org/build/233224317 at 2023-09-02 - haste # failure in job https://hydra.nixos.org/build/233238510 at 2023-09-02 - haste-prim # failure in job https://hydra.nixos.org/build/233203281 at 2023-09-02 - - hasura-ekg-core # failure in job https://hydra.nixos.org/build/233211397 at 2023-09-02 - - hasura-ekg-core # failure in job https://hydra.nixos.org/build/234439842 at 2023-09-13 - hatex-guide # failure in job https://hydra.nixos.org/build/233258593 at 2023-09-02 - hat # failure in job https://hydra.nixos.org/build/233243655 at 2023-09-02 - hats # failure in job https://hydra.nixos.org/build/233256724 at 2023-09-02 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 262ca0109ca3..5a96255d0ee4 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -82,7 +82,6 @@ extra-packages: - hspec-discover < 2.8 # 2022-04-07: Needed for tasty-hspec 1.1.6 - hspec-megaparsec == 2.2.0 # 2023-11-18: Latest version compatible with ghc 9.0, needed for HLS - hspec-meta < 2.8 # 2022-12-07: Needed for elmPackages.elm / hspec-discover - - immortal == 0.2.2.1 # required by Hasura 1.3.1, 2020-08-20 - language-docker == 11.0.0 # required by hadolint 2.12.0, 2022-11-16 - language-javascript == 0.7.0.0 # required by purescript - lsp == 2.1.* # 2024-02-28: need for dhall-lsp-server diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 01e3a9c591aa..8fda05b58955 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -173113,25 +173113,6 @@ self: { broken = true; }) {}; - "immortal_0_2_2_1" = callPackage - ({ mkDerivation, base, lifted-base, monad-control, stm, tasty - , tasty-hunit, transformers, transformers-base - }: - mkDerivation { - pname = "immortal"; - version = "0.2.2.1"; - sha256 = "13lddk62byx8w41k80d24q31mmijacnqqz64zrrkls9si2ia2jpd"; - libraryHaskellDepends = [ - base lifted-base monad-control stm transformers-base - ]; - testHaskellDepends = [ - base lifted-base stm tasty tasty-hunit transformers - ]; - description = "Spawn threads that never die (unless told to do so)"; - license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; - }) {}; - "immortal" = callPackage ({ mkDerivation, base, stm, tasty, tasty-hunit, transformers , unliftio-core diff --git a/pkgs/development/haskell-modules/non-hackage-packages.nix b/pkgs/development/haskell-modules/non-hackage-packages.nix index 6e9bd5f4ff4e..136b68af900f 100644 --- a/pkgs/development/haskell-modules/non-hackage-packages.nix +++ b/pkgs/development/haskell-modules/non-hackage-packages.nix @@ -45,13 +45,7 @@ self: super: { # hasura graphql-engine is not released to hackage. # https://github.com/hasura/graphql-engine/issues/7391 ci-info = self.callPackage ../misc/haskell/hasura/ci-info.nix {}; - pg-client = self.callPackage ../misc/haskell/hasura/pg-client.nix {}; - graphql-parser = self.callPackage ../misc/haskell/hasura/graphql-parser.nix {}; - graphql-engine = self.callPackage ../misc/haskell/hasura/graphql-engine.nix {}; - kriti-lang = self.callPackage ../misc/haskell/hasura/kriti-lang.nix {}; hasura-resource-pool = self.callPackage ../misc/haskell/hasura/pool.nix {}; - hasura-ekg-core = self.callPackage ../misc/haskell/hasura/ekg-core.nix {}; - hasura-ekg-json = self.callPackage ../misc/haskell/hasura/ekg-json.nix {}; # Unofficial fork until PRs are merged https://github.com/pcapriotti/optparse-applicative/pulls/roberth # cabal2nix --maintainer roberth https://github.com/hercules-ci/optparse-applicative.git > pkgs/development/misc/haskell/hercules-ci-optparse-applicative.nix diff --git a/pkgs/development/misc/haskell/hasura/ekg-core.nix b/pkgs/development/misc/haskell/hasura/ekg-core.nix deleted file mode 100644 index cbdad1adf512..000000000000 --- a/pkgs/development/misc/haskell/hasura/ekg-core.nix +++ /dev/null @@ -1,75 +0,0 @@ -# This has been automatically generated by the script -# ./update.sh. This should not be changed by hand. -{ - mkDerivation, - async, - atomic-primops, - base, - containers, - criterion, - fetchgit, - ghc-prim, - hashable, - hspec, - hspec-smallcheck, - HUnit, - inspection-testing, - lib, - markdown-unlit, - primitive, - QuickCheck, - smallcheck, - text, - unordered-containers, -}: -mkDerivation { - pname = "ekg-core"; - version = "0.1.1.7"; - src = fetchgit { - url = "https://github.com/hasura/ekg-core.git"; - sha256 = "1syb87iav3fgj6vqjh1izdvw4g0l4mngcyhvcg2nazisw3l685z6"; - rev = "b0cdc337ca2a52e392d427916ba3e28246b396c0"; - fetchSubmodules = true; - }; - libraryHaskellDepends = [ - atomic-primops - base - containers - ghc-prim - hashable - inspection-testing - primitive - text - unordered-containers - ]; - testHaskellDepends = [ - async - atomic-primops - base - containers - ghc-prim - hashable - hspec - hspec-smallcheck - HUnit - inspection-testing - markdown-unlit - primitive - QuickCheck - smallcheck - text - unordered-containers - ]; - testToolDepends = [ markdown-unlit ]; - benchmarkHaskellDepends = [ - base - criterion - ]; - doHaddock = false; - homepage = "https://github.com/tibbe/ekg-core"; - description = "Tracking of system metrics"; - license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; - maintainers = with lib.maintainers; [ lassulus ]; - broken = true; -} diff --git a/pkgs/development/misc/haskell/hasura/ekg-json.nix b/pkgs/development/misc/haskell/hasura/ekg-json.nix deleted file mode 100644 index 821cba064424..000000000000 --- a/pkgs/development/misc/haskell/hasura/ekg-json.nix +++ /dev/null @@ -1,46 +0,0 @@ -# This has been automatically generated by the script -# ./update.sh. This should not be changed by hand. -{ - mkDerivation, - aeson, - base, - ekg-core, - fetchgit, - hspec, - lib, - text, - unordered-containers, - vector, -}: -mkDerivation { - pname = "ekg-json"; - version = "0.1.0.7"; - src = fetchgit { - url = "https://github.com/hasura/ekg-json.git"; - sha256 = "17kd2f1695dmf5l95iz1w86hapc4f1gfrd0ld3ivffa2q5vxbi70"; - rev = "d1c5031b49a5559cf4b4f6beb0238b872890a48c"; - fetchSubmodules = true; - }; - libraryHaskellDepends = [ - aeson - base - ekg-core - text - unordered-containers - vector - ]; - testHaskellDepends = [ - aeson - base - ekg-core - hspec - text - unordered-containers - ]; - homepage = "https://github.com/tibbe/ekg-json"; - description = "JSON encoding of ekg metrics"; - license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; - maintainers = with lib.maintainers; [ lassulus ]; - broken = true; -} diff --git a/pkgs/development/misc/haskell/hasura/graphql-engine.nix b/pkgs/development/misc/haskell/hasura/graphql-engine.nix deleted file mode 100644 index cc47535ba3bf..000000000000 --- a/pkgs/development/misc/haskell/hasura/graphql-engine.nix +++ /dev/null @@ -1,406 +0,0 @@ -# This has been automatically generated by the script -# ./update.sh. This should not be changed by hand. -{ - mkDerivation, - aeson, - aeson-casing, - aeson-qq, - ansi-wl-pprint, - asn1-encoding, - asn1-types, - async, - attoparsec, - attoparsec-iso8601, - auto-update, - base, - base16-bytestring, - base64-bytestring, - binary, - byteorder, - bytestring, - case-insensitive, - ci-info, - conduit, - connection, - containers, - cron, - cryptonite, - data-default-class, - data-has, - deepseq, - dependent-map, - dependent-sum, - directory, - either, - ekg-core, - ekg-json, - exceptions, - fast-logger, - fetchgit, - file-embed, - filepath, - ghc-heap-view, - graphql-parser, - hashable, - hashable-time, - haskell-src-meta, - hedgehog, - hspec, - hspec-core, - hspec-discover, - hspec-expectations, - hspec-expectations-lifted, - hspec-hedgehog, - hspec-wai, - hspec-wai-json, - http-api-data, - http-client, - http-client-tls, - http-conduit, - http-media, - http-types, - immortal, - insert-ordered-containers, - jose, - kan-extensions, - kriti-lang, - lens, - lens-aeson, - lib, - libyaml, - lifted-async, - lifted-base, - list-t, - memory, - mime-types, - mmorph, - monad-control, - monad-logger, - monad-loops, - monad-validate, - mtl, - mustache, - mysql, - mysql-simple, - natural-transformation, - network, - network-uri, - odbc, - openapi3, - optparse-applicative, - optparse-generic, - parsec, - pem, - pg-client, - postgresql-binary, - postgresql-libpq, - postgresql-simple, - pretty-simple, - process, - profunctors, - psqueues, - QuickCheck, - quickcheck-instances, - random, - regex-tdfa, - resource-pool, - resourcet, - retry, - safe, - safe-exceptions, - scientific, - semialign, - semigroups, - semver, - shakespeare, - some, - split, - Spock-core, - stm, - stm-containers, - tagged, - template-haskell, - text, - text-builder, - text-conversions, - th-lift, - th-lift-instances, - these, - time, - tls, - tmp-postgres, - transformers, - transformers-base, - typed-process, - unix, - unliftio-core, - unordered-containers, - uri-bytestring, - uri-encode, - url, - utf8-string, - uuid, - validation, - vector, - vector-instances, - wai, - wai-extra, - warp, - websockets, - witch, - wreq, - x509, - x509-store, - x509-system, - x509-validation, - yaml, - zlib, -}: -mkDerivation { - pname = "graphql-engine"; - version = "1.0.0"; - src = fetchgit { - url = "https://github.com/hasura/graphql-engine.git"; - sha256 = "1r19qw2wxzmngb6sjpin3dk6i5r491brcb0ir4g8kw9d0ic90hpy"; - rev = "1349e6cdcfdef4b06593b48fe8e2e51b9f9c94e9"; - fetchSubmodules = true; - }; - postUnpack = "sourceRoot+=/server; echo source root reset to $sourceRoot"; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ - aeson - aeson-casing - ansi-wl-pprint - asn1-encoding - asn1-types - async - attoparsec - attoparsec-iso8601 - auto-update - base - base16-bytestring - base64-bytestring - binary - byteorder - bytestring - case-insensitive - ci-info - connection - containers - cron - cryptonite - data-default-class - data-has - deepseq - dependent-map - dependent-sum - directory - either - ekg-core - ekg-json - exceptions - fast-logger - file-embed - filepath - ghc-heap-view - graphql-parser - hashable - hashable-time - http-api-data - http-client - http-client-tls - http-conduit - http-media - http-types - immortal - insert-ordered-containers - jose - kan-extensions - kriti-lang - lens - lens-aeson - lifted-async - lifted-base - list-t - memory - mime-types - mmorph - monad-control - monad-loops - monad-validate - mtl - mustache - mysql - mysql-simple - network - network-uri - odbc - openapi3 - optparse-applicative - optparse-generic - parsec - pem - pg-client - postgresql-binary - postgresql-libpq - pretty-simple - process - profunctors - psqueues - QuickCheck - quickcheck-instances - random - regex-tdfa - resource-pool - retry - safe-exceptions - scientific - semialign - semigroups - semver - shakespeare - some - split - Spock-core - stm - stm-containers - tagged - template-haskell - text - text-builder - text-conversions - these - time - tls - transformers - transformers-base - unix - unordered-containers - uri-bytestring - uri-encode - url - utf8-string - uuid - validation - vector - vector-instances - wai - warp - websockets - witch - wreq - x509 - x509-store - x509-system - x509-validation - yaml - zlib - ]; - executableHaskellDepends = [ - base - bytestring - ekg-core - kan-extensions - pg-client - text - text-conversions - time - unix - ]; - testHaskellDepends = [ - aeson - aeson-casing - aeson-qq - async - base - bytestring - case-insensitive - conduit - containers - cron - dependent-map - dependent-sum - ekg-core - exceptions - graphql-parser - haskell-src-meta - hedgehog - hspec - hspec-core - hspec-discover - hspec-expectations - hspec-expectations-lifted - hspec-hedgehog - hspec-wai - hspec-wai-json - http-client - http-client-tls - http-conduit - http-types - insert-ordered-containers - jose - kan-extensions - lens - lens-aeson - libyaml - lifted-base - mmorph - monad-control - monad-logger - mtl - mysql - mysql-simple - natural-transformation - network - network-uri - odbc - optparse-applicative - parsec - pg-client - postgresql-libpq - postgresql-simple - process - QuickCheck - resource-pool - resourcet - safe - safe-exceptions - scientific - shakespeare - split - Spock-core - stm - template-haskell - text - text-conversions - th-lift - th-lift-instances - time - tmp-postgres - transformers - transformers-base - typed-process - unix - unliftio-core - unordered-containers - utf8-string - vector - wai - wai-extra - warp - websockets - yaml - ]; - testToolDepends = [ hspec-discover ]; - doCheck = false; - homepage = "https://www.hasura.io"; - description = "GraphQL API over Postgres"; - license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ lassulus ]; - - # Needs to be updated for aeson-2.0 - # https://github.com/hasura/graphql-engine/issues/8369 - hydraPlatforms = lib.platforms.none; - broken = true; -} diff --git a/pkgs/development/misc/haskell/hasura/graphql-parser.nix b/pkgs/development/misc/haskell/hasura/graphql-parser.nix deleted file mode 100644 index 9b3d75267378..000000000000 --- a/pkgs/development/misc/haskell/hasura/graphql-parser.nix +++ /dev/null @@ -1,74 +0,0 @@ -# This has been automatically generated by the script -# ./update.sh. This should not be changed by hand. -{ - mkDerivation, - aeson, - attoparsec, - base, - bytestring, - deepseq, - fetchgit, - hashable, - hedgehog, - lib, - prettyprinter, - scientific, - tasty-bench, - template-haskell, - text, - text-builder, - th-lift-instances, - unordered-containers, -}: -mkDerivation { - pname = "graphql-parser"; - version = "0.2.0.0"; - src = fetchgit { - url = "https://github.com/hasura/graphql-parser-hs.git"; - sha256 = "1xprr5wdhcfnbggkygz71v3za1mmkqv5mbm7h16kpsrhm1m9mpx8"; - rev = "c311bc15b8d8cef28a846d1d81b0bcc1d59bd956"; - fetchSubmodules = true; - }; - libraryHaskellDepends = [ - aeson - attoparsec - base - bytestring - deepseq - hashable - hedgehog - prettyprinter - scientific - template-haskell - text - text-builder - th-lift-instances - unordered-containers - ]; - testHaskellDepends = [ - attoparsec - base - bytestring - hedgehog - prettyprinter - text - text-builder - ]; - benchmarkHaskellDepends = [ - base - bytestring - prettyprinter - tasty-bench - text - text-builder - ]; - homepage = "https://github.com/hasura/graphql-parser-hs"; - description = "Native Haskell GraphQL parser"; - license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ lassulus ]; - - # Needs to be updated for aeson-2.0 - # https://github.com/hasura/graphql-engine/issues/8369 - hydraPlatforms = lib.platforms.none; - broken = true; -} diff --git a/pkgs/development/misc/haskell/hasura/kriti-lang.nix b/pkgs/development/misc/haskell/hasura/kriti-lang.nix deleted file mode 100644 index f2f993723c64..000000000000 --- a/pkgs/development/misc/haskell/hasura/kriti-lang.nix +++ /dev/null @@ -1,119 +0,0 @@ -# This has been automatically generated by the script -# ./update.sh. This should not be changed by hand. -{ - mkDerivation, - aeson, - aeson-pretty, - alex, - array, - base, - bytestring, - containers, - directory, - fetchgit, - filepath, - generic-arbitrary, - happy, - hspec, - hspec-core, - hspec-golden, - lens, - lens-aeson, - lib, - megaparsec, - mtl, - network-uri, - optparse-applicative, - parsec, - parser-combinators, - pretty-simple, - prettyprinter, - QuickCheck, - raw-strings-qq, - safe-exceptions, - scientific, - text, - unordered-containers, - utf8-string, - vector, -}: -mkDerivation { - pname = "kriti-lang"; - version = "0.3.1"; - src = fetchgit { - url = "https://github.com/hasura/kriti-lang.git"; - sha256 = "09v31xp8gkc0p0gfysxyd8yb7lyb1vpgzq8550h3s3msjbapr7pj"; - rev = "0f0b153b93af5dc6c6e995c016ca4562e8438cec"; - fetchSubmodules = true; - }; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ - aeson - array - base - bytestring - containers - lens - megaparsec - mtl - network-uri - optparse-applicative - parser-combinators - prettyprinter - scientific - text - unordered-containers - utf8-string - vector - ]; - libraryToolDepends = [ - alex - happy - ]; - executableHaskellDepends = [ - aeson - base - bytestring - containers - mtl - optparse-applicative - prettyprinter - text - utf8-string - ]; - testHaskellDepends = [ - aeson - aeson-pretty - base - bytestring - containers - directory - filepath - generic-arbitrary - hspec - hspec-core - hspec-golden - lens - lens-aeson - mtl - optparse-applicative - parsec - pretty-simple - prettyprinter - QuickCheck - raw-strings-qq - safe-exceptions - scientific - text - unordered-containers - utf8-string - vector - ]; - license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ lassulus ]; - - # Does not compile with ghc-9.2 - hydraPlatforms = lib.platforms.none; - broken = true; -} diff --git a/pkgs/development/misc/haskell/hasura/pg-client.nix b/pkgs/development/misc/haskell/hasura/pg-client.nix deleted file mode 100644 index d906de3bdbb2..000000000000 --- a/pkgs/development/misc/haskell/hasura/pg-client.nix +++ /dev/null @@ -1,100 +0,0 @@ -# This has been automatically generated by the script -# ./update.sh. This should not be changed by hand. -{ - mkDerivation, - aeson, - aeson-casing, - async, - attoparsec, - base, - bytestring, - ekg-core, - fetchgit, - file-embed, - hashable, - hashtables, - hasql, - hasql-pool, - hasql-transaction, - hspec, - lib, - mmorph, - monad-control, - mtl, - postgresql-binary, - postgresql-libpq, - resource-pool, - retry, - safe-exceptions, - scientific, - tasty-bench, - template-haskell, - text, - text-builder, - time, - transformers-base, - uuid, - vector, -}: -mkDerivation { - pname = "pg-client"; - version = "0.1.0"; - src = fetchgit { - url = "https://github.com/hasura/pg-client-hs.git"; - sha256 = "0ga2bj0mfng25c8kxsvi8i13pnanbnhahxvbq8ijl0bysd41g7zi"; - rev = "09b40ad8e5d16a78f5d91fe2306676f52caadbc8"; - fetchSubmodules = true; - }; - libraryHaskellDepends = [ - aeson - aeson-casing - async - attoparsec - base - bytestring - ekg-core - hashable - hashtables - mmorph - monad-control - mtl - postgresql-binary - postgresql-libpq - resource-pool - retry - safe-exceptions - scientific - template-haskell - text - text-builder - time - transformers-base - uuid - vector - ]; - testHaskellDepends = [ - async - base - bytestring - hspec - mtl - safe-exceptions - time - ]; - benchmarkHaskellDepends = [ - base - bytestring - file-embed - hasql - hasql-pool - hasql-transaction - mtl - tasty-bench - text - ]; - homepage = "https://github.com/hasura/platform"; - license = lib.licenses.asl20; - hydraPlatforms = lib.platforms.none; - maintainers = with lib.maintainers; [ lassulus ]; - broken = true; -} diff --git a/pkgs/development/misc/haskell/hasura/update.sh b/pkgs/development/misc/haskell/hasura/update.sh index 825f57fa4e58..8fd5e3fb93cc 100755 --- a/pkgs/development/misc/haskell/hasura/update.sh +++ b/pkgs/development/misc/haskell/hasura/update.sh @@ -14,14 +14,8 @@ set -eo pipefail script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" # graphql-engine derivation created with cabal2nix. -engine_derivation_file="${script_dir}/graphql-engine.nix" -parser_derivation_file="${script_dir}/graphql-parser.nix" ciinfo_derivation_file="${script_dir}/ci-info.nix" -pgclient_derivation_file="${script_dir}/pg-client.nix" pool_derivation_file="${script_dir}/pool.nix" -ekgcore_derivation_file="${script_dir}/ekg-core.nix" -ekgjson_derivation_file="${script_dir}/ekg-json.nix" -kritilang_derivation_file="${script_dir}/kriti-lang.nix" # TODO: get current revision of graphql-engine in Nixpkgs. # old_version="$(sed -En 's/.*\bversion = "(.*?)".*/\1/p' "$engine_derivation_file")" @@ -29,20 +23,6 @@ kritilang_derivation_file="${script_dir}/kriti-lang.nix" # This is the latest release version of graphql-engine on GitHub. new_version=$(curl --silent "https://api.github.com/repos/hasura/graphql-engine/releases" | jq 'map(select(.prerelease | not)) | .[0].tag_name' --raw-output) -echo "Running cabal2nix and outputting to ${engine_derivation_file}..." - -echo "# This has been automatically generated by the script" > "$engine_derivation_file" -echo "# ./update.sh. This should not be changed by hand." >> "$engine_derivation_file" - -cabal2nix --revision "$new_version" --subpath server --maintainer lassulus --no-check "https://github.com/hasura/graphql-engine.git" >> "$engine_derivation_file" - -echo "Running cabal2nix and outputting to ${parser_derivation_file}..." - -echo "# This has been automatically generated by the script" > "$parser_derivation_file" -echo "# ./update.sh. This should not be changed by hand." >> "$parser_derivation_file" - -cabal2nix --maintainer lassulus "https://github.com/hasura/graphql-parser-hs.git" >> "$parser_derivation_file" - echo "Running cabal2nix and outputting to ${ciinfo_derivation_file}..." echo "# This has been automatically generated by the script" > "$ciinfo_derivation_file" @@ -50,13 +30,6 @@ echo "# ./update.sh. This should not be changed by hand." >> "$ciinfo_derivatio cabal2nix --maintainer lassulus "https://github.com/hasura/ci-info-hs.git" >> "$ciinfo_derivation_file" -echo "Running cabal2nix and outputting to ${pgclient_derivation_file}..." - -echo "# This has been automatically generated by the script" > "$pgclient_derivation_file" -echo "# ./update.sh. This should not be changed by hand." >> "$pgclient_derivation_file" - -cabal2nix --maintainer lassulus "https://github.com/hasura/pg-client-hs.git" >> "$pgclient_derivation_file" - echo "Running cabal2nix and outputting to ${pool_derivation_file}..." echo "# This has been automatically generated by the script" > "$pool_derivation_file" @@ -64,32 +37,4 @@ echo "# ./update.sh. This should not be changed by hand." >> "$pool_derivation_ cabal2nix --maintainer lassulus "https://github.com/hasura/pool.git" >> "$pool_derivation_file" -echo "Running cabal2nix and outputting to ${ekgcore_derivation_file}..." - -echo "# This has been automatically generated by the script" > "$ekgcore_derivation_file" -echo "# ./update.sh. This should not be changed by hand." >> "$ekgcore_derivation_file" - -cabal2nix --maintainer lassulus "https://github.com/hasura/ekg-core.git" >> "$ekgcore_derivation_file" - -echo "Running cabal2nix and outputting to ${ekgjson_derivation_file}..." - -echo "# This has been automatically generated by the script" > "$ekgjson_derivation_file" -echo "# ./update.sh. This should not be changed by hand." >> "$ekgjson_derivation_file" - -cabal2nix --maintainer lassulus "https://github.com/hasura/ekg-json.git" >> "$ekgjson_derivation_file" - -echo "Running cabal2nix and outputting to ${kritilang_derivation_file}..." - -echo "# This has been automatically generated by the script" > "$kritilang_derivation_file" -echo "# ./update.sh. This should not be changed by hand." >> "$kritilang_derivation_file" - -new_kritilang_version=$(curl --silent "https://api.github.com/repos/hasura/kriti-lang/tags" | jq '.[0].name' --raw-output) - -cabal2nix --revision "$new_kritilang_version" --maintainer lassulus "https://github.com/hasura/kriti-lang.git" >> "$kritilang_derivation_file" - -echo "###################" -echo "please update pkgs/servers/hasura/cli.nix vendorHash" -echo "please update pkgs/development/haskell-modules/configuration-common.nix graphql-engine version" -echo "###################" - echo "Finished." diff --git a/pkgs/servers/hasura/cli.nix b/pkgs/servers/hasura/cli.nix index 09e1a5fd95c1..0584e872f310 100644 --- a/pkgs/servers/hasura/cli.nix +++ b/pkgs/servers/hasura/cli.nix @@ -1,10 +1,19 @@ -{ buildGoModule, hasura-graphql-engine }: +{ + buildGoModule, + lib, + fetchFromGitHub, +}: buildGoModule rec { pname = "hasura"; - version = hasura-graphql-engine.version; + version = "2.3.1"; - src = hasura-graphql-engine.src; + src = fetchFromGitHub { + owner = "hasura"; + repo = "graphql-engine"; + rev = "v${version}"; + sha256 = "1r19qw2wxzmngb6sjpin3dk6i5r491brcb0ir4g8kw9d0ic90hpy"; + }; modRoot = "./cli"; subPackages = [ "cmd/hasura" ]; @@ -28,7 +37,9 @@ buildGoModule rec { ''; meta = { - inherit (hasura-graphql-engine.meta) license homepage maintainers; + homepage = "https://www.hasura.io"; + maintainers = [ lib.maintainers.lassulus ]; + license = lib.licenses.asl20; description = "Hasura GraphQL Engine CLI"; mainProgram = "hasura"; }; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 006911d444a7..9e841deef023 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -578,6 +578,7 @@ mapAliases { ### H ### hacksaw = throw "'hacksaw' has been removed due to lack of upstream maintenance"; # Added 2025-01-25 + hasura-graphql-engine = throw "hasura-graphql-engine has been removed because was broken and its packaging severly out of date"; # Added 2025-02-14 HentaiAtHome = hentai-at-home; # Added 2024-06-12 hll2390dw-cups = throw "The hll2390dw-cups package was dropped since it was unmaintained."; # Added 2024-06-21 hop-cli = throw "hop-cli has been removed as the service has been shut-down"; # Added 2024-08-13 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e337ecf5f797..c9d76083f21b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11309,8 +11309,6 @@ with pkgs; grafana-loki = callPackage ../servers/monitoring/loki { }; promtail = callPackage ../servers/monitoring/loki/promtail.nix { }; - hasura-graphql-engine = haskell.lib.compose.justStaticExecutables haskell.packages.ghc810.graphql-engine; - hasura-cli = callPackage ../servers/hasura/cli.nix { }; inherit (callPackage ../servers/hbase {}) hbase_2_4 hbase_2_5 hbase_2_6 hbase_3_0; diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 7f9c3023a3d4..5a4161b27d13 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -310,7 +310,6 @@ let happy haskell-ci haskell-language-server - hasura-graphql-engine hci hercules-ci-agent hinit From b71bdc9f2ad909342d7c4030acf0173b313fa354 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Fri, 14 Feb 2025 01:43:29 +0100 Subject: [PATCH 2/2] haskellPackages.{ci-info, hasura-resource-pool}: remove These packages were dependencies of hasura only and aren't uploaded to Hackage. It seems unlikely that any downstream user depends on them directly. --- .../haskell-modules/non-hackage-packages.nix | 5 --- .../misc/haskell/hasura/ci-info.nix | 41 ----------------- pkgs/development/misc/haskell/hasura/pool.nix | 44 ------------------- .../development/misc/haskell/hasura/update.sh | 40 ----------------- 4 files changed, 130 deletions(-) delete mode 100644 pkgs/development/misc/haskell/hasura/ci-info.nix delete mode 100644 pkgs/development/misc/haskell/hasura/pool.nix delete mode 100755 pkgs/development/misc/haskell/hasura/update.sh diff --git a/pkgs/development/haskell-modules/non-hackage-packages.nix b/pkgs/development/haskell-modules/non-hackage-packages.nix index 136b68af900f..28a54374de07 100644 --- a/pkgs/development/haskell-modules/non-hackage-packages.nix +++ b/pkgs/development/haskell-modules/non-hackage-packages.nix @@ -42,11 +42,6 @@ self: super: { nix-linter = self.callPackage ../../development/tools/analysis/nix-linter { }; - # hasura graphql-engine is not released to hackage. - # https://github.com/hasura/graphql-engine/issues/7391 - ci-info = self.callPackage ../misc/haskell/hasura/ci-info.nix {}; - hasura-resource-pool = self.callPackage ../misc/haskell/hasura/pool.nix {}; - # Unofficial fork until PRs are merged https://github.com/pcapriotti/optparse-applicative/pulls/roberth # cabal2nix --maintainer roberth https://github.com/hercules-ci/optparse-applicative.git > pkgs/development/misc/haskell/hercules-ci-optparse-applicative.nix hercules-ci-optparse-applicative = self.callPackage ../misc/haskell/hercules-ci-optparse-applicative.nix {}; diff --git a/pkgs/development/misc/haskell/hasura/ci-info.nix b/pkgs/development/misc/haskell/hasura/ci-info.nix deleted file mode 100644 index 1f01a0bc9fc1..000000000000 --- a/pkgs/development/misc/haskell/hasura/ci-info.nix +++ /dev/null @@ -1,41 +0,0 @@ -# This has been automatically generated by the script -# ./update.sh. This should not be changed by hand. -{ - mkDerivation, - aeson, - aeson-casing, - base, - fetchgit, - hashable, - hpack, - lib, - template-haskell, - text, - th-lift-instances, - unordered-containers, -}: -mkDerivation { - pname = "ci-info"; - version = "0.1.0.0"; - src = fetchgit { - url = "https://github.com/hasura/ci-info-hs.git"; - sha256 = "018vfyg0y2sn497nigjrcs6b1v3i9bna06dsbvgr6wjikcl6dhh4"; - rev = "68247a83738ac4bb9f719f0e4213aeb7be9565cf"; - fetchSubmodules = true; - }; - libraryHaskellDepends = [ - aeson - aeson-casing - base - hashable - template-haskell - text - th-lift-instances - unordered-containers - ]; - libraryToolDepends = [ hpack ]; - prePatch = "hpack"; - homepage = "https://github.com/hasura/ci-info-hs#readme"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ lassulus ]; -} diff --git a/pkgs/development/misc/haskell/hasura/pool.nix b/pkgs/development/misc/haskell/hasura/pool.nix deleted file mode 100644 index 8064ace3ab17..000000000000 --- a/pkgs/development/misc/haskell/hasura/pool.nix +++ /dev/null @@ -1,44 +0,0 @@ -# This has been automatically generated by the script -# ./update.sh. This should not be changed by hand. -{ - mkDerivation, - base, - fetchgit, - hashable, - hspec, - lib, - monad-control, - stm, - time, - transformers, - transformers-base, - vector, -}: -mkDerivation { - pname = "resource-pool"; - version = "0.2.3.2"; - src = fetchgit { - url = "https://github.com/hasura/pool.git"; - sha256 = "02wa32fl5wq5fk59id54xmxiqjl564r4rhsc79xsgf2j2spj0v94"; - rev = "dc56753338e7b61220a09bed0469c6dcc5e9fb52"; - fetchSubmodules = true; - }; - libraryHaskellDepends = [ - base - hashable - monad-control - stm - time - transformers - transformers-base - vector - ]; - testHaskellDepends = [ - base - hspec - ]; - homepage = "https://github.com/bos/pool"; - description = "High-performance striped resource pooling implementation"; - license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ lassulus ]; -} diff --git a/pkgs/development/misc/haskell/hasura/update.sh b/pkgs/development/misc/haskell/hasura/update.sh deleted file mode 100755 index 8fd5e3fb93cc..000000000000 --- a/pkgs/development/misc/haskell/hasura/update.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i bash -p cabal2nix curl jq -I nixpkgs=. -# -# This script will update the hasura derivations to the latest version using -# cabal2nix. -# -# Note that you should always try building hasura graphql-engine after updating it here, since -# some of the overrides in pkgs/development/haskell/configuration-nix.nix may -# need to be updated/changed. - -set -eo pipefail - -# This is the directory of this update.sh script. -script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -# graphql-engine derivation created with cabal2nix. -ciinfo_derivation_file="${script_dir}/ci-info.nix" -pool_derivation_file="${script_dir}/pool.nix" - -# TODO: get current revision of graphql-engine in Nixpkgs. -# old_version="$(sed -En 's/.*\bversion = "(.*?)".*/\1/p' "$engine_derivation_file")" - -# This is the latest release version of graphql-engine on GitHub. -new_version=$(curl --silent "https://api.github.com/repos/hasura/graphql-engine/releases" | jq 'map(select(.prerelease | not)) | .[0].tag_name' --raw-output) - -echo "Running cabal2nix and outputting to ${ciinfo_derivation_file}..." - -echo "# This has been automatically generated by the script" > "$ciinfo_derivation_file" -echo "# ./update.sh. This should not be changed by hand." >> "$ciinfo_derivation_file" - -cabal2nix --maintainer lassulus "https://github.com/hasura/ci-info-hs.git" >> "$ciinfo_derivation_file" - -echo "Running cabal2nix and outputting to ${pool_derivation_file}..." - -echo "# This has been automatically generated by the script" > "$pool_derivation_file" -echo "# ./update.sh. This should not be changed by hand." >> "$pool_derivation_file" - -cabal2nix --maintainer lassulus "https://github.com/hasura/pool.git" >> "$pool_derivation_file" - -echo "Finished."