mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
crystal: support aarch64-linux
Upstream does not publish aarch64-linux bootstrap binaries, so grab them from Alpine
This commit is contained in:
parent
ed32ed9633
commit
8e9625ac22
@ -33,6 +33,7 @@ let
|
|||||||
i686-linux = "linux-i686";
|
i686-linux = "linux-i686";
|
||||||
x86_64-darwin = "darwin-x86_64";
|
x86_64-darwin = "darwin-x86_64";
|
||||||
aarch64-darwin = "darwin-universal";
|
aarch64-darwin = "darwin-universal";
|
||||||
|
aarch64-linux = "linux-aarch64";
|
||||||
};
|
};
|
||||||
|
|
||||||
arch = archs.${stdenv.system} or (throw "system ${stdenv.system} not supported");
|
arch = archs.${stdenv.system} or (throw "system ${stdenv.system} not supported");
|
||||||
@ -40,13 +41,19 @@ let
|
|||||||
|
|
||||||
checkInputs = [ git gmp openssl readline libxml2 libyaml ];
|
checkInputs = [ git gmp openssl readline libxml2 libyaml ];
|
||||||
|
|
||||||
|
binaryUrl = version: rel:
|
||||||
|
if arch == archs.aarch64-linux then
|
||||||
|
"https://dev.alpinelinux.org/archive/crystal/crystal-${version}-aarch64-alpine-linux-musl.tar.gz"
|
||||||
|
else
|
||||||
|
"https://github.com/crystal-lang/crystal/releases/download/${version}/crystal-${version}-${toString rel}-${arch}.tar.gz";
|
||||||
|
|
||||||
genericBinary = { version, sha256s, rel ? 1 }:
|
genericBinary = { version, sha256s, rel ? 1 }:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "crystal-binary";
|
pname = "crystal-binary";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/crystal-lang/crystal/releases/download/${version}/crystal-${version}-${toString rel}-${arch}.tar.gz";
|
url = binaryUrl version rel;
|
||||||
sha256 = sha256s.${stdenv.system};
|
sha256 = sha256s.${stdenv.system};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -225,6 +232,7 @@ rec {
|
|||||||
x86_64-linux = "1949argajiyqyq09824yj3wjyv88gd8wbf20xh895saqfykiq880";
|
x86_64-linux = "1949argajiyqyq09824yj3wjyv88gd8wbf20xh895saqfykiq880";
|
||||||
i686-linux = "0w0f4fwr2ijhx59i7ppicbh05hfmq7vffmgl7lal6im945m29vch";
|
i686-linux = "0w0f4fwr2ijhx59i7ppicbh05hfmq7vffmgl7lal6im945m29vch";
|
||||||
x86_64-darwin = "01n0rf8zh551vv8wq3h0ifnsai0fz9a77yq87xx81y9dscl9h099";
|
x86_64-darwin = "01n0rf8zh551vv8wq3h0ifnsai0fz9a77yq87xx81y9dscl9h099";
|
||||||
|
aarch64-linux = "0sns7l4q3z82qi3dc2r4p63f4s8hvifqzgq56ykwyrvawynjhd53";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user