diff --git a/flake.lock b/flake.lock index e5d0c595b..223ca8348 100644 --- a/flake.lock +++ b/flake.lock @@ -1032,6 +1032,22 @@ "type": "github" } }, + "nixpkgs-babel": { + "locked": { + "lastModified": 1685792587, + "narHash": "sha256-SJZySQ1eblQWeNxCU0R7Ly1ZTQOW9A942eNNo/hQq2I=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "39addc620d1585c4d95246f4e47c83467ae3e62a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "39addc620d1585c4d95246f4e47c83467ae3e62a", + "type": "github" + } + }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -1342,6 +1358,7 @@ "haskell-nix", "nixpkgs-unstable" ], + "nixpkgs-babel": "nixpkgs-babel", "npmlock2nix": "npmlock2nix", "pre-commit-hooks": "pre-commit-hooks", "std": "std_2" diff --git a/flake.nix b/flake.nix index 24bb0b556..dca3ab3cc 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,7 @@ url = "github:NixOS/nixpkgs"; follows = "haskell-nix/nixpkgs-unstable"; }; + nixpkgs-babel.url = "github:NixOS/nixpkgs?rev=39addc620d1585c4d95246f4e47c83467ae3e62a"; haskell-nix = { url = "github:input-output-hk/haskell.nix"; inputs.hackage.follows = "hackage"; diff --git a/nix/cells/marlowe-playground/devshells.nix b/nix/cells/marlowe-playground/devshells.nix index 8aeb40760..d80833887 100644 --- a/nix/cells/marlowe-playground/devshells.nix +++ b/nix/cells/marlowe-playground/devshells.nix @@ -2,6 +2,14 @@ let inherit (cell) library packages scripts; inherit (library) pkgs haskell-nix cabal-project; + pkgs-babel = + if pkgs.nodePackages ? "@babel/cli" + then + throw "The main nixpkgs input now contains the babel command.\nPlease remove nixpkgs-babel from flake.nix, delete the pkgs-babel definition in devshells.nix, and replace the reference to pkgs-babel.nodePackages.\"@babel-cli\" with pkgs.nodePackages.\"@babel-cli\"" + else + import inputs.nixpkgs-babel { + system = pkgs.system; + }; haskell-devshell = haskell-nix.haskellLib.devshellFor cabal-project.shell; shell = inputs.std.lib.dev.mkShell { @@ -162,6 +170,15 @@ let pkgs.gawk pkgs.nil pkgs.z3 + pkgs.yarn + pkgs.nodePackages.rimraf + pkgs-babel.nodePackages."@babel/cli" + pkgs.nodePackages.ts-node + ] ++ pkgs.lib.optionals pkgs.stdenv.isLinux [ + # None of these browsers build on Darwin :( + pkgs.chromium + pkgs.firefox + pkgs.webkitgtk ]; devshell.startup."pre-commit-check".text = cell.library.pre-commit-check.shellHook;