mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 22:23:15 +00:00
b3b5eced13
Previously rmfakecloud was built without the web ui making it show 404 when attempting to use it. Build it similar to how other projects using yarn are built in a separate package and make it optional.
36 lines
873 B
Nix
36 lines
873 B
Nix
{ lib, fetchFromGitHub, buildGoModule, callPackage, enableWebui ? true }:
|
|
|
|
buildGoModule rec {
|
|
pname = "rmfakecloud";
|
|
version = "0.0.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ddvk";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-SefgXJUe0fh4BW7vOIKW6O26oEngq/1+dAYStBfkKao=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-NwDaPpjkQogXE37RGS3zEALlp3NuXP9RW//vbwM6y0A=";
|
|
|
|
ui = callPackage ./webui.nix { inherit version src; };
|
|
|
|
postPatch = if enableWebui then ''
|
|
mkdir -p ui/build
|
|
cp -r ${ui}/* ui/build
|
|
'' else ''
|
|
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 ];
|
|
};
|
|
}
|