nixfmt compels me

This commit is contained in:
Quinn Dougherty 2022-08-30 11:23:33 +08:00
parent 21eeb63cf2
commit 905b5fc569
4 changed files with 31 additions and 29 deletions

View File

@ -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:

View File

@ -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

View File

@ -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";
};