diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd48e7e5..393b5f1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,7 +132,9 @@ jobs: - name: Build all packages run: nix build --accept-flake-config - name: Run tests - run: nix develop --accept-flake-config -c cabal test all + run: | + nix develop --accept-flake-config -c cabal update + nix develop --accept-flake-config -c cabal test all # nix flake check breaks on IFD in multi-platform flake https://github.com/NixOS/nix/issues/4265 # - run: nix flake check diff --git a/automaton/automaton.cabal b/automaton/automaton.cabal index a35eb46c..d0311a1a 100644 --- a/automaton/automaton.cabal +++ b/automaton/automaton.cabal @@ -29,7 +29,7 @@ source-repository this common opts build-depends: MonadRandom >=0.5, - base >=4.14 && <4.20, + base >=4.16 && <4.21, mmorph ^>=1.2, mtl >=2.2 && <2.4, profunctors ^>=5.6, diff --git a/flake.lock b/flake.lock index d9c43a33..2ab0d3e3 100644 --- a/flake.lock +++ b/flake.lock @@ -1,12 +1,46 @@ { "nodes": { + "monad-schedule": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1730099708, + "narHash": "sha256-Usw6nWADyK3LL9dQ98H3GAxwI+FgtbzA4Us3MngyF64=", + "owner": "turion", + "repo": "monad-schedule", + "rev": "a891aa90747bc01fa6f34794d748aa316d905ce2", + "type": "github" + }, + "original": { + "owner": "turion", + "repo": "monad-schedule", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1720801720, - "narHash": "sha256-PjXn2DUkwcN+58/C5XCOqsitGwN2u/WkYdC/ugP+3jQ=", + "lastModified": 1721258662, + "narHash": "sha256-EgRErDL4Xj0Mkz2ZqDJ1fIcebLJpvMKtF/lb+WJ8y+I=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2d419e7e0024cb7448aace8faf64b2c6ff26a70d", + "rev": "ede8a2b8473fae013cfc0cca9400a8fcbd7cc021", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1730858696, + "narHash": "sha256-us4xhqqW6OkjCihXYuFArhwx91cTzns8FEY8lE4v7JQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8541b4db5adb9dd835ed5d0023dec229987b7391", "type": "github" }, "original": { @@ -18,7 +52,8 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "monad-schedule": "monad-schedule", + "nixpkgs": "nixpkgs_2" } } }, diff --git a/flake.nix b/flake.nix index 60bc7db8..560dc6e2 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,7 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small"; + monad-schedule.url = "github:turion/monad-schedule"; }; outputs = inputs: @@ -28,7 +29,7 @@ # To be kept in sync with the `tested-with:` section in rhine.cabal. # To do: Automated check whether this is the same as what get-tested returns. # Currently blocked on https://github.com/Kleidukos/get-tested/issues/39 - supportedGhcs = [ "ghc92" "ghc94" "ghc96" "ghc98" ]; + supportedGhcs = [ "ghc92" "ghc94" "ghc96" "ghc98" "ghc910" ]; # All Haskell packages defined here that contain a library section libPnames = filter (pname: pname != "rhine-examples") pnames; @@ -43,7 +44,7 @@ lib.genAttrs pnames (pname: hfinal.callCabal2nix pname ./${pname} { }); # A nixpkgs overlay containing everything defined in this repo, for reuse in downstream projects - overlay = final: prev: + localOverlay = final: prev: let hps = hpsFor final; @@ -52,13 +53,6 @@ temporaryHaskellOverrides = with prev.haskell.lib.compose; [ (hfinal: hprev: { monad-bayes = markUnbroken hprev.monad-bayes; - monad-schedule = hprev.callHackageDirect - { - pkg = "monad-schedule"; - ver = "0.2"; - sha256 = "sha256-Z9lAxkvJDH9aQZd65bGOQI3EGH7oSAhK0nuBKULgiCE="; - } - { }; time-domain = hprev.callHackageDirect { pkg = "time-domain"; @@ -73,6 +67,22 @@ (hfinal: hprev: lib.optionalAttrs (lib.versionOlder hprev.ghc.version "9.4") { time-domain = doJailbreak hprev.time-domain; }) + (hfinal: hprev: lib.optionalAttrs (lib.versionAtLeast hprev.ghc.version "9.10") { + # Remove these as nixpkgs progresses! + finite-typelits = doJailbreak hprev.finite-typelits; + + vector-sized = hprev.callHackageDirect + { + pkg = "vector-sized"; + ver = "1.6.1"; + sha256 = "sha256-//EOAwpEEQkdYF88U/bp0uybKleYHRmTWaKsxIZvCeQ="; + } + { }; + + microstache = doJailbreak hprev.microstache; + gloss-rendering = doJailbreak hprev.gloss-rendering; + gloss = doJailbreak hprev.gloss; + }) ]; in @@ -131,6 +141,12 @@ }; }; + overlay = lib.composeManyExtensions + [ + inputs.monad-schedule.overlays.default + localOverlay + ]; + # Helper to build a flake output for all systems that are defined in nixpkgs forAllPlatforms = f: mapAttrs (system: pkgs: f system (pkgs.extend overlay)) inputs.nixpkgs.legacyPackages; diff --git a/rhine-bayes/rhine-bayes.cabal b/rhine-bayes/rhine-bayes.cabal index 47f37c46..f5824ec3 100644 --- a/rhine-bayes/rhine-bayes.cabal +++ b/rhine-bayes/rhine-bayes.cabal @@ -33,7 +33,7 @@ library other-modules: Data.Automaton.Bayes build-depends: automaton, - base >=4.14 && <4.20, + base >=4.16 && <4.21, log-domain >=0.12, mmorph ^>=1.2, monad-bayes ^>=1.3, @@ -66,7 +66,7 @@ executable rhine-bayes-gloss hs-source-dirs: app build-depends: automaton, - base >=4.14 && <4.20, + base >=4.16 && <4.21, log-domain, mmorph, monad-bayes, diff --git a/rhine-examples/rhine-examples.cabal b/rhine-examples/rhine-examples.cabal index cfdccfa3..d1d12557 100644 --- a/rhine-examples/rhine-examples.cabal +++ b/rhine-examples/rhine-examples.cabal @@ -25,7 +25,7 @@ executable HelloWorld -with-rtsopts=-N build-depends: - base >=4.14 && <4.20, + base >=4.16 && <4.21, rhine ^>=1.4 default-language: Haskell2010 @@ -44,7 +44,7 @@ executable Demonstration -with-rtsopts=-N build-depends: - base >=4.14 && <4.20, + base >=4.16 && <4.21, rhine ^>=1.4 default-language: Haskell2010 @@ -63,7 +63,7 @@ executable ADSR -with-rtsopts=-N build-depends: - base >=4.14 && <4.20, + base >=4.16 && <4.21, rhine ^>=1.4 default-language: Haskell2010 @@ -82,7 +82,7 @@ executable Ball -with-rtsopts=-N build-depends: - base >=4.14 && <4.20, + base >=4.16 && <4.21, random >=1.1, rhine ^>=1.4 @@ -107,7 +107,7 @@ executable Periodic -with-rtsopts=-N build-depends: - base >=4.14 && <4.20, + base >=4.16 && <4.21, monad-schedule >=0.1, rhine ^>=1.4, transformers >=0.5 @@ -128,7 +128,7 @@ executable EventClock -with-rtsopts=-N build-depends: - base >=4.14 && <4.20, + base >=4.16 && <4.21, random >=1.1, rhine ^>=1.4 @@ -148,7 +148,7 @@ executable Sawtooth -with-rtsopts=-N build-depends: - base >=4.14 && <4.20, + base >=4.16 && <4.21, rhine ^>=1.4 default-language: Haskell2010 @@ -167,7 +167,7 @@ executable RandomWalk -with-rtsopts=-N build-depends: - base >=4.14 && <4.20, + base >=4.16 && <4.21, random >=1.1, rhine ^>=1.4, simple-affine-space diff --git a/rhine-gloss/rhine-gloss.cabal b/rhine-gloss/rhine-gloss.cabal index 2348fe6d..af569aa4 100644 --- a/rhine-gloss/rhine-gloss.cabal +++ b/rhine-gloss/rhine-gloss.cabal @@ -38,7 +38,7 @@ library build-depends: automaton, - base >=4.14 && <4.20, + base >=4.16 && <4.21, gloss >=1.12, mmorph >=1.1, monad-schedule >=0.1, @@ -57,7 +57,7 @@ executable rhine-gloss-gears main-is: Main.hs ghc-options: -threaded build-depends: - base >=4.14 && <4.20, + base >=4.16 && <4.21, rhine-gloss default-language: Haskell2010 diff --git a/rhine-terminal/rhine-terminal.cabal b/rhine-terminal/rhine-terminal.cabal index 1e96cec5..155cebeb 100644 --- a/rhine-terminal/rhine-terminal.cabal +++ b/rhine-terminal/rhine-terminal.cabal @@ -27,7 +27,7 @@ source-repository this library exposed-modules: FRP.Rhine.Terminal build-depends: - base >=4.11 && <4.20, + base >=4.16 && <4.21, exceptions >=0.10.4, monad-schedule >=0.1.2, rhine ^>=1.4, @@ -47,7 +47,7 @@ executable rhine-terminal-simple main-is: TerminalSimple.hs ghc-options: -threaded build-depends: - base >=4.14 && <4.20, + base >=4.16 && <4.21, rhine ^>=1.4, rhine-terminal, terminal >=0.2.0.0, @@ -71,7 +71,7 @@ test-suite rhine-terminal-tests main-is: tests/Main.hs ghc-options: -threaded build-depends: - base >=4.14 && <4.20, + base >=4.16 && <4.21, exceptions >=0.10.4, hspec, rhine ^>=1.4, diff --git a/rhine/rhine.cabal b/rhine/rhine.cabal index 12624811..f8f3017d 100644 --- a/rhine/rhine.cabal +++ b/rhine/rhine.cabal @@ -35,6 +35,7 @@ tested-with: ghc ==9.4.7 ghc ==9.6.4 ghc ==9.8.2 + ghc ==9.10.1 source-repository head type: git @@ -48,7 +49,7 @@ source-repository this common opts build-depends: automaton ^>=1.4, - base >=4.14 && <4.20, + base >=4.16 && <4.21, monad-schedule ^>=0.2, mtl >=2.2 && <2.4, selective ^>=0.7,