Files
nixpkgs/pkgs/by-name/gc/gcs/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

83 lines
1.9 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
nix-update-script,
pkg-config,
libGL,
libX11,
libXcursor,
libXrandr,
libXinerama,
libXi,
libXxf86vm,
mupdf,
fontconfig,
freetype,
}:
buildGoModule rec {
pname = "gcs";
version = "5.39.0";
src = fetchFromGitHub {
owner = "richardwilkes";
repo = "gcs";
tag = "v${version}";
hash = "sha256-R0IFIGDSpKxNmcDUMVdtKV+M3I8tglBhyHj5XXe2rjg=";
};
modPostBuild = ''
chmod +w vendor/github.com/richardwilkes/pdf
sed -i 's|-lmupdf[^ ]* |-lmupdf |g' vendor/github.com/richardwilkes/pdf/pdf.go
'';
vendorHash = "sha256-llbBYO1dNPm+k8WEfao6qyDtQZbcmueNwFBuIpaMvFQ=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
mupdf
]
++ lib.optionals stdenv.hostPlatform.isLinux [
libGL
libX11
libXcursor
libXrandr
libXinerama
libXi
libXxf86vm
fontconfig
freetype
];
# flags are based on https://github.com/richardwilkes/gcs/blob/master/build.sh
flags = [ "-a" ];
ldflags = [
"-s"
"-w"
"-X github.com/richardwilkes/toolbox/cmdline.AppVersion=${version}"
];
installPhase = ''
runHook preInstall
install -Dm755 $GOPATH/bin/gcs -t $out/bin
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
changelog = "https://github.com/richardwilkes/gcs/releases/tag/v${version}";
description = "Stand-alone, interactive, character sheet editor for the GURPS 4th Edition roleplaying game system";
homepage = "https://gurpscharactersheet.com/";
license = lib.licenses.mpl20;
mainProgram = "gcs";
maintainers = with lib.maintainers; [ tomasajt ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
# incompatible vendor/github.com/richardwilkes/unison/internal/skia/libskia_linux.a
broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64;
};
}