···11-# This file has been generated by node2nix 1.2.0. Do not edit!
22-33-{pkgs ? import <nixpkgs> {
44- inherit system;
55- }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-6_x"}:
66-77-let
88- nodeEnv = import ../../../development/node-packages/node-env.nix {
99- inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
1010- inherit nodejs;
1111- };
1212-in
1313-import ./node-packages.nix {
1414- inherit (pkgs) fetchurl fetchgit;
1515- inherit nodeEnv;
1616-}
-53
pkgs/servers/web-apps/pump.io/default.nix
···11-{ pkgs, system, stdenv, fetchurl, makeWrapper, nodejs, graphicsmagick }:
22-33-with stdenv.lib;
44-55-let
66- # To regenerate composition.nix, run generate.sh.
77- nodePackages = import ./composition.nix {
88- inherit pkgs system nodejs;
99- };
1010-in
1111-nodePackages.package.override (oldAttrs: {
1212- buildInputs = oldAttrs.buildInputs ++ [ makeWrapper ];
1313-1414- postInstall = ''
1515- for prog in pump pump-authorize pump-follow pump-post-note pump-register-app pump-register-user pump-stop-following; do
1616- wrapProgram "$out/bin/$prog" \
1717- --prefix PATH : ${graphicsmagick}/bin:$out/bin
1818- done
1919- '';
2020-2121- passthru.names = ["pump.io"];
2222-2323- meta = {
2424- description = "Social server with an ActivityStreams API";
2525- homepage = http://pump.io/;
2626- license = licenses.asl20;
2727- platforms = platforms.unix;
2828- maintainers = [ maintainers.rvl ];
2929- longDescription = ''
3030- This is pump.io. It's a stream server that does most of what
3131- people really want from a social network.
3232-3333- What's it for?
3434-3535- I post something and my followers see it. That's the rough idea
3636- behind the pump.
3737-3838- There's an API defined in the API.md file. It uses
3939- activitystrea.ms JSON as the main data and command format.
4040-4141- You can post almost anything that can be represented with
4242- activity streams -- short or long text, bookmarks, images,
4343- video, audio, events, geo checkins. You can follow friends,
4444- create lists of people, and so on.
4545-4646- The software is useful for at least these scenarios:
4747-4848- * Mobile-first social networking
4949- * Activity stream functionality for an existing app
5050- * Experimenting with social software
5151- '';
5252- };
5353-})
-37
pkgs/servers/web-apps/pump.io/generate.sh
···11-#! /usr/bin/env nix-shell
22-#! nix-shell -i bash -p nodePackages.node2nix curl jshon
33-44-set -e
55-66-# Normally, this node2nix invocation would be sufficient:
77-# exec node2nix --input node-packages.json --composition composition.nix
88-#
99-# But pump.io soft-depends on extra modules, which have to be *inside*
1010-# its own node_modules, not beside them.
1111-#
1212-# So we hack these extra deps into package.json and feed that into
1313-# node2nix.
1414-#
1515-# Also jshon does funny things with slashes in strings, which can be
1616-# fixed with sed.
1717-1818-VERSION="3.0.0"
1919-URL="https://registry.npmjs.org/pump.io/-/pump.io-$VERSION.tgz"
2020-SHA1="ycfm7ak83xi8mgafhp9q0n6n3kzmdz16"
2121-2222-curl https://raw.githubusercontent.com/e14n/pump.io/v$VERSION/package.json | \
2323- jshon -e dependencies \
2424- -s '*' -i databank-mongodb \
2525- -s '*' -i databank-redis \
2626- -s '*' -i databank-lrucache \
2727- -p | sed 's=\\/=/=g' > full-package.json
2828-2929-node2nix --input full-package.json --composition composition.nix --node-env ../../../development/node-packages/node-env.nix
3030-3131-# overriding nodePackages src doesn't seem to work, so...
3232-sed -i "s|src = ./.|src = fetchurl { url = \"$URL\"; sha1 = \"$SHA1\"; }|" node-packages.nix
3333-3434-# fetchgit or node2nix is having problems with submodules or something.
3535-# This is the sha256 for connect-auth which is a npm dep hosted on
3636-# github and containing submodules.
3737-sed -i "s|d08fecbb72aff14ecb39dc310e8965ba92228f0c0def41fbde3db5ea7a1aac19|1b052xpj10hanx21286i5w0jrwxxkiwbdzpdngg9s2j1m7a9543b|" node-packages.nix