blob: 2069a5887ce68cc3b2b74403c0e824846c5bca09 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
let
common = import ./common.nix;
pkgs = import common.pkgsSrc {};
nodejs = pkgs.${common.nodejs};
in
pkgs.stdenv.mkDerivation {
name = "cryptpad";
src = ./cryptpad;
installPhase = ''
mkdir -p $out/{bin,opt}
cp -r config customize.dist lib node_modules package.json package-lock.json server.js www $out/opt/
ln -s / $out/opt/root
cat > $out/bin/cryptpad <<EOF
cd $out/opt/
#!${pkgs.bash}/bin/bash
${nodejs}/bin/node server.js
EOF
chmod +x $out/bin/cryptpad
'';
dontFixup = true;
}
|