vic / gleam-nix

Build Gleam with Nix.
https://gleam.run
Apache License 2.0
20 stars 6 forks source link

Cargo.nix is out of sync with Cargo.lock #11

Open mccraveiro opened 2 months ago

mccraveiro commented 2 months ago

Hey!

I'm trying to run nix develop github:vic/gleam-nix --override-input gleam path:$PWD. However I'm getting the following error:

warning: not writing modified lock file of flake 'github:vic/gleam-nix':
• Updated input 'gleam':
    'github:gleam-lang/gleam/99de5d07c1f1aea0b36f543ec60c751be9ada240?narHash=sha256-gPlRihwK%2BJ7s1SeymfVdVo/KIV%2BeEqxlLVOgsDWW9yo%3D' (2024-03-04)
  → 'path:/Users/mccraveiro/Code/gleam?lastModified=1724116817&narHash=sha256-z07X85uNPtTJLJHqYHY1q4Sdb50Bn/UaBQNzaMsoRjY%3D' (2024-08-20)
error:
       … while calling a functor (an attribute set with a '__functor' attribute)
         at /nix/store/i70zz5ic0csz05wn2wqyx5gl4qgsskdi-source/flake.nix:38:20:
           37|
           38|         rustPkgs = pkgs.rustBuilder.makePackageSet {
             |                    ^
           39|           rustChannel = "1.74.0";

       … while calling a functor (an attribute set with a '__functor' attribute)
         at /nix/store/8pyclh319py0z6rb182msdzw61zbj588-source/overlay/make-package-set/user-facing.nix:108:4:
          107| # target.
          108| in rustBuilder.makePackageSetInternal (extraArgs // {
             |    ^
          109|   inherit packageFun ignoreLockHash workspaceSrc target;

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: Cargo.nix d8663bbf3562a47888686f05d0e1ecb6c38d5b2e6063eccdd02bb79e9ab8afb2 is out of sync with Cargo.lock 693ca39122b359af54645c70b491f4de2e0ee18e876b0c9414bda3c8b0ddbadf

When I googled the error I found this PR so I tried running the same command on this project to update it. However I got another error:

➜  gleam-nix git:(main) make generate
nix run '.#genCargoNix'
error: unable to execute '/nix/store/6pzmvnp83hrjvf8q5k1fbx3ysa9bd39s-genCargoNix.bash/bin/genCargoNix.bash': Exec format error
make: *** [generate] Error 1

The error is not clear so I'm not sure what to do. Can you take a look into it?

Thank you!

mccraveiro commented 2 months ago

I'm not fluent in Nix but it seems the scripts were missing #!/bin/bash. Just sent a PR.