base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / fo / forecast / package.nix
blob9caca19cafdb38bd1bf377d419f15044ae3ca223
2   lib,
3   stdenv,
4   rustPlatform,
5   fetchFromGitHub,
7   # nativeBuildInputs
8   autoPatchelfHook,
9   just,
10   pkg-config,
11   wrapGAppsHook3,
13   # buildInputs
14   libxkbcommon,
15   openssl,
16   vulkan-loader,
17   wayland,
18   nix-update-script,
20   cosmic-icons,
23 rustPlatform.buildRustPackage rec {
24   pname = "forecast";
25   version = "0-unstable-2024-09-23";
27   src = fetchFromGitHub {
28     owner = "cosmic-utils";
29     repo = "forecast";
30     rev = "d3c274932847aa101fb7aacf1d01ded265b6fad4";
31     hash = "sha256-6hlh9T0h1Yi8io2sMU/r8uMtP6isH6JJxE5LvZrj9Cs=";
32   };
34   cargoLock = {
35     lockFile = ./Cargo.lock;
36     outputHashes = {
37       "accesskit-0.12.2" = "sha256-1UwgRyUe0PQrZrpS7574oNLi13fg5HpgILtZGW6JNtQ=";
38       "atomicwrites-0.4.2" = "sha256-QZSuGPrJXh+svMeFWqAXoqZQxLq/WfIiamqvjJNVhxA=";
39       "clipboard_macos-0.1.0" = "sha256-cG5vnkiyDlQnbEfV2sPbmBYKv1hd3pjJrymfZb8ziKk=";
40       "cosmic-config-0.1.0" = "sha256-zamYPvxmIqh4IT4G+aqceP1mXNNBA1TAcJwAtjlbYAU=";
41       "cosmic-text-0.12.1" = "sha256-5Gk220HTiHuxDvyqwz1Dwr+BaLvH/6X7M14IirQzcsE=";
42       "d3d12-0.19.0" = "sha256-usrxQXWLGJDjmIdw1LBXtBvX+CchZDvE8fHC0LjvhD4=";
43       "glyphon-0.5.0" = "sha256-j1HrbEpUBqazWqNfJhpyjWuxYAxkvbXzRKeSouUoPWg=";
44       "smithay-clipboard-0.8.0" = "sha256-4InFXm0ahrqFrtNLeqIuE3yeOpxKZJZx+Bc0yQDtv34=";
45       "softbuffer-0.4.1" = "sha256-a0bUFz6O8CWRweNt/OxTvflnPYwO5nm6vsyc/WcXyNg=";
46       "taffy-0.3.11" = "sha256-SCx9GEIJjWdoNVyq+RZAGn0N71qraKZxf9ZWhvyzLaI=";
47       "winit-0.29.10" = "sha256-ScTII2AzK3SC8MVeASZ9jhVWsEaGrSQ2BnApTxgfxK4=";
48     };
49   };
51   nativeBuildInputs = [
52     autoPatchelfHook
53     just
54     pkg-config
55     wrapGAppsHook3
56   ];
58   dontUseJustBuild = true;
59   dontUseJustCheck = true;
61   buildInputs = [
62     libxkbcommon
63     openssl
64     vulkan-loader
65     wayland
66   ];
68   env = {
69     # COSMIC applications now uses vergen for the About page
70     VERGEN_GIT_COMMIT_DATE = "1970-01-01";
71     VERGEN_GIT_SHA = src.rev;
72   };
74   runtimeDependencies = [
75     libxkbcommon
76     wayland
77   ];
79   postFixup = ''
80     wrapProgram $out/bin/cosmic-ext-forecast \
81       --suffix XDG_DATA_DIRS : "${cosmic-icons}/share"
82   '';
84   justFlags = [
85     "--set"
86     "prefix"
87     (placeholder "out")
88     "--set"
89     "bin-src"
90     "target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-ext-forecast"
91   ];
93   passthru = {
94     updateScript = nix-update-script { };
95   };
97   meta = {
98     description = "Weather app written in rust and libcosmic";
99     homepage = "https://github.com/cosmic-utils/forecast";
100     license = lib.licenses.gpl3Only;
101     maintainers = with lib.maintainers; [ GaetanLepage ];
102     platforms = lib.platforms.linux;
103     mainProgram = "cosmic-ext-forecast";
104   };