summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/newsbot-js/default.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2018-04-05 23:21:53 +0200
committermakefu <github@syntax-fehler.de>2018-04-05 23:21:53 +0200
commit54c104e1e1f59906ddf855d6993de14d07a093dc (patch)
treecc271ff3806fac4176997a1e51ef03b454e1a6e4 /krebs/5pkgs/simple/newsbot-js/default.nix
parent241973f2ec1f4fcf217c37fd102feba82bc0b66e (diff)
parent1dd03483619d00d1afc6a278ded0cca6cff2d9ed (diff)
Merge remote-tracking branch 'lass/master' into stagingprism/makefu-staginggum/staging
Diffstat (limited to 'krebs/5pkgs/simple/newsbot-js/default.nix')
-rw-r--r--krebs/5pkgs/simple/newsbot-js/default.nix39
1 files changed, 18 insertions, 21 deletions
diff --git a/krebs/5pkgs/simple/newsbot-js/default.nix b/krebs/5pkgs/simple/newsbot-js/default.nix
index fa39823d3..cc362b86a 100644
--- a/krebs/5pkgs/simple/newsbot-js/default.nix
+++ b/krebs/5pkgs/simple/newsbot-js/default.nix
@@ -1,27 +1,27 @@
-{ stdenv, makeWrapper, callPackage, lib, buildEnv, fetchgit, nodePackages, nodejs }:
+{ stdenv, makeWrapper, lib, buildEnv, fetchgit, nodejs-8_x, pkgs, icu }:
with lib;
let
- np = (callPackage <nixpkgs/pkgs/top-level/node-packages.nix>) {
- generated = ./packages.nix;
- self = np;
+ nodeEnv = import <nixpkgs/pkgs/development/node-packages/node-env.nix> {
+ inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
+ nodejs = nodejs-8_x;
+ libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
- node_env = buildEnv {
- name = "node_env";
- paths = [
- np.feedparser
- np.form-data
- np.irc
- np.request
- np.shell-quote
- ];
- pathsToLink = [ "/lib" ];
- ignoreCollisions = true;
+ node_env = pkgs.buildEnv {
+ name = "go-node_env";
+ paths = attrValues (import ./node-packages.nix {
+ inherit (pkgs) fetchurl fetchgit;
+ inherit nodeEnv;
+ globalBuildInputs = [
+ icu.dev
+ ];
+ });
};
-in np.buildNodePackage {
+
+in stdenv.mkDerivation {
name = "newsbot-js";
src = fetchgit {
@@ -32,14 +32,11 @@ in np.buildNodePackage {
phases = [
"unpackPhase"
- "patchPhase"
"installPhase"
];
- deps = (filter (v: nixType v == "derivation") (attrValues np));
-
buildInputs = [
- nodejs
+ nodejs-8_x
makeWrapper
];
@@ -48,7 +45,7 @@ in np.buildNodePackage {
cp newsbot.js $out/
cat > $out/newsbot << EOF
- ${nodejs}/bin/node $out/newsbot.js
+ ${nodejs-8_x}/bin/node $out/newsbot.js
EOF
chmod +x $out/newsbot