nixpkgs-suyu/pkgs/servers/web-apps/codimd/js-sequence-diagrams/default.nix
Maximilian Bosch c68bc18213
codimd: js-sequence-diagrams: use git source rather than the NPM tarball
It seems as NPM just removed the tarballs of the unpublished package,
hence `codimd` isn't buildable. The sources for the package are
available on github[1] and fix the build.

For further information about the `js-sequence-diagrams` workarounds,
please refer to 5feec424de.

[1] https://github.com/Moeditor/js-sequence-diagrams
2019-04-12 11:01:33 +02:00

33 lines
1.2 KiB
Nix

{ pkgs, nodejs, extraNodePackages }:
let
nodeEnv = import ../../../../development/node-packages/node-env.nix {
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
inherit nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
nodeEnv.buildNodePackage {
name = "js-sequence-diagrams";
packageName = "js-sequence-diagrams";
version = "1000000.0.6";
src = pkgs.fetchFromGitHub {
owner = "Moeditor";
repo = "js-sequence-diagrams";
rev = "4d46bc6229a3f93c9bcad561cab4924034f5456d";
sha256 = "09ri5cx5yq87p3nla06gs0xb2gifmsy0xhs0s5524xr4ya6pnivv";
};
dependencies = [ ];
dontNpmInstall = true;
meta = {
description = "Fucks NPM and draws simple SVG sequence diagrams from textual representation of the diagram";
homepage = "https://github.com/Moeditor/js-sequence-diagrams#readme";
license = "BSD-2-Clause";
};
production = true;
bypassCache = true;
postInstall = builtins.concatStringsSep "\n" (pkgs.lib.mapAttrsToList (
name: pkg: "ln -s ${pkg}/lib/node_modules/${name} $out/lib/node_modules/${name}"
) extraNodePackages);
}