From dfeb273bfa4189b5d6ce08a89b78a5a4a6f0a21a Mon Sep 17 00:00:00 2001 From: midchildan Date: Fri, 13 May 2022 10:39:02 +0900 Subject: [PATCH 1/3] epgstation: fix build --- .../applications/video/epgstation/default.nix | 23 ++----------------- pkgs/development/node-packages/default.nix | 1 + 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/pkgs/applications/video/epgstation/default.nix b/pkgs/applications/video/epgstation/default.nix index b89193617274..c93c0f94fa9b 100644 --- a/pkgs/applications/video/epgstation/default.nix +++ b/pkgs/applications/video/epgstation/default.nix @@ -23,18 +23,6 @@ let sha256 = "K1cAvmqWEfS6EY4MKAtjXb388XLYHtouxNM70PWgFig="; }; - workaround-opencollective-buildfailures = stdenv.mkDerivation { - # FIXME: This should be removed when a complete fix is available - # https://github.com/svanderburg/node2nix/issues/145 - name = "workaround-opencollective-buildfailures"; - dontUnpack = true; - installPhase = '' - mkdir -p $out/bin - touch $out/bin/opencollective-postinstall - chmod +x $out/bin/opencollective-postinstall - ''; - }; - client = nodePackages.epgstation-client.override (drv: { # FIXME: remove this option if possible # @@ -49,21 +37,14 @@ let server = nodePackages.epgstation.override (drv: { inherit src; - bypassCache = false; - # This is set to false to keep devDependencies at build time. Build time # dependencies are pruned afterwards. production = false; buildInputs = [ bash ]; - nativeBuildInputs = [ - nodejs - workaround-opencollective-buildfailures + nativeBuildInputs = drv.nativeBuildInputs ++ [ makeWrapper - ] ++ (with nodePackages; [ - node-pre-gyp - node-gyp-build - ]); + ]; preRebuild = '' # Fix for not being able to connect to mysql using domain sockets. diff --git a/pkgs/development/node-packages/default.nix b/pkgs/development/node-packages/default.nix index b2da0f16eb53..e65802f68339 100644 --- a/pkgs/development/node-packages/default.nix +++ b/pkgs/development/node-packages/default.nix @@ -119,6 +119,7 @@ let # NOTE: this is a stub package to fetch npm dependencies for # ../../applications/video/epgstation epgstation = super."epgstation-../../applications/video/epgstation".override (drv: { + nativeBuildInputs = [ self.node-pre-gyp self.node-gyp-build ]; meta = drv.meta // { platforms = pkgs.lib.platforms.none; }; From 834477e4d43f45bf34f52804015783298e4e2ff1 Mon Sep 17 00:00:00 2001 From: midchildan Date: Sat, 14 May 2022 00:17:11 +0900 Subject: [PATCH 2/3] epgstation: move node-pre-gyp and node-gyp-build to buildInputs --- pkgs/applications/video/epgstation/default.nix | 2 +- pkgs/development/node-packages/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/epgstation/default.nix b/pkgs/applications/video/epgstation/default.nix index c93c0f94fa9b..323b22c7883d 100644 --- a/pkgs/applications/video/epgstation/default.nix +++ b/pkgs/applications/video/epgstation/default.nix @@ -42,7 +42,7 @@ let production = false; buildInputs = [ bash ]; - nativeBuildInputs = drv.nativeBuildInputs ++ [ + nativeBuildInputs = (drv.nativeBuildInputs or [ ]) ++ [ makeWrapper ]; diff --git a/pkgs/development/node-packages/default.nix b/pkgs/development/node-packages/default.nix index e65802f68339..afeb5e35f2c8 100644 --- a/pkgs/development/node-packages/default.nix +++ b/pkgs/development/node-packages/default.nix @@ -119,7 +119,7 @@ let # NOTE: this is a stub package to fetch npm dependencies for # ../../applications/video/epgstation epgstation = super."epgstation-../../applications/video/epgstation".override (drv: { - nativeBuildInputs = [ self.node-pre-gyp self.node-gyp-build ]; + buildInputs = [ self.node-pre-gyp self.node-gyp-build ]; meta = drv.meta // { platforms = pkgs.lib.platforms.none; }; From 6a0c84d59493aa2cecdb2d422431f8223d06edd4 Mon Sep 17 00:00:00 2001 From: midchildan Date: Sat, 14 May 2022 15:24:01 +0900 Subject: [PATCH 3/3] epgstation: keep old buildInputs in overrideAttrs --- pkgs/applications/video/epgstation/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/video/epgstation/default.nix b/pkgs/applications/video/epgstation/default.nix index 323b22c7883d..1f5d23a684a8 100644 --- a/pkgs/applications/video/epgstation/default.nix +++ b/pkgs/applications/video/epgstation/default.nix @@ -41,7 +41,7 @@ let # dependencies are pruned afterwards. production = false; - buildInputs = [ bash ]; + buildInputs = (drv.buildInputs or [ ]) ++ [ bash ]; nativeBuildInputs = (drv.nativeBuildInputs or [ ]) ++ [ makeWrapper ];