You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
859 B
Nix

{ pkgs, errorPath, ... }:
let
configuration = builtins.toFile "pastebin-stream-config.json" (builtins.toJSON {
errors = {
directory = errorPath;
};
scraperSettings = {
pastebinCom = {
listInterval = 60;
listLimit = 100;
pasteInterval = 1;
};
};
});
in pkgs.cryto.nodeApplication {
name = "pastebin-stream";
source = pkgs.stdenv.mkDerivation {
name = "pastebin-stream-application";
src = pkgs.cryto.fetchFromCrytoGit {
owner = "joepie91";
repo = "pastebin-stream";
rev = "40615402511bf6655f8420dd5f0908dfbcf7a406";
sha256 = "1qkqbldgr3lwv8xq6mijzwv7kcnpp54x695dp6i6bm4skijyzqnm";
};
# TODO: Move this logic into fetchFromCrytoGit somehow
buildCommand = ''
mkdir -p $out
tar --strip-components=1 -xzvf $src -C $out
cp ${configuration} $out/config.json
'';
};
}