diff --git a/.hydra/spec.json b/.hydra/spec.json new file mode 100644 index 0000000..a44b02b --- /dev/null +++ b/.hydra/spec.json @@ -0,0 +1,14 @@ +{ + "wai-handler-hal-example": { + "enabled": 1, + "hidden": false, + "keepnr": 1, + "checkinterval": 300, + "schedulingshares": 100, + "description": "Development shell and bootstraps for wai-handler-hal-example repo", + "enableemail": false, + "emailoverride": "", + "type": 1, + "flake": "git+ssh://git@github.com/bellroy/wai-handler-hal-example" + } +} diff --git a/README.md b/README.md index 8e407cd..74e6dcd 100644 --- a/README.md +++ b/README.md @@ -44,3 +44,13 @@ images: Lambda Runtime Interface Emulator](https://github.com/aws/aws-lambda-runtime-interface-emulator/), and the bootstrap binary. + +## Maintaining this Repo + +We don't provide `haskell-ci` in the development shell, in case people +copying the flake don't want it. To regenerate the GitHub Actions +workflow: + +```sh +nix run nixpkgs#haskell-ci regenerate +``` diff --git a/flake.nix b/flake.nix index 0b13482..e34d440 100644 --- a/flake.nix +++ b/flake.nix @@ -23,7 +23,7 @@ pkgsMusl = pkgsLocal.pkgsCross.musl64; project = pkgs: pkgs.haskell-nix.project { - compiler-nix-name = "ghc948"; + compiler-nix-name = "ghc963"; evalSystem = "x86_64-linux"; src = pkgsLocal.haskell-nix.haskellLib.cleanGit { name = "wai-handler-hal-example"; @@ -39,6 +39,16 @@ }]; }; + devShells.x86_64-linux.default = + (project pkgsLocal).shellFor { + withHoogle = false; + buildInputs = with pkgsLocal; [ + haskellPackages.cabal-fmt + nixpkgs-fmt + nodejs + ]; + }; + # Compress a binary and put it in a directory under the name # `bootstrap`; CDK is smart enough to zip the directory up for # deployment. @@ -47,8 +57,7 @@ mkdir $out ${pkgsLocal.upx}/bin/upx -9 -o $out/bootstrap ${lambdaBinary} ''; - in - { + packages.x86_64-linux = { default = bootstrap; container = pkgsLocal.callPackage ./container.nix { @@ -66,16 +75,21 @@ }; }; - devShells.x86_64-linux.default = - (project pkgsLocal).shellFor { - withHoogle = false; - buildInputs = with pkgsLocal; [ - haskellPackages.cabal-fmt - nixpkgs-fmt - nodejs - ]; - }; - }; + hydraJobs = { + aggregate = pkgsLocal.runCommand "aggregate" + { + _hydraAggregate = true; + constituents = [ + "devShells.x86_64-linux.default" + "packages.x86_64-linux.default" + "packages.x86_64-linux.container" + "packages.x86_64-linux.tiny-container" + ]; + } + "touch $out"; + } // devShells // packages; + in + { inherit devShells packages hydraJobs; }; nixConfig = { allow-import-from-derivation = "true"; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..cc83e30 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "wai-handler-hal-example", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} diff --git a/wai-handler-hal-example.cabal b/wai-handler-hal-example.cabal index 43168a0..3859886 100644 --- a/wai-handler-hal-example.cabal +++ b/wai-handler-hal-example.cabal @@ -21,7 +21,7 @@ extra-source-files: README.md tested-with: - GHC ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.5 || ==9.4.5 + GHC ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.5 || ==9.4.5 || ==9.6.3 common opts default-language: Haskell2010 @@ -35,7 +35,7 @@ common opts common deps build-depends: , aeson >=1.5.6.0 && <1.6 || >=2.0 && <2.3 - , base >=4.12 && <4.19 + , base >=4.12 && <4.20 , servant >=0.18.2 && <0.21 , servant-server >=0.18.2 && <0.21 , text ^>=1.2.3 || >=2.0 && <2.1 || ^>=2.1 @@ -46,7 +46,7 @@ executable wai-handler-hal-example-hal hs-source-dirs: exe/hal main-is: Main.hs build-depends: - , hal >=0.4.7 && <0.4.11 || >=1.0.0 && <1.1 + , hal >=0.4.7 && <0.4.11 || >=1.0.0 && <1.2 , wai-handler-hal-example ghc-options: -threaded @@ -57,7 +57,7 @@ executable wai-handler-hal-example-warp main-is: Main.hs build-depends: , wai-handler-hal-example - , warp ^>=3.3.14 + , warp >=3.3.14 && <3.4 ghc-options: -threaded