···1-# This file has been generated by node2nix 1.2.0. Do not edit!
2-3-{pkgs ? import <nixpkgs> {
4- inherit system;
5- }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-6_x"}:
6-7-let
8- nodeEnv = import ../../../development/node-packages/node-env.nix {
9- inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
10- inherit nodejs;
11- };
12-in
13-import ./node-packages.nix {
14- inherit (pkgs) fetchurl fetchgit;
15- inherit nodeEnv;
16-}
···0000000000000000
-53
pkgs/servers/web-apps/pump.io/default.nix
···1-{ pkgs, system, stdenv, fetchurl, makeWrapper, nodejs, graphicsmagick }:
2-3-with stdenv.lib;
4-5-let
6- # To regenerate composition.nix, run generate.sh.
7- nodePackages = import ./composition.nix {
8- inherit pkgs system nodejs;
9- };
10-in
11-nodePackages.package.override (oldAttrs: {
12- buildInputs = oldAttrs.buildInputs ++ [ makeWrapper ];
13-14- postInstall = ''
15- for prog in pump pump-authorize pump-follow pump-post-note pump-register-app pump-register-user pump-stop-following; do
16- wrapProgram "$out/bin/$prog" \
17- --prefix PATH : ${graphicsmagick}/bin:$out/bin
18- done
19- '';
20-21- passthru.names = ["pump.io"];
22-23- meta = {
24- description = "Social server with an ActivityStreams API";
25- homepage = http://pump.io/;
26- license = licenses.asl20;
27- platforms = platforms.unix;
28- maintainers = [ maintainers.rvl ];
29- longDescription = ''
30- This is pump.io. It's a stream server that does most of what
31- people really want from a social network.
32-33- What's it for?
34-35- I post something and my followers see it. That's the rough idea
36- behind the pump.
37-38- There's an API defined in the API.md file. It uses
39- activitystrea.ms JSON as the main data and command format.
40-41- You can post almost anything that can be represented with
42- activity streams -- short or long text, bookmarks, images,
43- video, audio, events, geo checkins. You can follow friends,
44- create lists of people, and so on.
45-46- The software is useful for at least these scenarios:
47-48- * Mobile-first social networking
49- * Activity stream functionality for an existing app
50- * Experimenting with social software
51- '';
52- };
53-})
···1-#! /usr/bin/env nix-shell
2-#! nix-shell -i bash -p nodePackages.node2nix curl jshon
3-4-set -e
5-6-# Normally, this node2nix invocation would be sufficient:
7-# exec node2nix --input node-packages.json --composition composition.nix
8-#
9-# But pump.io soft-depends on extra modules, which have to be *inside*
10-# its own node_modules, not beside them.
11-#
12-# So we hack these extra deps into package.json and feed that into
13-# node2nix.
14-#
15-# Also jshon does funny things with slashes in strings, which can be
16-# fixed with sed.
17-18-VERSION="3.0.0"
19-URL="https://registry.npmjs.org/pump.io/-/pump.io-$VERSION.tgz"
20-SHA1="ycfm7ak83xi8mgafhp9q0n6n3kzmdz16"
21-22-curl https://raw.githubusercontent.com/e14n/pump.io/v$VERSION/package.json | \
23- jshon -e dependencies \
24- -s '*' -i databank-mongodb \
25- -s '*' -i databank-redis \
26- -s '*' -i databank-lrucache \
27- -p | sed 's=\\/=/=g' > full-package.json
28-29-node2nix --input full-package.json --composition composition.nix --node-env ../../../development/node-packages/node-env.nix
30-31-# overriding nodePackages src doesn't seem to work, so...
32-sed -i "s|src = ./.|src = fetchurl { url = \"$URL\"; sha1 = \"$SHA1\"; }|" node-packages.nix
33-34-# fetchgit or node2nix is having problems with submodules or something.
35-# This is the sha256 for connect-auth which is a npm dep hosted on
36-# github and containing submodules.
37-sed -i "s|d08fecbb72aff14ecb39dc310e8965ba92228f0c0def41fbde3db5ea7a1aac19|1b052xpj10hanx21286i5w0jrwxxkiwbdzpdngg9s2j1m7a9543b|" node-packages.nix