nixpkgs/pkgs/by-name/rm/rmfakecloud/package.nix
nicoo 2641d97cbf pkgs/by-name: Convert hashes to SRI format
Reproduction script:
	# Bulk rewrite
	./maintainers/scripts/sha-to-sri.py pkgs/by-name
	# Revert some packages which will need manual intervention
	for n in amdvlk azure-cli cargo-profiler corefonts flatito fluxcd gist perf_data_converter protoc-gen-js solana-cli swt verible; do
		git checkout -- "pkgs/by-name/${n:0:2}/${n}"
	done
2024-09-15 11:24:31 +02:00

37 lines
903 B
Nix

{ lib, fetchFromGitHub, buildGoModule, callPackage, enableWebui ? true }:
buildGoModule rec {
pname = "rmfakecloud";
version = "0.0.18";
src = fetchFromGitHub {
owner = "ddvk";
repo = pname;
rev = "v${version}";
hash = "sha256-J8oB5C5FYZTVq9zopHoL6WYpfTyiiyrQ4YSGu+2eaKw=";
};
vendorHash = "sha256-S43qNDAlDWhrkfSffCooveemR1Z7KXS18t97UoolgBM=";
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 ];
mainProgram = "rmfakecloud";
};
}