Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: afe905246d89
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 77752c6c0865
Choose a head ref
  • 1 commit
  • 4 files changed
  • 1 contributor

Commits on Jan 14, 2020

  1. bs-platform: 6.2.1 -> 7.0.1

    turboMaCk authored and Jon committed Jan 14, 2020
    Copy the full SHA
    77752c6 View commit details
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
{ stdenv, fetchFromGitHub, ninja, nodejs, python3 }:
let
version = "6.2.1";
ocaml-version = "4.06.1";
src = fetchFromGitHub {
owner = "BuckleScript";
repo = "bucklescript";
rev = "${version}";
sha256 = "0zx9nq7cik0c60n3rndqfqy3vdbj5lcrx6zcqcz2d60jjxi1z32y";
fetchSubmodules = true;
};
ocaml = import ./ocaml.nix {
bs-version = version;
# This file is based on https://github.com/turboMaCk/bs-platform.nix/blob/master/build-bs-platform.nix
# to make potential future updates simpler

{ stdenv, fetchFromGitHub, ninja, runCommand, nodejs, python3,
ocaml-version, version, src,
ocaml ? (import ./ocaml.nix {
version = ocaml-version;
inherit stdenv;
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 {
inherit src version;
pname = "bs-platform";
BS_RELEASE_BUILD = "true";
buildInputs = [ nodejs python3 ];
buildInputs = [ nodejs python3 custom-ninja ];

patchPhase = ''
sed -i 's:./configure.py --bootstrap:python3 ./configure.py --bootstrap:' ./scripts/install.js
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
cp ${ninja}/bin/ninja vendor/ninja/snapshot/ninja.linux
cp ${custom-ninja}/bin/ninja vendor/ninja/snapshot/ninja.linux
'';

configurePhase = ''
@@ -42,12 +40,9 @@ stdenv.mkDerivation {

installPhase = ''
node scripts/install.js
mkdir -p $out/bin
cp -rf jscomp lib vendor odoc_gen native $out
cp bsconfig.json package.json $out
ln -s $out/lib/bsb $out/bin/bsb
ln -s $out/lib/bsc $out/bin/bsc
ln -s $out/lib/bsrefmt $out/bin/bsrefmt
27 changes: 20 additions & 7 deletions pkgs/development/compilers/bs-platform/default.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
{ stdenv, fetchFromGitHub, ninja, nodejs, python3, ... }:
{ stdenv, runCommand, fetchFromGitHub, ninja, nodejs, python3, ... }:
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; {
description = "A JavaScript backend for OCaml focused on smooth integration and clean generated code.";
homepage = https://bucklescript.github.io;
license = licenses.lgpl3;
maintainers = with maintainers; [ turbomack gamb anmonteiro ];
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; };
}
})
4 changes: 2 additions & 2 deletions pkgs/development/compilers/bs-platform/ocaml.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ stdenv, src, version, bs-version }:
{ stdenv, src, version }:
stdenv.mkDerivation rec {
inherit src version;
name = "ocaml-${version}+bs-${bs-version}";
name = "ocaml-${version}+bs";
configurePhase = ''
./configure -prefix $out
'';
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -1298,7 +1298,7 @@ in

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 {
inherit (darwin.apple_sdk.frameworks) Cocoa;