2021-03-09 03:18:52 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, fetchurl, makeWrapper, runCommand }:
|
|
|
|
|
|
|
|
let
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "1.3.7";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "root-gg";
|
|
|
|
repo = "plik";
|
|
|
|
rev = version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-Agkwo1oat1LDP6EJBVOoq+d+p80BGOLS4K7WTue5Nbg=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
vendorHash = null;
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://plik.root.gg/";
|
|
|
|
description = "Scalable & friendly temporary file upload system";
|
|
|
|
maintainers = with maintainers; [ freezeboy ];
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
2022-06-26 10:26:21 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace server/common/version.go \
|
|
|
|
--replace '"0.0.0"' '"${version}"'
|
|
|
|
'';
|
|
|
|
|
2022-01-25 03:21:06 +00:00
|
|
|
in
|
|
|
|
{
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
plik = buildGoModule {
|
|
|
|
pname = "plik";
|
2023-07-15 17:15:38 +00:00
|
|
|
inherit version meta src vendorHash postPatch;
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
subPackages = [ "client" ];
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/client $out/bin/plik
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
plikd-unwrapped = buildGoModule {
|
|
|
|
pname = "plikd-unwrapped";
|
2023-07-15 17:15:38 +00:00
|
|
|
inherit version src vendorHash postPatch;
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
subPackages = [ "server" ];
|
|
|
|
postFixup = ''
|
|
|
|
mv $out/bin/server $out/bin/plikd
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|