mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 03:14:03 +00:00
Make overrides of nodePackages work
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
758f20f0b8
commit
210246266d
@ -1101,6 +1101,7 @@ let
|
||||
nodePackages = recurseIntoAttrs (import ./node-packages.nix {
|
||||
inherit pkgs stdenv nodejs fetchurl;
|
||||
neededNatives = [python] ++ lib.optional (lib.elem system lib.platforms.linux) utillinux;
|
||||
self = pkgs.nodePackages;
|
||||
});
|
||||
|
||||
ldns = callPackage ../development/libraries/ldns { };
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ pkgs, stdenv, nodejs, fetchurl, neededNatives }:
|
||||
{ pkgs, stdenv, nodejs, fetchurl, neededNatives, self }:
|
||||
|
||||
let
|
||||
inherit (self) buildNodePackage patchLatest;
|
||||
@ -24,30 +24,28 @@ let
|
||||
} ] ++ full;
|
||||
} ) { top-level = []; full = []; } generated;
|
||||
in builtins.listToAttrs all.top-level // { full = builtins.listToAttrs all.full; };
|
||||
in {
|
||||
inherit importGeneratedPackages;
|
||||
|
||||
self = {
|
||||
inherit importGeneratedPackages;
|
||||
nativeDeps = {
|
||||
"node-expat-*" = [ pkgs.expat ];
|
||||
"rbytes-0.0.2" = [ pkgs.openssl ];
|
||||
};
|
||||
|
||||
nativeDeps = {
|
||||
"node-expat-*" = [ pkgs.expat ];
|
||||
"rbytes-0.0.2" = [ pkgs.openssl ];
|
||||
};
|
||||
buildNodePackage = import ../development/web/nodejs/build-node-package.nix {
|
||||
inherit stdenv nodejs neededNatives;
|
||||
inherit (pkgs) runCommand;
|
||||
};
|
||||
|
||||
buildNodePackage = import ../development/web/nodejs/build-node-package.nix {
|
||||
inherit stdenv nodejs neededNatives;
|
||||
inherit (pkgs) runCommand;
|
||||
};
|
||||
patchLatest = srcAttrs:
|
||||
let src = fetchurl srcAttrs; in pkgs.runCommand src.name {} ''
|
||||
mkdir unpack
|
||||
cd unpack
|
||||
tar xf ${src}
|
||||
mv */ package 2>/dev/null || true
|
||||
sed -i -e "s/: \"latest\"/: \"*\"/" package/package.json
|
||||
tar cf $out *
|
||||
'';
|
||||
|
||||
patchLatest = srcAttrs:
|
||||
let src = fetchurl srcAttrs; in pkgs.runCommand src.name {} ''
|
||||
mkdir unpack
|
||||
cd unpack
|
||||
tar xf ${src}
|
||||
mv */ package 2>/dev/null || true
|
||||
sed -i -e "s/: \"latest\"/: \"*\"/" package/package.json
|
||||
tar cf $out *
|
||||
'';
|
||||
|
||||
/* Put manual packages below here (ideally eventually managed by npm2nix */
|
||||
} // importGeneratedPackages (import ./node-packages-generated.nix) self.nativeDeps self;
|
||||
in self
|
||||
/* Put manual packages below here (ideally eventually managed by npm2nix */
|
||||
} // importGeneratedPackages (import ./node-packages-generated.nix) self.nativeDeps self
|
||||
|
Loading…
Reference in New Issue
Block a user