mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
bs-platform: 6.2.1 -> 7.0.1
This commit is contained in:
parent
afe905246d
commit
77752c6c08
4 changed files with 41 additions and 33 deletions
|
@ -1,35 +1,33 @@
|
||||||
{ stdenv, fetchFromGitHub, ninja, nodejs, python3 }:
|
# This file is based on https://github.com/turboMaCk/bs-platform.nix/blob/master/build-bs-platform.nix
|
||||||
let
|
# to make potential future updates simpler
|
||||||
version = "6.2.1";
|
|
||||||
ocaml-version = "4.06.1";
|
{ stdenv, fetchFromGitHub, ninja, runCommand, nodejs, python3,
|
||||||
src = fetchFromGitHub {
|
ocaml-version, version, src,
|
||||||
owner = "BuckleScript";
|
ocaml ? (import ./ocaml.nix {
|
||||||
repo = "bucklescript";
|
|
||||||
rev = "${version}";
|
|
||||||
sha256 = "0zx9nq7cik0c60n3rndqfqy3vdbj5lcrx6zcqcz2d60jjxi1z32y";
|
|
||||||
fetchSubmodules = true;
|
|
||||||
};
|
|
||||||
ocaml = import ./ocaml.nix {
|
|
||||||
bs-version = version;
|
|
||||||
version = ocaml-version;
|
version = ocaml-version;
|
||||||
inherit stdenv;
|
inherit stdenv;
|
||||||
src = "${src}/ocaml";
|
src = "${src}/ocaml";
|
||||||
};
|
}),
|
||||||
in
|
custom-ninja ? (ninja.overrideAttrs (attrs: {
|
||||||
|
src = runCommand "ninja-patched-source" {} ''
|
||||||
|
mkdir -p $out
|
||||||
|
tar zxvf ${src}/vendor/ninja.tar.gz -C $out
|
||||||
|
'';
|
||||||
|
patches = [];
|
||||||
|
}))
|
||||||
|
}:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
inherit src version;
|
inherit src version;
|
||||||
pname = "bs-platform";
|
pname = "bs-platform";
|
||||||
BS_RELEASE_BUILD = "true";
|
BS_RELEASE_BUILD = "true";
|
||||||
buildInputs = [ nodejs python3 ];
|
buildInputs = [ nodejs python3 custom-ninja ];
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
sed -i 's:./configure.py --bootstrap:python3 ./configure.py --bootstrap:' ./scripts/install.js
|
sed -i 's:./configure.py --bootstrap:python3 ./configure.py --bootstrap:' ./scripts/install.js
|
||||||
|
|
||||||
mkdir -p ./native/${ocaml-version}/bin
|
mkdir -p ./native/${ocaml-version}/bin
|
||||||
ln -sf ${ocaml}/bin/* ./native/${ocaml-version}/bin
|
ln -sf ${ocaml}/bin/* ./native/${ocaml-version}/bin
|
||||||
|
|
||||||
rm -f vendor/ninja/snapshot/ninja.linux
|
rm -f vendor/ninja/snapshot/ninja.linux
|
||||||
cp ${ninja}/bin/ninja vendor/ninja/snapshot/ninja.linux
|
cp ${custom-ninja}/bin/ninja vendor/ninja/snapshot/ninja.linux
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
|
@ -42,12 +40,9 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
node scripts/install.js
|
node scripts/install.js
|
||||||
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
|
||||||
cp -rf jscomp lib vendor odoc_gen native $out
|
cp -rf jscomp lib vendor odoc_gen native $out
|
||||||
cp bsconfig.json package.json $out
|
cp bsconfig.json package.json $out
|
||||||
|
|
||||||
ln -s $out/lib/bsb $out/bin/bsb
|
ln -s $out/lib/bsb $out/bin/bsb
|
||||||
ln -s $out/lib/bsc $out/bin/bsc
|
ln -s $out/lib/bsc $out/bin/bsc
|
||||||
ln -s $out/lib/bsrefmt $out/bin/bsrefmt
|
ln -s $out/lib/bsrefmt $out/bin/bsrefmt
|
|
@ -1,15 +1,28 @@
|
||||||
{ stdenv, fetchFromGitHub, ninja, nodejs, python3, ... }:
|
{ stdenv, runCommand, fetchFromGitHub, ninja, nodejs, python3, ... }:
|
||||||
let
|
let
|
||||||
|
build-bs-platform = import ./build-bs-platform.nix;
|
||||||
|
in
|
||||||
|
(build-bs-platform {
|
||||||
|
inherit stdenv runCommand fetchFromGitHub ninja nodejs python3;
|
||||||
|
version = "7.0.1";
|
||||||
|
ocaml-version = "4.06.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "BuckleScript";
|
||||||
|
repo = "bucklescript";
|
||||||
|
rev = "52770839e293ade2bcf187f2639000ca0a9a1d46";
|
||||||
|
sha256 = "0s7g2zfhshsilv9zyp0246bypg34d294z27alpwz03ws9608yr7k";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
};
|
||||||
|
}).overrideAttrs (attrs: {
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A JavaScript backend for OCaml focused on smooth integration and clean generated code.";
|
description = "A JavaScript backend for OCaml focused on smooth integration and clean generated code.";
|
||||||
homepage = https://bucklescript.github.io;
|
homepage = https://bucklescript.github.io;
|
||||||
license = licenses.lgpl3;
|
license = licenses.lgpl3;
|
||||||
maintainers = with maintainers; [ turbomack gamb anmonteiro ];
|
maintainers = with maintainers; [ turbomack gamb anmonteiro ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
|
# Currently there is an issue with aarch build in hydra
|
||||||
|
# https://github.com/BuckleScript/bucklescript/issues/4091
|
||||||
|
badPlatforms = platforms.aarch64;
|
||||||
};
|
};
|
||||||
in
|
})
|
||||||
{
|
|
||||||
bs-platform-621 = import ./bs-platform-62.nix {
|
|
||||||
inherit stdenv fetchFromGitHub ninja nodejs python3;
|
|
||||||
} // { inherit meta; };
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ stdenv, src, version, bs-version }:
|
{ stdenv, src, version }:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
inherit src version;
|
inherit src version;
|
||||||
name = "ocaml-${version}+bs-${bs-version}";
|
name = "ocaml-${version}+bs";
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
./configure -prefix $out
|
./configure -prefix $out
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1298,7 +1298,7 @@ in
|
||||||
|
|
||||||
burpsuite = callPackage ../tools/networking/burpsuite {};
|
burpsuite = callPackage ../tools/networking/burpsuite {};
|
||||||
|
|
||||||
bs-platform = (callPackage ../development/compilers/bs-platform {}).bs-platform-621;
|
bs-platform = callPackage ../development/compilers/bs-platform {};
|
||||||
|
|
||||||
c3d = callPackage ../applications/graphics/c3d {
|
c3d = callPackage ../applications/graphics/c3d {
|
||||||
inherit (darwin.apple_sdk.frameworks) Cocoa;
|
inherit (darwin.apple_sdk.frameworks) Cocoa;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue