From 8c088ea338974503de20d42ceef42e1bdbad5332 Mon Sep 17 00:00:00 2001 From: "Matthew \"strager\" Glazar" Date: Wed, 21 Sep 2022 22:31:00 -0700 Subject: [PATCH] fix(nix): work around CMake bug causing missing libstdc++.so.6 quick-lint-js fails to run after installation: $ quick-lint-js --version quick-lint-js: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory Cause: https://github.com/NixOS/nixpkgs/pull/108496#issuecomment-1192083379 Work around this error. This workaround has landed in Nixpkgs upstream: https://github.com/NixOS/nixpkgs/pull/190091 --- .github/workflows/test-nix-install.yml | 5 ++--- dist/nix/quick-lint-js.nix | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-nix-install.yml b/.github/workflows/test-nix-install.yml index 9e2f7feef3..c443b1f6db 100644 --- a/.github/workflows/test-nix-install.yml +++ b/.github/workflows/test-nix-install.yml @@ -24,9 +24,8 @@ jobs: - name: install run: nix-env -f . -i - # TODO(#792): Re-enable when Nixpkgs fixes things. - #- name: test executable - # run: cd / && quick-lint-js --help + - name: test executable + run: cd / && quick-lint-js --help # quick-lint-js finds bugs in JavaScript programs. # Copyright (C) 2020 Matthew Glazar diff --git a/dist/nix/quick-lint-js.nix b/dist/nix/quick-lint-js.nix index e70cee8772..2c4c21f2c5 100644 --- a/dist/nix/quick-lint-js.nix +++ b/dist/nix/quick-lint-js.nix @@ -23,6 +23,9 @@ mkDerivation { doCheck = doCheck; dontFixCmake = dontFixCmake; + # Temporary workaround for https://github.com/NixOS/nixpkgs/pull/108496#issuecomment-1192083379 + cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=ON" ]; + meta = with lib; { description = "quick-lint-js finds bugs in JavaScript programs"; homepage = "https://github.com/strager/quick-lint-js";