Unverified Commit c6aa0f73 authored by adisbladis's avatar adisbladis Committed by GitHub
Browse files

Merge pull request #284235 from toastal/purescm

purescm: init at 1.8.2
parents e1135102 e1c25993
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
node_modules/
+19 −0
Original line number Diff line number Diff line
========================================================================
purescm
========================================================================


Suggested additional ``buildInputs``
====================================

``chez-racket``
   Upstream is using the Racket fork of Chez Scheme to execute the
   generated Scheme output.


To update this package
======================

#. Bump the ``./package.json`` version pin
#. Run ``nix-shell -p nodejs --command "npm i --package-lock-only"``
#. Update ``npmDeps.hash`` in the ``package.nix``
+20 −0
Original line number Diff line number Diff line
{
  "name": "purescm",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "dependencies": {
        "purescm": "1.8.2"
      }
    },
    "node_modules/purescm": {
      "version": "1.8.2",
      "resolved": "https://registry.npmjs.org/purescm/-/purescm-1.8.2.tgz",
      "integrity": "sha512-r+iaiRagOO2rHxGIke391l+pMlpE85vOVpQA32pdftJTdKeUVGIYy0UAs1nOkQSNxdHMXsNIkrskAwOSiyX3PA==",
      "bin": {
        "purescm": "index.js"
      }
    }
  }
}
+5 −0
Original line number Diff line number Diff line
{
  "dependencies": {
    "purescm": "1.8.2"
  }
}
+45 −0
Original line number Diff line number Diff line
{ lib
, buildNpmPackage
, fetchNpmDeps
, testers
}:

let
  inherit (lib) fileset;

  packageLock = builtins.fromJSON (builtins.readFile ./package-lock.json);

  pname = "purescm";
  version = packageLock.packages."node_modules/${pname}".version;

  package = buildNpmPackage {
    inherit pname version;

    src = ./.;
    dontNpmBuild = true;

    npmDeps = fetchNpmDeps {
      src = ./.;
      hash = "sha256-ljeFcLvIET77Q0OR6O5Ok1fGnaxaKaoywpcy2aHq/6o=";
    };

    installPhase = ''
      mkdir -p $out/share/${pname}
      cp -r node_modules/ $out/share/${pname}
      ln -s $out/share/${pname}/node_modules/.bin $out/bin
    '';

    passthru.tests = {
      version = testers.testVersion { inherit package; };
    };

    meta = {
      description = "Chez Scheme back-end for PureScript";
      homepage = "https://github.com/purescm/purescm";
      license = lib.licenses.asl20;
      maintainers = with lib.maintainers; [ toastal ];
      mainProgram = "purescm";
    };
  };
in
package