nixfmt
compels me
This commit is contained in:
parent
21eeb63cf2
commit
905b5fc569
11
flake.nix
11
flake.nix
|
@ -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:
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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";
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,24 +2,24 @@
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
common = commonFn pkgs;
|
common = commonFn pkgs;
|
||||||
# lang = langFn pkgs;
|
# lang = langFn pkgs;
|
||||||
# components = componentsFn pkgs;
|
# components = componentsFn pkgs;
|
||||||
# websitePackageJson = let
|
# websitePackageJson = let
|
||||||
# raw = pkgs.lib.importJSON ../packages/website/package.json;
|
# raw = pkgs.lib.importJSON ../packages/website/package.json;
|
||||||
# modified = pkgs.lib.recursiveUpdate raw {
|
# modified = pkgs.lib.recursiveUpdate raw {
|
||||||
# dependencies.postcss-import = "^14.1.0";
|
# dependencies.postcss-import = "^14.1.0";
|
||||||
# dependencies.tailwindcss = "^3.1.8";
|
# dependencies.tailwindcss = "^3.1.8";
|
||||||
# };
|
# };
|
||||||
# packageJsonString = builtins.toJSON modified;
|
# packageJsonString = builtins.toJSON modified;
|
||||||
# in pkgs.writeText "packages/website/patched-package.json" packageJsonString;
|
# in pkgs.writeText "packages/website/patched-package.json" packageJsonString;
|
||||||
# yarn-source = pkgs.mkYarnPackage {
|
# yarn-source = pkgs.mkYarnPackage {
|
||||||
# name = "squiggle-website_yarnsource";
|
# name = "squiggle-website_yarnsource";
|
||||||
# src = ../packages/website;
|
# src = ../packages/website;
|
||||||
# packageJSON = websitePackageJson;
|
# packageJSON = websitePackageJson;
|
||||||
# yarnLock = ../yarn.lock;
|
# yarnLock = ../yarn.lock;
|
||||||
# packageResolutions."@quri/squiggle-lang" = lang.build;
|
# packageResolutions."@quri/squiggle-lang" = lang.build;
|
||||||
# packageResolutions."@quri/squiggle-components" = components.build;
|
# packageResolutions."@quri/squiggle-components" = components.build;
|
||||||
# };
|
# };
|
||||||
lint = pkgs.stdenv.mkDerivation {
|
lint = pkgs.stdenv.mkDerivation {
|
||||||
name = "squiggle-website-lint";
|
name = "squiggle-website-lint";
|
||||||
buildInputs = common.buildInputs ++ common.prettier;
|
buildInputs = common.buildInputs ++ common.prettier;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user