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

Package request: bend #312527

Closed
haras-unicorn opened this issue May 17, 2024 · 4 comments · Fixed by #312972
Closed

Package request: bend #312527

haras-unicorn opened this issue May 17, 2024 · 4 comments · Fixed by #312972

Comments

@haras-unicorn
Copy link

Project description

Bend is a massively parallel, high-level programming language.

Metadata


was able to get it compiling with this:

pkgs.rustPlatform.buildRustPackage rec {
  pname = "bend";
  version = "0.2.7";

  src = pkgs.fetchFromGitHub {
    owner = "higherorderco";
    repo = pname;
    rev = version;
    hash = "sha256-yQI+p3PT1Czruc8+OZ/lZLAkBjkchkRw/OoGCYxHTDY=";
  };

  # NOTE: broken tests - something with hvm calls
  doCheck = false;

  cargoHash = "sha256-YPPBtgxqfoKnGb77m/CUYQ7+vVgL5MHhJ8I3TQ1rqK8=";

  buildInputs = [ pkgs.hvm ];

  RUSTC_BOOTSTRAP = true;

  meta = {
    description = "A massively parallel, high-level programming language";
    homepage = "https://github.com/HigherOrderCO/bend";
    license = pkgs.lib.licenses.asl20;
  };
};

but when i run it like bend run tmp.bend (tmp.bend exists) i get this:

Errors:
While running hvm: No such file or directory (os error 2)

thought the hvm build input would fix that but no

hopefully im just being stupid somehow

Add a 👍 reaction to issues you find important.

@Misterio77
Copy link
Member

Misterio77 commented May 18, 2024

You're alllmost there. For runtime deps, you should use wrapProgram. Replace the buildInputs line with:

  nativeBuildInputs = [ pkgs.makeWrapper ];
  postInstall = ''
    wrapProgram $out/bin/bend \
      --prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.hvm ]}
  '';

@haras-unicorn
Copy link
Author

ty :) ok this compiles but i have a different error now:

Errors:
Error reading result from hvm. Output :
Expected `Term`:
  2 | HVM_MAIN_CALL = .out.hvm
exit status: 1

using the all_tree.bend example running bend run all_tree.bend.

i was thinking i might have to wait till it gets a bit more stable but ive seen fireship do it so i tried making a nix package as soon as possible :).

@jeremyschlatter
Copy link
Contributor

jeremyschlatter commented May 20, 2024

That error is caused by hvm being out of date. The version of hvm in nixpkgs is 1.0.9, but bend needs version 2.

@jeremyschlatter
Copy link
Contributor

I've created a PR to bump hvm to version 2: #313053

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

Successfully merging a pull request may close this issue.

3 participants