1{
2 lib,
3 stdenvNoCC,
4 fetchFromGitHub,
5 nixosTests,
6 nix-update-script,
7}:
8
9stdenvNoCC.mkDerivation (finalAttrs: {
10 pname = "privatebin";
11 version = "1.7.8";
12
13 src = fetchFromGitHub {
14 owner = "PrivateBin";
15 repo = "PrivateBin";
16 tag = finalAttrs.version;
17 hash = "sha256-/28uzEDVEn7uy8c6/oCMFjKDJFPyHH50f890cc6fmjg=";
18 };
19
20 installPhase = ''
21 runHook preInstall
22 mkdir -p $out
23 cp -R $src/* $out
24 runHook postInstall
25 '';
26
27 passthru = {
28 tests = nixosTests.privatebin;
29 updateScript = nix-update-script { };
30 };
31
32 meta = {
33 changelog = "https://github.com/PrivateBin/PrivateBin/releases/tag/${finalAttrs.version}";
34 description = "Minimalist, open source online pastebin where the server has zero knowledge of pasted data";
35 homepage = "https://privatebin.info";
36 license = with lib.licenses; [
37 # privatebin
38 zlib
39 # dependencies, see https://github.com/PrivateBin/PrivateBin/blob/master/LICENSE.md
40 gpl2Only
41 bsd3
42 mit
43 asl20
44 cc-by-40
45 ];
46 maintainers = with lib.maintainers; [
47 savyajha
48 defelo
49 ];
50 };
51})