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

cyclone-scheme: init at 0.21 #99939

Merged
merged 1 commit into from Oct 9, 2020
Merged

Conversation

siraben
Copy link
Member

@siraben siraben commented Oct 7, 2020

Motivation for this change
Things done
  • 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@marsam
Copy link
Contributor

marsam commented Oct 8, 2020

Thank you for your contribution.
I'd write this expression as:

{ stdenv, fetchFromGitHub, libck, darwin }:

let
  version = "0.21";
  bootstrap = stdenv.mkDerivation {
    pname = "cyclone-bootstrap";
    inherit version;

    src = fetchFromGitHub {
      owner = "justinethier";
      repo = "cyclone-bootstrap";
      rev = "v${version}";
      sha256 = "0bb3a7x7vzmdyhm4nilm8bcn4q50pwqryggnxz21n16v6xakwjmr";
    };

    nativeBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ darwin.cctools ];

    buildInputs = [ libck ];

    makeFlags = [ "PREFIX=${placeholder "out"}" ];
  };
in
stdenv.mkDerivation {
  pname = "cyclone";
  inherit version;

  src = fetchFromGitHub {
    owner = "justinethier";
    repo = "cyclone";
    rev = "v${version}";
    sha256 = "1vb4yaprs2bwbxmxx2zkqvysxx8r9qww2q1nqkz8yps3ji715jw7";
  };

  nativeBuildInputs = [ bootstrap ]
    ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.cctools ];

  buildInputs = [ libck ];

  makeFlags = [ "PREFIX=${placeholder "out"}" ];

  meta = with stdenv.lib; {
    homepage = "https://justinethier.github.io/cyclone/";
    description = "A brand-new compiler that allows practical application development using R7RS Scheme";
    license = licenses.mit;
    maintainers = with maintainers; [ siraben ];
  };
}

upstream uses a vendorized libtommath and reading its makefile, it doesn't allow to override it

@marsam marsam merged commit fb261a5 into NixOS:master Oct 9, 2020
@siraben siraben deleted the cyclone-scheme-init branch October 9, 2020 13:19
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.

None yet

2 participants