{ # Builds a Haskell project that uses State to allocate build numbers and # per-environment rollout waves while planning deployments. description = "A Haskell project for State-based planning"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; }; outputs = { self, nixpkgs, ... }: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; inherit (pkgs) haskellPackages; project = haskellPackages.callCabal2nix "mini-state-planner" ./. { }; checkedProject = pkgs.haskell.lib.doCheck project; in { packages.${system}.default = project; apps.${system}.default = { type = "app"; program = "${self.packages.${system}.default}/bin/mini-state-planner"; meta.description = "Run the State-based release planner example."; }; devShells.${system}.default = pkgs.mkShell { packages = [ haskellPackages.ghc pkgs.cabal-install pkgs.haskell-language-server ]; }; checks.${system}.test-suite = checkedProject; }; }