1{
2 lib,
3 blueprint-compiler,
4 cargo,
5 desktop-file-utils,
6 fetchFromGitLab,
7 libadwaita,
8 meson,
9 ninja,
10 nix-update-script,
11 pkg-config,
12 rustPlatform,
13 rustc,
14 stdenv,
15 wrapGAppsHook4,
16}:
17stdenv.mkDerivation (finalAttrs: {
18 pname = "chance";
19 version = "4.0.1";
20
21 src = fetchFromGitLab {
22 owner = "zelikos";
23 repo = "rollit";
24 rev = "refs/tags/${finalAttrs.version}";
25 hash = "sha256-25+/TvTba/QF7+QE8+O7u4yc9BNi0pcZeNj11dGkEfg=";
26 };
27
28 cargoDeps = rustPlatform.fetchCargoVendor {
29 inherit (finalAttrs) src;
30 hash = "sha256-ObT3l/Exk6UzUGmzCed7mJ7hVzg8CsQIT3fe1RIUfIM=";
31 };
32
33 nativeBuildInputs = [
34 blueprint-compiler
35 cargo
36 desktop-file-utils
37 meson
38 ninja
39 pkg-config
40 rustPlatform.cargoSetupHook
41 rustc
42 wrapGAppsHook4
43 ];
44
45 buildInputs = [
46 libadwaita
47 ];
48
49 passthru.updateScript = nix-update-script { };
50
51 meta = {
52 description = "Dice roller built using GTK4 and libadwaita";
53 homepage = "https://gitlab.com/zelikos/rollit";
54 changelog = "https://gitlab.com/zelikos/rollit/-/releases/${finalAttrs.version}";
55 license = lib.licenses.gpl3Only;
56 maintainers = with lib.maintainers; [ Guanran928 ];
57 mainProgram = "rollit";
58 platforms = lib.platforms.linux;
59 };
60})