2022-10-21 18:38:19 +00:00
|
|
|
{ lib, fetchFromGitHub, buildGoModule, callPackage, enableWebui ? true }:
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "rmfakecloud";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "0.0.17";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ddvk";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
sha256 = "sha256-Rb81CbtC1V8AugTNIGx07CvK20sZ5d4hfc4OxF259IQ=";
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
vendorHash = "sha256-Rr2EVrQOdlOqSlTpXFMfnKNmdw6UiT7LZH0xBUwqkJc=";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
ui = callPackage ./webui.nix { inherit version src; };
|
|
|
|
|
|
|
|
postPatch = if enableWebui then ''
|
|
|
|
mkdir -p ui/build
|
|
|
|
cp -r ${ui}/* ui/build
|
|
|
|
'' else ''
|
2022-02-20 05:27:41 +00: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 ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "rmfakecloud";
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
}
|