2022-09-08 15:19:15 +02:00
|
|
|
{ lib, fetchFromGitHub, buildGoModule, callPackage, enableWebui ? true }:
|
2022-01-22 02:07:22 +01:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "rmfakecloud";
|
2022-10-29 05:03:19 +02:00
|
|
|
version = "0.0.11";
|
2022-01-22 02:07:22 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ddvk";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-10-29 05:03:19 +02:00
|
|
|
sha256 = "sha256-TkVwhKRTe0W5IHnxJyhW5DM8B8zU2rPUz61K7KlnJN0=";
|
2022-01-22 02:07:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
vendorSha256 = "sha256-NwDaPpjkQogXE37RGS3zEALlp3NuXP9RW//vbwM6y0A=";
|
|
|
|
|
2022-09-08 15:19:15 +02:00
|
|
|
ui = callPackage ./webui.nix { inherit version src; };
|
|
|
|
|
|
|
|
postPatch = if enableWebui then ''
|
|
|
|
mkdir -p ui/build
|
|
|
|
cp -r ${ui}/* ui/build
|
|
|
|
'' else ''
|
2022-01-22 02:07:22 +01:00
|
|
|
sed -i '/go:/d' ui/assets.go
|
|
|
|
'';
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s" "-w" "-X main.version=v${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Host your own cloud for the Remarkable";
|
|
|
|
homepage = "https://ddvk.github.io/rmfakecloud/";
|
|
|
|
license = licenses.agpl3Only;
|
|
|
|
maintainers = with maintainers; [ pacien martinetd ];
|
|
|
|
};
|
|
|
|
}
|