Implement crystal.buildCrystalPackage

This commit is contained in:
Silvan Mosberger
2019-08-26 18:22:55 +02:00
parent 8c60f67f2d
commit a3aec20f26
2 changed files with 61 additions and 3 deletions
@@ -1,6 +1,7 @@
{ stdenv, lib, fetchFromGitHub, fetchurl, makeWrapper
, coreutils, git, gmp, nettools, openssl, readline, tzdata, libxml2, libyaml
, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm, clang, which, zlib }:
, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm, clang, which, zlib
, callPackage }:
# We need multiple binaries as a given binary isn't always able to build
# (even slightly) older or newer versions.
@@ -37,7 +38,7 @@ let
};
generic = { version, sha256, binary, doCheck ? true }:
stdenv.mkDerivation rec {
let compiler = stdenv.mkDerivation rec {
pname = "crystal";
inherit doCheck version;
@@ -134,6 +135,10 @@ let
export PATH=${lib.makeBinPath checkInputs}:$PATH
'';
passthru.buildCrystalPackage = callPackage ./build-package.nix {
crystal = compiler;
};
meta = with lib; {
description = "A compiled language with Ruby like syntax and type inference";
homepage = https://crystal-lang.org/;
@@ -141,7 +146,7 @@ let
maintainers = with maintainers; [ manveru david50407 peterhoeg ];
platforms = builtins.attrNames archs;
};
};
}; in compiler;
in rec {
binaryCrystal_0_26 = genericBinary {