Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when trying to build #1

Open
galtys opened this issue Mar 22, 2021 · 3 comments
Open

Errors when trying to build #1

galtys opened this issue Mar 22, 2021 · 3 comments

Comments

@galtys
Copy link

galtys commented Mar 22, 2021

Hello Jan, I'm trying to build your game on nixos2009 and I get the following errors:

[nix-shell:~/github.com/game-idris]$ idris --build game.ipkg 
Entering directory `./src'
Type checking ./Descriptions/ObjectDescription/RenderDescription.idr
./Descriptions/ObjectDescription/RenderDescription.idr:17:21-21:44:
   |
17 |   objectCast dict = with Checked do
   |                     ~~~~~~~~~~~~~~~ ...
When checking right hand side of GameIO.Descriptions.ObjectDescription.RenderDescription.EquipmentRender implementation of GameIO.ObjectCaster, method objectCast with expected type
        Checked EquipmentRender

Can't disambiguate since no name has a suitable type: 
        Control.ST.Loop.>>=, Control.ST.>>=

./Descriptions/ObjectDescription/RenderDescription.idr:23:1-25:
   |
23 | Serialize EquipmentRender where
   | ~~~~~~~~~~~~~~~~~~~~~~~~~
When checking type of Serializer.Descriptions.ObjectDescription.RenderDescription.EquipmentRender implementation of Serializer.Serialize, method toDict:
No such variable Prelude.List.List

./Descriptions/ObjectDescription/RenderDescription.idr:31:1-37:35:
   |
31 | public export
   | ~~~~~~~~~~~~~ ...
When checking type of Descriptions.ObjectDescription.RenderDescription.MkAnimationParameters:
No such variable Maybe

Would you know how to address them?

@galtys
Copy link
Author

galtys commented Mar 22, 2021

[nix-shell:~/github.com/game-idris]$ idris --version
1.3.3-git:PRE

@galtys
Copy link
Author

galtys commented Mar 22, 2021

Using shell.nix as follows:

{ pkgs ? import <nixpkgs> {} }:
with pkgs;

let

  idris_sdl2 = pkgs.idrisPackages.build-idris-package rec {
    name = "idris_sdl2";
    version = "v4";

    ipkgName = "sdl2";
    idrisDeps = [pkgs.idrisPackages.contrib pkgs.idrisPackages.containers];
    src = fetchFromGitHub {
      owner = "corazza";
      repo = "idris-sdl2";
      rev = "f4ce327bda93cfb0832399c9b75e3f5a71cf31c4";

      sha256 = "1s3y19z0d5w0wrwxcmbjkc2py70vih6yz7cah15kbmsh0cmh4kj7";
    };
    extraBuildInputs = [pkgs.SDL2 pkgs.SDL2_gfx pkgs.SDL2_mixer pkgs.SDL2_image pkgs.SDL2_ttf pkgs.pkgconfig];
    meta = {
      description = "sdl2";
      homepage = "https://github.com/corazza/idris-sdl2";
      license = lib.licenses.bsd2;
      maintainers = [];
    };
  };

  idris_box2d = pkgs.idrisPackages.build-idris-package rec {
    name = "idris_boz2d";
    version = "v4";

    ipkgName = "box2d";
    idrisDeps = [pkgs.idrisPackages.contrib pkgs.idrisPackages.containers pkgs.box2d];
    src = fetchFromGitHub {
      owner = "corazza";
      repo = "idris-box2d";
      rev = "5eb58b2de09d72e9f8993852832f6906cdf3e054";

      sha256 = "1blkpxl0ds1v4ql7h7bbnlqka5fqs0ay2zb40vwjvzxf5abpk0cr";
    };
  #extraBuildInputs = [pkgs.idrisPackages.contrib];
    meta = {
      description = "box2d";
      homepage = "https://github.com/corazza/idris-box2d";
      license = lib.licenses.bsd2;
      maintainers = [];
    };
  };
  
in 

stdenv.mkDerivation {
  name = "idris-env";
  buildInputs = [
    (idrisPackages.with-packages (with idrisPackages; [ contrib base prelude containers effects idris_sdl2 idris_box2d]))
    gmp
    pkgs.pkgconfig
    pkgs.SDL2
    pkgs.SDL2_gfx
    pkgs.SDL2_mixer
    pkgs.SDL2_ttf
    pkgs.SDL2_image
  ];
}

@lsap
Copy link

lsap commented Dec 11, 2023

stefan-hoeck/idris2-pack might be the replacement of nix one day after the game-idris mirations to Idris 2 (if any).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants