31 lines
808 B
Nix
31 lines
808 B
Nix
{ pkgs, stdenv, nodejs, fetchurl, fetchgit, neededNatives, self }:
|
|
|
|
rec {
|
|
|
|
nativeDeps = {};
|
|
|
|
buildNodePackage = import
|
|
"${pkgs.path}/pkgs/development/web/nodejs/build-node-package.nix" {
|
|
inherit stdenv nodejs neededNatives;
|
|
inherit (pkgs) runCommand;
|
|
};
|
|
|
|
patchSource = fn: srcAttrs:
|
|
let src = fn srcAttrs; in pkgs.runCommand src.name {} ''
|
|
mkdir unpack
|
|
cd unpack
|
|
unpackFile ${src}
|
|
chmod -R +w */
|
|
mv */ package 2>/dev/null || true
|
|
sed -i -e "s/:\s*\"latest\"/: \"*\"/" -e
|
|
"s/:\s*\"\(https\?\|git\(\+\(ssh\|http\|https\)\)\?\):\/\/[^\"]*\"/:
|
|
\"*\"/" package/package.json
|
|
mv */ $out
|
|
'';
|
|
|
|
# Backwards compat
|
|
patchLatest = patchSource fetchurl;
|
|
|
|
} // import ./purecss-npm-generated.nix { inherit self fetchurl fetchgit;
|
|
inherit (pkgs) lib; }
|