summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs/bruellwuerfel/default.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2020-04-17 19:21:16 +0200
committertv <tv@krebsco.de>2020-04-17 19:21:16 +0200
commite1bfdd8d839929538d36e421908a96407b3aa0ab (patch)
tree557bf9a711f06997e846a5ef14a4105248f1da8c /lass/5pkgs/bruellwuerfel/default.nix
parent6ace0f7b6941c1c9476d84944cdba8bedf98d95d (diff)
parent07f18d851a974ee594c92e3332f167ef3b1d259f (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'lass/5pkgs/bruellwuerfel/default.nix')
-rw-r--r--lass/5pkgs/bruellwuerfel/default.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/lass/5pkgs/bruellwuerfel/default.nix b/lass/5pkgs/bruellwuerfel/default.nix
new file mode 100644
index 000000000..cb8f08fa8
--- /dev/null
+++ b/lass/5pkgs/bruellwuerfel/default.nix
@@ -0,0 +1,26 @@
+{ yarn2nix-moretea, fetchFromGitHub, nodePackages, nodejs }: let
+ #src = ~/src/bruellwuerfel;
+ src = fetchFromGitHub {
+ owner = "krebs";
+ repo = "bruellwuerfel";
+ rev = "57e20e630f732ce4e15b495ec5f9bf72a121b959";
+ sha256 = "08zwwl24sq21r497a03lqpy2x10az8frrsh6d38xm92snd1yf85b";
+ };
+
+in yarn2nix-moretea.mkYarnModules rec {
+ pname = "bruellwuerfel";
+ version = "1.0";
+ name = "${pname}-${version}";
+ packageJSON = "${src}/package.json";
+ yarnLock = "${src}/yarn.lock";
+ postBuild = ''
+ cp -r ${src}/{src,tsconfig.json} $out/
+ cd $out
+ ${nodePackages.typescript}/bin/tsc || :
+ mkdir -p $out/bin
+ echo '#!/bin/sh' > $out/bin/bruellwuerfel
+ echo "export NODE_PATH=$out/dist" >> $out/bin/bruellwuerfel
+ echo "${nodejs}/bin/node $out/dist/index.js" >> $out/bin/bruellwuerfel
+ chmod +x $out/bin/bruellwuerfel
+ '';
+}