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

Mint-lang: Init at 2018.05.27 #41148

Merged
merged 3 commits into from Jun 2, 2018
Merged

Conversation

manveru
Copy link
Contributor

@manveru manveru commented May 27, 2018

Motivation for this change

Found this the other day, page is at https://www.mint-lang.com/ and it's an example of how to package crystal applications.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

homepage = https://mint-lang.com/;
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ manveru ];
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
Copy link
Member

Choose a reason for hiding this comment

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

Why just these platforms? IIRC crystal supports others too, e.g. aarch64.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Crystal only has releases for these platforms: https://github.com/crystal-lang/crystal/releases/tag/0.24.2 and since you need Crystal to build Crystal, i don't think we'll have other platforms soon. Please correct me if I'm wrong, but those platforms are also set in the meta of the crystal package itself.

stdenv.mkDerivation rec {
version = "2018-05-27";
name = "mint-${version}";
src = fetchgit {
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be fetchFromGitHub, for bandwidth/CPU savings?

installPhase = ''true'';

meta = {
description = "A refreshing language for the front-end web.";
Copy link
Member

Choose a reason for hiding this comment

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

Package descriptions should not end in a period

@@ -0,0 +1,33 @@
require "yaml"
Copy link
Member

Choose a reason for hiding this comment

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

Should this tool really live in a mint-specific directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good question, and eventually I want to make it a standalone tool, but until I package more Crystal applications, I think it can live here for a bit.
I can remove it if you don't want to have it here, just thought it makes the work for future packages a bit easier.

@tilpner
Copy link
Member

tilpner commented May 30, 2018

Looks good now!

@manveru
Copy link
Contributor Author

manveru commented May 30, 2018

Thanks for the review!

@matthewbauer
Copy link
Member

@GrahamcOfBorg build mint

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: mint

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mint

Partial log (click to expand)

gcc "${@}" -o '/nix/store/gy4xhqcpa3rpxgkv3yp5863z3kk7gqbi-mint-2018-05-27/bin/mint'  -rdynamic  `command -v pkg-config > /dev/null && pkg-config --libs libssl || printf %s '-lssl -lcrypto'` `command -v pkg-config > /dev/null && pkg-config --libs libcrypto || printf %s '-lcrypto'` -L/build/source/tmp/lib/duktape/src/.build/lib -L/build/source/tmp/lib/duktape/src/.build/include -lduktape -lm -lz -lpcre -lm -lgc -lpthread /nix/store/037w3gydb9y2w3x9969fwy1dg1anyirm-crystal-0.24.2/lib/crystal/ext/libcrystal.a -levent -lrt -ldl -L/usr/lib -L/usr/local/lib _main.o
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/gy4xhqcpa3rpxgkv3yp5863z3kk7gqbi-mint-2018-05-27
shrinking /nix/store/gy4xhqcpa3rpxgkv3yp5863z3kk7gqbi-mint-2018-05-27/bin/mint
strip is /nix/store/92d2ifxcni4n3zx9s8wnkcjlvnx5ajlc-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/gy4xhqcpa3rpxgkv3yp5863z3kk7gqbi-mint-2018-05-27/bin
patching script interpreter paths in /nix/store/gy4xhqcpa3rpxgkv3yp5863z3kk7gqbi-mint-2018-05-27
checking for references to /build in /nix/store/gy4xhqcpa3rpxgkv3yp5863z3kk7gqbi-mint-2018-05-27...
/nix/store/gy4xhqcpa3rpxgkv3yp5863z3kk7gqbi-mint-2018-05-27

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: mint

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@matthewbauer matthewbauer merged commit 0241c2c into NixOS:master Jun 2, 2018
@manveru manveru deleted the add-mint-lang branch July 6, 2018 07:15
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

5 participants