Giter Site home page Giter Site logo

idris2-pkgs's People

Contributors

3noch avatar bobbbay avatar claymager avatar davlum avatar jeroendehaas avatar jumper149 avatar mattpolzin avatar siraben avatar valencik avatar wchresta avatar xavierzwirtz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

idris2-pkgs's Issues

Unable to use the `dom` dependency.

idris2-dom was added in #8. I added depends = dom in the .pkg file, but idris is unable to locate the JS module from that package:

idris2 -o main.js src/Main.idr --cg javascript
Error: Module JS not found

src.Main:3:1--3:10
 1 | module Main
 2 | 
 3 | import JS
     ^^^^^^^^^

Error: Undefined name unsafePerformIO. 

(Interactive):1:1--1:1
 1 | module Main

To reproduce, run nix develop -c make idrisid in this tree: srid/idris-web-playground@eb279f0

Cannot install idris2 and idris2-lsp at the same time

When I try to install lsp while idris2 is installed (I tried both github:idris-lang/Idris2 and github:claymager/idris2-pkgs#idris2) or vice-versa, I get the following error:

$ nix profile install github:claymager/idris2-pkgs#lsp
error: packages '/nix/store/k3sjar5qg6gyxmyawc1f06si32swwwan-lsp-0.4.0/idris2-0.5.1/prelude-0.5.1/Builtin.ttc' and '/nix/store/ha29cylxibyspmhlsdgvw6293vma2cb2-idris2-0.5.1/idris2-0.5.1/prelude-0.5.1/Builtin.ttc' have the same priority 5; use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' to change the priority of one of the conflicting packages (0 being the highest priority)

I tried running nix-env --set-flag but it says the profile is incompatible with nix-env and nix profile --set-flag doesn't exist.

idris2 in nix develop shell searches for packages in home directory but should not

$ nix develop                             
MacBook-Pro:IdrisNixTest michaelmesser$ idris2 --build mypkg.ipkg 
1/1: Building Main (src/Main.idr)
Error: Error in TTC
file: TTC data is in an newer format, file: /Users/michaelmesser/.idris2/idris2-0.5.1/prelude-0.5.1/Prelude.ttc, expected version: 71, actual version: 2022041300 (the most likely case is that the ./build directory in your current project contains files from a previous build of idris2 or the idris2 executable is from a different build than the installed .ttc files)

Depending on locally defined packages

Since buildIdris is now exposed to consumer flakes, it must be possible to add custom packages to a project (via an overlay (?)), that are then callable in a TOML file. To be completely honest, I'm not exactly certain the steps to do so, but here's exactly what I'd like to do:

# myproject/other-packages/some-package.toml
name = "some-package"
[ source ]
# etc...
# myproject/myproject.toml
[ depends ]
idrisLibs = [ "some-package" ]
# myproject/flake.nix
# ???

Am I overthinking this?

Add `idris2-dom`

Hi,

https://github.com/stefan-hoeck/idris2-dom is a link to the repository. I see there are already some Stefan Hoeck packages packaged here, so I imagine it won't be too challenging :)

I am nowhere near an expert in Idris (and hence in packaging Idris packages, for that matter), which is why I'm opening an issue instead of a PR.

From the documentation, I understand that this is a base template:

name = "idris2-dom"
version = "0.1.0"

[ source ]
owner = "stefan-hoeck"
repo = "idris2-dom"
rev = "v0.1.0"
# sha256 = ""

However... Should a target be set? I'm not sure if a target is set here or not, and more importantly, I have no clue where to start looking to find out :)

Having this package would mean a lot to me, thanks!

M1 Mac support

The x86 version of Idris2 in nixpkgs is working, so we could use that in theory instead of doing native support. It would be great if the 'nix flake new' generated project worked seamlessly with it. Currently:

❯ nix flake new -t github:claymager/idris2-pkgs mypkg
...
❯ nix develop
warning: creating lock file '/private/tmp/mypkg/flake.lock'
error: flake 'path:/private/tmp/mypkg' does not provide attribute 'devShells.aarch64-darwin.devShell.aarch64-darwin', 'packages.aarch64-darwin.devShell.aarch64-darwin', 'legacyPackages.aarch64-darwin.devShell.aarch64-darwin', 'devShell.aarch64-darwin' or 'defaultPackage.aarch64-darwin'

and

❯ nix --system x86_64-darwin develop
error: a 'x86_64-darwin' with features {} is required to build '/nix/store/k174flg06xlgpmf8x0s2d7rfi2dd2ykn-idris2-0.5.1.drv', but I am a 'aarch64-darwin' with features {benchmark, big-parallel, nixos-test, recursive-nix}
(use '--show-trace' to show detailed location information)

'Prelude not found' when building different backends.

Following the Idris2 backend tutorial, running

$ ./build/exec/lazy-idris2

fails with error:

Uncaught error: Error: Module Prelude not found

This is because the executable new executable expects to find them in the standard prefix ~/.idris2. (Or should, if idris2api is patched correctly.)

As a dirty hack, you can cp $(which idris2) into your build directory, and fix change the second code line to point to lazy-idris2 instead of the nix store .idris2-wrapped_.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.