mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-16 06:47:09 +03:00
pump.io: git-2015-11-09 -> 1.0.0
Release notes: https://github.com/e14n/pump.io/releases/tag/v1.0.0 Package is now generated with node2nix instead of npm2nix.
This commit is contained in:
parent
32352638ec
commit
983f6819c7
16
pkgs/servers/web-apps/pump.io/composition.nix
Normal file
16
pkgs/servers/web-apps/pump.io/composition.nix
Normal file
@ -0,0 +1,16 @@
|
||||
# This file has been generated by node2nix 1.1.0. Do not edit!
|
||||
|
||||
{pkgs ? import <nixpkgs> {
|
||||
inherit system;
|
||||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs"}:
|
||||
|
||||
let
|
||||
nodeEnv = import ../../../development/node-packages/node-env.nix {
|
||||
inherit (pkgs) stdenv python utillinux runCommand writeTextFile;
|
||||
inherit nodejs;
|
||||
};
|
||||
in
|
||||
import ./node-packages.nix {
|
||||
inherit (pkgs) fetchurl fetchgit;
|
||||
inherit nodeEnv;
|
||||
}
|
@ -1,34 +1,19 @@
|
||||
{ stdenv, fetchFromGitHub, makeWrapper, callPackage, nodejs, python, utillinux, graphicsmagick }:
|
||||
{ pkgs, system, stdenv, fetchurl, makeWrapper, nodejs, graphicsmagick }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
let
|
||||
nodePackages = callPackage (import ../../../top-level/node-packages.nix) {
|
||||
inherit stdenv nodejs fetchurl fetchgit;
|
||||
neededNatives = [ python ] ++ optional stdenv.isLinux utillinux;
|
||||
self = nodePackages;
|
||||
generated = ./node-packages.nix;
|
||||
# To regenerate composition.nix, run generate.sh.
|
||||
nodePackages = import ./composition.nix {
|
||||
inherit pkgs system nodejs;
|
||||
};
|
||||
|
||||
in nodePackages.buildNodePackage rec {
|
||||
version = "git-2015-11-09";
|
||||
name = "pump.io-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "e14n";
|
||||
repo = "pump.io";
|
||||
rev = "2f8d6b3518607ed02b594aee0db6ccacbe631b2d";
|
||||
sha256 = "1xym3jzpxlni1n2i0ixwrnpkx5fbnd1p6sm1hf9n3w5m2lx6gdw5";
|
||||
};
|
||||
|
||||
deps = (filter (v: nixType v == "derivation") (attrValues nodePackages));
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
in
|
||||
nodePackages.package.override (oldAttrs: {
|
||||
buildInputs = oldAttrs.buildInputs ++ [ makeWrapper ];
|
||||
|
||||
postInstall = ''
|
||||
for prog in pump pump-authorize pump-follow pump-post-note pump-register-app pump-register-user pump-stop-following; do
|
||||
wrapProgram "$out/bin/$prog" \
|
||||
--set NODE_PATH "$out/lib/node_modules/pump.io/node_modules/" \
|
||||
--prefix PATH : ${graphicsmagick}/bin:$out/bin
|
||||
done
|
||||
'';
|
||||
@ -65,4 +50,4 @@ in nodePackages.buildNodePackage rec {
|
||||
* Experimenting with social software
|
||||
'';
|
||||
};
|
||||
}
|
||||
})
|
||||
|
29
pkgs/servers/web-apps/pump.io/generate.sh
Executable file
29
pkgs/servers/web-apps/pump.io/generate.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p nodePackages.node2nix curl jshon
|
||||
|
||||
set -e
|
||||
|
||||
# Normally, this node2nix invocation would be sufficient:
|
||||
# exec node2nix --input node-packages.json --composition composition.nix
|
||||
#
|
||||
# But pump.io soft-depends on extra modules, which have to be *inside*
|
||||
# its own node_modules, not beside them.
|
||||
#
|
||||
# So we hack these extra deps into package.json and feed that into
|
||||
# node2nix.
|
||||
#
|
||||
# Also jshon does funny things with slashes in strings, which can be
|
||||
# fixed with sed.
|
||||
|
||||
curl https://raw.githubusercontent.com/e14n/pump.io/v1.0.0/package.json | \
|
||||
jshon -e dependencies \
|
||||
-s '*' -i databank-mongodb \
|
||||
-s '*' -i databank-redis \
|
||||
-s '*' -i databank-memcached \
|
||||
-s '*' -i databank-lrucache \
|
||||
-p | sed 's=\\/=/=g' > full-package.json
|
||||
|
||||
node2nix --input full-package.json --composition composition.nix --node-env ../../../development/node-packages/node-env.nix
|
||||
|
||||
# overriding nodePackages src doesn't seem to work, so...
|
||||
sed -i 's|src = ./.|src = fetchurl { url = "https://registry.npmjs.org/pump.io/-/pump.io-1.0.0.tgz"; sha1 = "404mzdqzknrv7pl9qasksi791cc00bbd"; }|' node-packages.nix
|
@ -1,36 +1,7 @@
|
||||
{
|
||||
"name": "pump.io",
|
||||
"dependencies": {
|
||||
"bcrypt": "0.8.x",
|
||||
"bunyan": "0.16.x",
|
||||
"connect": "1.x",
|
||||
"connect-auth": "0.5.3",
|
||||
"connect-databank": "0.13.x",
|
||||
"crypto-cacerts": "0.1.x",
|
||||
"databank": "0.19.x",
|
||||
"databank-lrucache": "^0.1.2",
|
||||
"databank-memcached": "^0.15.0",
|
||||
"databank-mongodb": "^0.18.10",
|
||||
"databank-redis": "^0.19.6",
|
||||
"dateformat": "1.x",
|
||||
"dialback-client": "~0.1.5",
|
||||
"emailjs": "0.3.x",
|
||||
"express": "2.5.x",
|
||||
"gm": "1.9.x",
|
||||
"jankyqueue": "0.1.x",
|
||||
"mkdirp": "0.3.x",
|
||||
"node-uuid": "1.3.x",
|
||||
"oauth-evanp": "~0.9.10-evanp.2",
|
||||
"optimist": "0.3.x",
|
||||
"schlock": "~0.2.1",
|
||||
"set-immediate": "0.1.x",
|
||||
"showdown": "0.3.x",
|
||||
"sockjs": "0.3.x",
|
||||
"step": "0.0.x",
|
||||
"underscore": "1.4.x",
|
||||
"underscore-contrib": "0.1.x",
|
||||
"utml": "0.2.x",
|
||||
"validator": "0.4.x",
|
||||
"webfinger": "~0.4.2"
|
||||
}
|
||||
}
|
||||
[
|
||||
"pump.io",
|
||||
"databank-mongodb",
|
||||
"databank-redis",
|
||||
"databank-memcached",
|
||||
"databank-lrucache"
|
||||
]
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user