node2nix icon indicating copy to clipboard operation
node2nix copied to clipboard

Libsass nightmare

Open corpix opened this issue 3 years ago • 2 comments

Haven't found anything about libsass & node2nix, here is a problem:

$ nix build -f .
error: builder for '/nix/store/zrgyi4ayarp0qxhijzlwfjx2h1ys5qs6-node-dependencies-agola-web-0.1.0.drv' failed with exit code 1;                                                                                                                                                  
       last 10 log lines:                                                                                                                                                                                                                                                        
       > npm ERR! gyp ERR! command "/nix/store/sndm8q6yhr6a8yy9zdd1sxni3lc8pcmw-nodejs-18.8.0/bin/node" "/nix/store/hyj3limmjwrkjlfmn76ml7633nyzg2h7-node-dependencies-agola-web-0.1.0/agola-web/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" " 
--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="                                                                                                                                                                                                                     
       > npm ERR! gyp ERR! cwd /nix/store/hyj3limmjwrkjlfmn76ml7633nyzg2h7-node-dependencies-agola-web-0.1.0/agola-web/node_modules/node-sass                                                                                                                                    
       > npm ERR! gyp ERR! node -v v18.8.0                                                                                                                                                                                                                                       
       > npm ERR! gyp ERR! node-gyp -v v3.8.0                                                                                                                                                                                                                                    
       > npm ERR! gyp ERR! not ok                                                                                                                                                                                                                                                
       > npm ERR! Build failed with error code: 1                                                                                                                                                                                                                                
       >                                                                                                                                                                                                                                                                         
       > npm ERR! A complete log of this run can be found in:                                                                                                                                                                                                                    
       > npm ERR!     /build/.npm/_logs/2022-09-17T07_36_01_857Z-debug-0.log                                                                                                                                                                                                     
       >                                                                                                                                                                                                                                                                         
       For full logs, run 'nix log /nix/store/zrgyi4ayarp0qxhijzlwfjx2h1ys5qs6-node-dependencies-agola-web-0.1.0.drv'.                                                                                                                                                           
error: 1 dependencies of derivation '/nix/store/6fjjwbs3mn6sgwhrxcz4b4adhqrqyrxm-agola-web.drv' failed to build                                                                                                                                                                  
error: 1 dependencies of derivation '/nix/store/9mjxszs7f09y78ikrcknbg9rfxlm80g0-agola.drv' failed to build 

I have tried to alter node-sass package inside node-packages to look like this:

    "node-sass-4.14.1" = {                                                                                                                                                                                                                                                       
      name = "node-sass";                                                                                                                                                                                                                                                        
      packageName = "node-sass";                                                                                                                                                                                                                                                 
      version = "4.14.1";                                                                                                                                                                                                                                                        
      src = fetchurl {                                                                                                                                                                                                                                                           
        url = "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz";                                                                                                                                                                                                     
        sha512 = "sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==";                                                                                                                                                                     
      };                                                                                                                                                                                                                                                                         
      buildInputs = [pkgs.pkgconfig pkgs.libsass];                                                                                                                                                                                                                               
    }; 

But no luck. So, how do you deal with this sass thing?

corpix avatar Sep 17 '22 07:09 corpix

Have you considered switching to sass? It's pure JS, and the recommended implementation going forward. It can generally be installed in a nix environment with no special steps.

Smona avatar May 16 '23 03:05 Smona

I am not a developer of software I am packaging

corpix avatar May 17 '23 14:05 corpix