Skip to content

Commit

Permalink
talenet: init at 0.9.0-beta1.1
Browse files Browse the repository at this point in the history
updates NixOS#46062

depends on NixOS#45997
  • Loading branch information
cryptix committed Sep 11, 2018
1 parent b096895 commit 01722f4
Show file tree
Hide file tree
Showing 6 changed files with 8,226 additions and 0 deletions.
81 changes: 81 additions & 0 deletions pkgs/applications/networking/ssb/talenet/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchurl
, fetchgit

, runCommand
, writeTextFile
, makeDesktopItem
, utillinux
, python2


, electron
, nodejs-6_x
# auxilary dep to scuttle-shell - needs to avail at runtime
, systrayhelper
}:

let
# might become a problem with electron once this builds
# just a workaround anyway: https://github.com/svanderburg/node2nix/issues/106#issuecomment-418707444
nodejs = nodejs-6_x;

# generated by node2nix with added propagated deps
taleNodeEnv = (import ./node2nix-taleEnv.nix {
inherit fetchurl fetchgit nodejs systrayhelper lib stdenv python2 utillinux runCommand writeTextFile;

});
taleNodePkg = taleNodeEnv.package.overrideAttrs (oldAttrs: rec {
postInstall = "cd $out/lib/node_modules/talenet && ${nodejs}/bin/node .electron-vue/build.js";
});

in stdenv.mkDerivation rec {
name = "talenet-${version}";
version = "v0.9.0-beta1.1";

src = fetchFromGitHub {
rev = version;
owner = "talenet";
repo = "talenet";
sha256 = "0aqyvskisbj91drv27dmqyydwl5plm9rylym3jcwkggw58cdlkaz";
};

desktopItem = makeDesktopItem {
name = "talenet";
exec = "talenet";
icon = "$out/share/talenet/";
comment = "Decentralized messanging and sharing app";
desktopName = "tale:net";
genericName = "Talenet";
categories = "Network;";
};

phases = [ "installPhase" ];

buildIntputs = [ nodejs taleNodePkg electron];

installPhase = ''
mkdir -p $out/npmInstall
cd $out/npmInstall
ls ${taleNodePkg}
${electron}/bin/electron ${taleNodePkg}/dist
'';
# TODO mkwrapper electron?

# fixupPhase = ''
# patchelf \
# --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
# --set-rpath ${rpath}:$out/libexec \
# $out/node_modules/.bin/talenet
# '';

meta = {
description = "The intergalactic skill & idea sharing community.";
homepage = https://t4l3.net;
license = lib.licenses.agpl3;
maintainers = with lib.maintainers; [ cryptix ];
platforms = [ "x86_64-linux" ];
};
}
Loading

0 comments on commit 01722f4

Please sign in to comment.