diff --git a/flake.nix b/flake.nix index ea9dee1c..0c6724c3 100644 --- a/flake.nix +++ b/flake.nix @@ -4,10 +4,10 @@ inputs = { nixpkgs.url = "nixpkgs/nixos-22.05"; gentype = { - url = github:quinn-dougherty/genType; + url = "github:quinn-dougherty/genType"; inputs.nixpkgs.follows = "nixpkgs"; }; - flake-utils.url = github:numtide/flake-utils; + flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, gentype, flake-utils }: @@ -33,9 +33,7 @@ inherit pkgs commonFn gentypeOutputFn; }; componentsFn = { pkgs, ... }: - import ./nix/squiggle-components.nix { - inherit pkgs commonFn langFn; - }; + import ./nix/squiggle-components.nix { inherit pkgs commonFn langFn; }; websiteFn = { pkgs, ... }: import ./nix/squiggle-website.nix { inherit pkgs commonFn langFn componentsFn; @@ -77,8 +75,7 @@ # developing devShells = flake-utils.lib.flattenTree { - default = - (import ./nix/shell.nix { inherit pkgs; }).shell; + default = (import ./nix/shell.nix { inherit pkgs; }).shell; }; }; in flake-utils.lib.eachDefaultSystem (system: diff --git a/nix/squiggle-lang.nix b/nix/squiggle-lang.nix index b811fe2b..757f76e7 100644 --- a/nix/squiggle-lang.nix +++ b/nix/squiggle-lang.nix @@ -4,9 +4,12 @@ rec { common = commonFn pkgs; langPackageJson = let raw = pkgs.lib.importJSON ../packages/squiggle-lang/package.json; - modified = pkgs.lib.recursiveUpdate raw { devDependencies."@types/lodash" = "^4.14.182"; }; + modified = pkgs.lib.recursiveUpdate raw { + devDependencies."@types/lodash" = "^4.14.182"; + }; packageJsonString = builtins.toJSON modified; - in pkgs.writeText "packages/squiggle-lang/patched-package.json" packageJsonString; + in pkgs.writeText "packages/squiggle-lang/patched-package.json" + packageJsonString; yarn-source = pkgs.mkYarnPackage { name = "squiggle-lang_yarnsource"; src = ../packages/squiggle-lang; @@ -14,7 +17,8 @@ rec { yarnLock = ../yarn.lock; pkgConfig = { rescript = { - buildInputs = common.which ++ (if pkgs.system != "i686-linux" then [ pkgs.gcc_multi ] else []); + buildInputs = common.which + ++ (if pkgs.system != "i686-linux" then [ pkgs.gcc_multi ] else [ ]); postInstall = '' echo "PATCHELF'ING RESCRIPT EXECUTABLES (INCL NINJA)" # Patching interpreter for linux/*.exe's diff --git a/nix/squiggle-vscode.nix b/nix/squiggle-vscode.nix index 433d6caa..2e725261 100644 --- a/nix/squiggle-vscode.nix +++ b/nix/squiggle-vscode.nix @@ -16,7 +16,8 @@ rec { lint = pkgs.stdenv.mkDerivation { name = "squiggle-vscode-lint"; buildInputs = common.buildInputs ++ common.prettier; - src = ../packages/vscode-ext; # yarn-source + "/libexec/vscode-squiggle/deps/vscode-squiggle"; + src = + ../packages/vscode-ext; # yarn-source + "/libexec/vscode-squiggle/deps/vscode-squiggle"; buildPhase = "prettier --check ."; installPhase = "mkdir -p $out"; }; diff --git a/nix/squiggle-website.nix b/nix/squiggle-website.nix index a3ee1856..41c9d28d 100644 --- a/nix/squiggle-website.nix +++ b/nix/squiggle-website.nix @@ -2,24 +2,24 @@ rec { common = commonFn pkgs; -# lang = langFn pkgs; -# components = componentsFn pkgs; -# websitePackageJson = let -# raw = pkgs.lib.importJSON ../packages/website/package.json; -# modified = pkgs.lib.recursiveUpdate raw { -# dependencies.postcss-import = "^14.1.0"; -# dependencies.tailwindcss = "^3.1.8"; -# }; -# packageJsonString = builtins.toJSON modified; -# in pkgs.writeText "packages/website/patched-package.json" packageJsonString; -# yarn-source = pkgs.mkYarnPackage { -# name = "squiggle-website_yarnsource"; -# src = ../packages/website; -# packageJSON = websitePackageJson; -# yarnLock = ../yarn.lock; -# packageResolutions."@quri/squiggle-lang" = lang.build; -# packageResolutions."@quri/squiggle-components" = components.build; -# }; + # lang = langFn pkgs; + # components = componentsFn pkgs; + # websitePackageJson = let + # raw = pkgs.lib.importJSON ../packages/website/package.json; + # modified = pkgs.lib.recursiveUpdate raw { + # dependencies.postcss-import = "^14.1.0"; + # dependencies.tailwindcss = "^3.1.8"; + # }; + # packageJsonString = builtins.toJSON modified; + # in pkgs.writeText "packages/website/patched-package.json" packageJsonString; + # yarn-source = pkgs.mkYarnPackage { + # name = "squiggle-website_yarnsource"; + # src = ../packages/website; + # packageJSON = websitePackageJson; + # yarnLock = ../yarn.lock; + # packageResolutions."@quri/squiggle-lang" = lang.build; + # packageResolutions."@quri/squiggle-components" = components.build; + # }; lint = pkgs.stdenv.mkDerivation { name = "squiggle-website-lint"; buildInputs = common.buildInputs ++ common.prettier;