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 = { inputs = {
nixpkgs.url = "nixpkgs/nixos-22.05"; nixpkgs.url = "nixpkgs/nixos-22.05";
gentype = { gentype = {
url = github:quinn-dougherty/genType; url = "github:quinn-dougherty/genType";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
flake-utils.url = github:numtide/flake-utils; flake-utils.url = "github:numtide/flake-utils";
}; };
outputs = { self, nixpkgs, gentype, flake-utils }: outputs = { self, nixpkgs, gentype, flake-utils }:
@ -33,9 +33,7 @@
inherit pkgs commonFn gentypeOutputFn; inherit pkgs commonFn gentypeOutputFn;
}; };
componentsFn = { pkgs, ... }: componentsFn = { pkgs, ... }:
import ./nix/squiggle-components.nix { import ./nix/squiggle-components.nix { inherit pkgs commonFn langFn; };
inherit pkgs commonFn langFn;
};
websiteFn = { pkgs, ... }: websiteFn = { pkgs, ... }:
import ./nix/squiggle-website.nix { import ./nix/squiggle-website.nix {
inherit pkgs commonFn langFn componentsFn; inherit pkgs commonFn langFn componentsFn;
@ -77,8 +75,7 @@
# developing # developing
devShells = flake-utils.lib.flattenTree { devShells = flake-utils.lib.flattenTree {
default = default = (import ./nix/shell.nix { inherit pkgs; }).shell;
(import ./nix/shell.nix { inherit pkgs; }).shell;
}; };
}; };
in flake-utils.lib.eachDefaultSystem (system: in flake-utils.lib.eachDefaultSystem (system:

View File

@ -4,9 +4,12 @@ rec {
common = commonFn pkgs; common = commonFn pkgs;
langPackageJson = let langPackageJson = let
raw = pkgs.lib.importJSON ../packages/squiggle-lang/package.json; 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; 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 { yarn-source = pkgs.mkYarnPackage {
name = "squiggle-lang_yarnsource"; name = "squiggle-lang_yarnsource";
src = ../packages/squiggle-lang; src = ../packages/squiggle-lang;
@ -14,7 +17,8 @@ rec {
yarnLock = ../yarn.lock; yarnLock = ../yarn.lock;
pkgConfig = { pkgConfig = {
rescript = { 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 = '' postInstall = ''
echo "PATCHELF'ING RESCRIPT EXECUTABLES (INCL NINJA)" echo "PATCHELF'ING RESCRIPT EXECUTABLES (INCL NINJA)"
# Patching interpreter for linux/*.exe's # Patching interpreter for linux/*.exe's

View File

@ -16,7 +16,8 @@ rec {
lint = pkgs.stdenv.mkDerivation { lint = pkgs.stdenv.mkDerivation {
name = "squiggle-vscode-lint"; name = "squiggle-vscode-lint";
buildInputs = common.buildInputs ++ common.prettier; 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 ."; buildPhase = "prettier --check .";
installPhase = "mkdir -p $out"; installPhase = "mkdir -p $out";
}; };