From 85bf7d520fd27675a6110ab967bd7a16ea63e2fd Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Tue, 17 Jan 2023 21:51:52 -0500 Subject: [PATCH] Switch to using Dunai instead of Yampa --- README.md | 2 +- flake.lock | 25 +++++++++++++++---------- flake.nix | 16 +++++++--------- snake.cabal | 5 +++-- 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index fca3487..1729d17 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# Snake (with Yampa) +# Snake (with Dunai) A second project based on Functional Reactive Programming after [conways-game-of-life](https://github.com/kiana-S/conways-game-of-life). diff --git a/flake.lock b/flake.lock index 76f1930..9333a82 100644 --- a/flake.lock +++ b/flake.lock @@ -2,27 +2,32 @@ "nodes": { "flake-utils": { "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "owner": "numtide", "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "type": "github" }, "original": { - "id": "flake-utils", - "type": "indirect" + "owner": "numtide", + "repo": "flake-utils", + "type": "github" } }, "nixpkgs": { "locked": { - "narHash": "sha256-4va4MvJ076XyPp5h8sm5eMQvCrJ6yZAbBmyw95dGyw4=", - "path": "/nix/store/d9wpzgyjlpw1424kw2lyilah6690fnk3-source", - "type": "path" + "lastModified": 1674004508, + "narHash": "sha256-sB5hYccS1Uoemc8pRA8z17HZ9hrGHrWqn8g0nQm7/lg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c8b20e1c4168642f9fc92fb8d7fa465eb7a18c5c", + "type": "github" }, "original": { - "id": "nixpkgs", - "type": "indirect" + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" } }, "root": { diff --git a/flake.nix b/flake.nix index 26604a3..69effab 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,10 @@ { - description = "A snake game in Haskell using Yampa"; + description = "A snake game in Haskell using Dunai"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs"; + flake-utils.url = "github:numtide/flake-utils"; + }; outputs = { self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system: @@ -12,7 +17,7 @@ execName = packageName; # version of ghc used - hp = pkgs.haskellPackages; + hp = pkgs.haskell.packages.ghc92; project = returnShellEnv: hp.developPackage { @@ -20,13 +25,6 @@ name = packageName; root = ./.; withHoogle = false; - overrides = self: super: with pkgs.haskell.lib; { - # Use callCabal2nix to override Haskell dependencies here - # cf. https://tek.brick.do/K3VXJd8mEKO7 - # Example: - # > NanoID = self.callCabal2nix "NanoID" inputs.NanoID { }; - # Assumes that you have the 'NanoID' flake input defined. - }; modifier = drv: pkgs.haskell.lib.addBuildTools drv (with hp; [ # Specify your build/dev dependencies here. diff --git a/snake.cabal b/snake.cabal index 6029e57..9405cc2 100644 --- a/snake.cabal +++ b/snake.cabal @@ -1,12 +1,13 @@ cabal-version: 2.4 name: snake version: 0.0 -synopsis: A snake game using Yampa +synopsis: A snake game using Dunai author: Kiana Sheibani license: MIT build-type: Simple executable snake main-is: Main.hs + default-language: GHC2021 other-modules: - build-depends: + build-depends: dunai