From 4437afa42368f5076fee69d06d61620988600e2e Mon Sep 17 00:00:00 2001 From: pacien Date: Sat, 22 Jan 2022 02:07:22 +0100 Subject: [PATCH] rmfakecloud: init at 0.0.7 The package only includes the server software. It does not include the optional JavaScript web user interface, which is relatively hard to build on NixOS. --- pkgs/servers/rmfakecloud/default.nix | 31 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/servers/rmfakecloud/default.nix diff --git a/pkgs/servers/rmfakecloud/default.nix b/pkgs/servers/rmfakecloud/default.nix new file mode 100644 index 000000000000..b3055cf566c0 --- /dev/null +++ b/pkgs/servers/rmfakecloud/default.nix @@ -0,0 +1,31 @@ +{ lib, fetchFromGitHub, buildGoModule }: + +buildGoModule rec { + pname = "rmfakecloud"; + version = "0.0.7"; + + src = fetchFromGitHub { + owner = "ddvk"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-Ax+eozbAIE3425ndT4z4fVBMwzLN7iR5fTz8rz60zWg="; + }; + + vendorSha256 = "sha256-NwDaPpjkQogXE37RGS3zEALlp3NuXP9RW//vbwM6y0A="; + + postPatch = '' + # skip including the JS SPA, which is difficult to build + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 751a4c1c4971..7eea77cdfcf0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33572,6 +33572,8 @@ with pkgs; ricty = callPackage ../data/fonts/ricty { }; + rmfakecloud = callPackage ../servers/rmfakecloud { }; + rmfuse = callPackage ../tools/filesystems/rmfuse {}; rmount = callPackage ../tools/filesystems/rmount {};