From 878c6f3d4bea3c1be1e22193079254b792f38beb Mon Sep 17 00:00:00 2001 From: cab Date: Thu, 13 Oct 2022 01:03:16 +0400 Subject: [PATCH] Removed nixos.sh Also added a note in README.md for NixOS users --- README.md | 6 ++++++ nixos.sh | 18 ------------------ 2 files changed, 6 insertions(+), 18 deletions(-) delete mode 100755 nixos.sh diff --git a/README.md b/README.md index 9be8b2b2..b2ec16c4 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,12 @@ turbo run build --filter=@quri/squiggle-components You can also run specific npm scripts for the package you're working on. See `packages/*/README.md` for the details. +# NixOS users + +This repository requires the use of bundled binaries from node_modules, which +are not linked statically. The easiest way to get them working is to enable +[nix-ld](https://github.com/Mic92/nix-ld). + # Contributing See `CONTRIBUTING.md`. diff --git a/nixos.sh b/nixos.sh deleted file mode 100755 index 28ff5d91..00000000 --- a/nixos.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# This script is only relevant if you're rolling nixos. - -# Esy (a bisect_ppx dependency/build tool) is borked on nixos without using an FHS shell. https://github.com/esy/esy/issues/858 -# We need to patchelf rescript executables. https://github.com/NixOS/nixpkgs/issues/107375 -set -x - -fhsShellName="squiggle-fhs-development" -fhsShellDotNix="{pkgs ? import {} }: (pkgs.buildFHSUserEnv { name = \"${fhsShellName}\"; targetPkgs = pkgs: [pkgs.yarn pkgs.glibc]; runScript = \"yarn\"; }).env" -nix-shell - <<<"$fhsShellDotNix" - -theLd=$(patchelf --print-interpreter $(which mkdir)) -patchelf --set-interpreter $theLd ./node_modules/gentype/gentype.exe -patchelf --set-interpreter $theLd ./node_modules/rescript/linux/*.exe -patchelf --set-interpreter $theLd ./node_modules/bisect_ppx/ppx -patchelf --set-interpreter $theLd ./node_modules/bisect_ppx/bisect-ppx-report -theSo=$(find /nix/store/*$fhsShellName*/lib64 -name libstdc++.so.6 | head -n 1) -patchelf --replace-needed libstdc++.so.6 $theSo ./node_modules/rescript/linux/ninja.exe