diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-05-05 17:45:15 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-05-05 17:45:15 +0200 |
commit | f0ead6efed2ce7078302b825ad6b98fbbeebc693 (patch) | |
tree | bf179638e23db1842284430970732034600c0a1c /app/cryptpad/build/default.nix | |
parent | f27636dd14cc06b84f1564f48c148be7394540b3 (diff) | |
download | infrastructure-f0ead6efed2ce7078302b825ad6b98fbbeebc693.tar.gz infrastructure-f0ead6efed2ce7078302b825ad6b98fbbeebc693.zip |
WIP Cryptpad packaging
Diffstat (limited to 'app/cryptpad/build/default.nix')
-rw-r--r-- | app/cryptpad/build/default.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app/cryptpad/build/default.nix b/app/cryptpad/build/default.nix new file mode 100644 index 0000000..2069a58 --- /dev/null +++ b/app/cryptpad/build/default.nix @@ -0,0 +1,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; + } + |