From 7553b33b4d3caedd5650953acf7ae440f2154735 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 13 Dec 2024 16:35:10 +0530 Subject: Init commit with hello world shit --- flake.nix | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ead8307 --- /dev/null +++ b/flake.nix @@ -0,0 +1,48 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + haskell-flake.url = "github:srid/haskell-flake"; + }; + outputs = inputs@{ self, nixpkgs, flake-parts, ... }: + flake-parts.lib.mkFlake { inherit inputs; } { + systems = nixpkgs.lib.systems.flakeExposed; + imports = [ inputs.haskell-flake.flakeModule ]; + + perSystem = { self', pkgs, lib, config, ... }: { + haskellProjects.default = { + projectRoot = builtins.toString (lib.fileset.toSource { + root = ./.; + fileset = lib.fileset.unions [ + ./src + ./specs + ./chelleport.cabal + ]; + }); + + packages = {}; + settings = {}; + + devShell = { + # tools = hp: { fourmolu = hp.fourmolu; ghcid = null; }; + hlsCheck.enable = pkgs.stdenv.isDarwin; + }; + + autoWire = [ "packages" "apps" "checks" ]; + }; + + packages.default = self'.packages.chelleport; + apps.default = self'.apps.chelleport; + + devShells.default = pkgs.mkShell { + inputsFrom = [ + config.haskellProjects.default.outputs.devShell + ]; + packages = with pkgs; [ + just + haskellPackages.hspec-golden + ]; + }; + }; + }; +} -- cgit v1.3.1