graphql-engine/flake.nix
Samir Talwar 1ffc19367d Push the Nix dependency management configuration to the OSS repository.
We don't need to hide it.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6255
GitOrigin-RevId: 9b46511c6b274dd7e8e52ee74644dc86c7d75872
2022-10-11 15:33:22 +00:00

56 lines
1.5 KiB
Nix

# This Nix flake defines the dependencies of the Hasura GraphQL Engine.
# Currently, we do not use it for building anything, just for providing a shell.
#
# The shell provides tooling for the Server, CLI, Console, and other components.
# You can start it with `nix develop`, or by using `direnv` (see .envrc).
#
# If you are using macOS, note that we apply a patch to GHC, and therefore all
# tooling needs to be built from scratch. If you're averse to waiting several
# hours for your environment to become usable, you can add @SamirTalwar's Cachix
# repository to save yourself the trouble:
#
# https://app.cachix.org/cache/hasura-samirtalwar#pull
{
description = "Hasura GraphQL Engine";
inputs = {
flake-utils = {
url = github:numtide/flake-utils;
};
nixpkgs = {
url = github:NixOS/nixpkgs;
};
};
outputs =
{ self
, flake-utils
, nixpkgs
}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
overlays = [
(import ./nix/overlays/ghc.nix)
];
};
in
{
packages.graphql-parser = (pkgs.haskell.packages.${pkgs.ghcName}.callCabal2nix "graphql-parser" ./server/lib/graphql-parser-hs { }).overrideScope (
self: super: {
hedgehog = self.hedgehog_1_1_1;
}
);
formatter = pkgs.nixpkgs-fmt;
devShells.default = import ./nix/shell.nix { inherit pkgs; };
}
);
}