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

chez-racket: init at 2021-12-11 #131833

Merged
merged 2 commits into from
Dec 24, 2021
Merged

chez-racket: init at 2021-12-11 #131833

merged 2 commits into from
Dec 24, 2021

Conversation

L-as
Copy link
Member

@L-as L-as commented Jul 28, 2021

Motivation for this change

This is basically Chez Scheme but better, notably it supports aarch64-linux (and likely aarch64-darwin too!).
This can be used to make Idris 2 work on more platforms with its Chez Scheme backend, albeit it is not done in this PR.

Things done

I've added chez-racket as a separate directory with its own files, since it's a permanent fork.
The only common part is the setup hook.

It would be great if someone on aarch64-darwin could test this.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Relase notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@r-rmcgibbo
Copy link

r-rmcgibbo commented Jul 28, 2021

Result of nixpkgs-review pr 131833 at 1ad518f5 run on x86_64-linux 1

1 package built successfully:
  • chez-racket
4 suggestions:
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/bin/ln' doesn't match anything in file './workarea'
    Near pkgs/development/compilers/chez-racket/default.nix:52:0:

       |
    52 |     description  = "Fork of Chez Scheme for Racket";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/bin/cp' doesn't match anything in file './workarea'
    Near pkgs/development/compilers/chez-racket/default.nix:52:0:

       |
    52 |     description  = "Fork of Chez Scheme for Racket";
       | ^
    
  • warning: patch-phase

    patchPhase should not be overridden, use postPatch instead.

    Near pkgs/development/compilers/chez-racket/default.nix:25:3:

       |
    25 |   patchPhase = ''
       |   ^
    
  • warning: missing-phase-hooks

    configurePhase should probably contain runHook preConfigure and runHook postConfigure.

    Near pkgs/development/compilers/chez-racket/default.nix:43:3:

       |
    43 |   configurePhase = ''
       |   ^
    

Result of nixpkgs-review pr 131833 at 9b3c4bee run on aarch64-linux 1

1 package built successfully:
  • chez-racket

@L-as L-as force-pushed the chez-racket branch 2 times, most recently from 62cb748 to 9bd49e9 Compare August 11, 2021 16:12
@L-as
Copy link
Member Author

L-as commented Aug 18, 2021

Bump

@L-as L-as force-pushed the chez-racket branch 3 times, most recently from 9bd49e9 to c8819b0 Compare December 22, 2021 16:31
@L-as
Copy link
Member Author

L-as commented Dec 22, 2021

I've fixed all the problems and in the process also added support for cross-compilation!

@L-as L-as changed the title chez-racket: init at 2021-07-09 chez-racket: init at 2021-12-11 Dec 22, 2021
@L-as L-as force-pushed the chez-racket branch 2 times, most recently from 1f68904 to 089beca Compare December 22, 2021 17:29
@Steven0351
Copy link
Member

Result of nixpkgs-review pr 131833 run on x86_64-darwin 1

1 package built:
  • chez-racket

@Steven0351
Copy link
Member

Package builds for aarch64-darwin but does not run:

[nix-shell:~/.cache/nixpkgs-review/pr-131833]$ ./results/chez-racket/bin/scheme
Killed: 9

@L-as
Copy link
Member Author

L-as commented Dec 23, 2021

While I'm not able to test this myself, it seems to me that the chance that this is a bug upstream is somewhat high.
racket/ChezScheme#43 (comment)

I made an issue upstream: racket/ChezScheme#43

@siraben
Copy link
Member

siraben commented Dec 23, 2021

Result of nixpkgs-review pr 131833 run on x86_64-darwin 1

1 package built:
  • chez-racket

@Steven0351
Copy link
Member

Result of nixpkgs-review pr 131833 run on x86_64-darwin 1

1 package built:
  • chez-racket

@Steven0351
Copy link
Member

Result of nixpkgs-review pr 131833 run on aarch64-darwin 1

1 package built:
  • chez-racket

@Steven0351
Copy link
Member

Everything builds and runs on x86_64-darwin and aarch64-darwin

Copy link
Member

@siraben siraben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

[nix-shell:~/.../nixpkgs-review/pr-131833-1]$ scheme
Chez Scheme Version 9.5.7.2
Copyright 1984-2021 Cisco Systems, Inc.

> (define (fact n) (if (= n 0) 1 (* n (fact (- n 1)))))
> (fact 6)
720

@siraben
Copy link
Member

siraben commented Dec 24, 2021

It appears all four platforms work, so I'm going to merge this.

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

Successfully merging this pull request may close these issues.

6 participants