Giter VIP home page Giter VIP logo

Comments (3)

toastal avatar toastal commented on July 16, 2024 1

This seems to be working for me

# shell.nix
let
  easy-ps-src =
    (pkgs.fetchFromGitHub {
      owner = "justinwoo";
      repo = "easy-purescript-nix";
      rev = "c8c32741bc09e2ac0a94d5140cf51fa5de809e24";
      sha256 = "0rn938nbxqsd7lp7l8z1y7bhzaq29vbziq6hq9llb3yh9xs10lmf";
    });

  easy-ps = import easy-ps-src { inherit pkgs; };

  our_pscid = import "${easy-ps-src}/pscid" {
    inherit pkgs;
    nodejs = pkgs.nodejs-14_x;
  };

  our_purescript-psa =
    let
      nodeEnv = import "${easy-ps-src}/pscid/node-env.nix" {
        inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
        nodejs = pkgs.nodejs-14_x;
        libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
      };

      args = (import "${easy-ps-src}/pscid/node-packages.nix" {
        inherit (pkgs) fetchurl fetchgit;
        inherit nodeEnv;
      }
      ).args;

      npmPackage = builtins.fetchTarball {
        url = "https://registry.npmjs.org/purescript-psa/-/purescript-psa-0.8.0.tgz";
        sha256 = "0hn2m8wjl7mcvv4b7nzfva0b1657pg5k2z51xsyc8jc60fqnilhf";
      };
    in nodeEnv.buildNodePackage (args // { src = npmPackage; });
in pkgs.mkShell {
  # ...
  nativeBuildInputs = [
    easy-ps.purs-0_13_8
    easy-ps.psc-package
    easy-ps.purty
    easy-ps.spago
    easy-ps.zephyr
    our_pscid
    our_purescript-psa
  ];
  # ...
}

revised:

let
  nodejs = pkgs.nodejs-14_x;

  # pulling apart the src so that we can override the NodeJS version
  # commit for PR #129
  easy-ps-src = pkgs.fetchFromGitHub {
    owner = "toastal"; # "justinwoo";
    repo = "easy-purescript-nix";
    rev = "5840355396977eb0bd0192afb74aff5186f33435";
    sha256 = "0fd0f90bxgsd9hznyx1cl62b89564nfh195f1h8vidrh05gg5k8l";
  };

  easy-ps = import easy-ps-src { inherit pkgs; } // {
    psa = import "${easy-ps-src}/psa" { inherit pkgs nodejs; };
    pscid = import "${easy-ps-src}/pscid" { inherit pkgs nodejs; };
  };
in pkgs.mkShell {
  # ...
  nativeBuildInputs = [
    nodejs
    easy-ps.purs-0_13_8
    easy-ps.psc-package
    easy-ps.purty
    easy-ps.spago
    easy-ps.zephyr
    easy-ps.psa
    easy-ps.pscid
  ];
  # ...
}

from easy-purescript-nix.

justinwoo avatar justinwoo commented on July 16, 2024

You might try doing this with a similar setup to pscid: https://github.com/justinwoo/easy-purescript-nix/tree/master/pscid

from easy-purescript-nix.

Benjmhart avatar Benjmhart commented on July 16, 2024

I actually might try and tackle this issue in the next few weeks then

from easy-purescript-nix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.