Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 desktop-file-utils,
4 fetchFromGitHub,
5 fetchYarnDeps,
6 fixup_yarn_lock,
7 gjs,
8 glib-networking,
9 gobject-introspection,
10 gst_all_1,
11 gtk4,
12 libadwaita,
13 libsoup_3,
14 meson,
15 ninja,
16 pkg-config,
17 stdenv,
18 wrapGAppsHook4,
19 yarn,
20 nodejs,
21}:
22
23stdenv.mkDerivation rec {
24 pname = "sticky-notes";
25 version = "0.2.7";
26
27 src = fetchFromGitHub {
28 owner = "vixalien";
29 repo = "sticky";
30 rev = "v${version}";
31 hash = "sha256-82Yxw8NSw82rxhuAgsdN2lCiQ/hli4tQiU6jCgGyp4U=";
32 fetchSubmodules = true;
33 };
34
35 nativeBuildInputs = [
36 desktop-file-utils
37 gobject-introspection
38 meson
39 ninja
40 nodejs
41 pkg-config
42 wrapGAppsHook4
43 yarn
44 fixup_yarn_lock
45 ];
46
47 buildInputs = [
48 gjs
49 glib-networking
50 gst_all_1.gst-plugins-base
51 gst_all_1.gst-plugins-good
52 gst_all_1.gst-plugins-bad
53 gtk4
54 libadwaita
55 libsoup_3
56 ];
57
58 yarnOfflineCache = fetchYarnDeps {
59 yarnLock = src + "/yarn.lock";
60 hash = "sha256-NDGuG2rXJH0bHsD7yQMY6HAZDkMq0j63SYVz8+X3fPQ=";
61 };
62
63 preConfigure = ''
64 export HOME="$PWD"
65 yarn config --offline set yarn-offline-mirror $yarnOfflineCache
66 fixup_yarn_lock yarn.lock
67 '';
68
69 mesonFlags = [
70 "-Dyarnrc=../.yarnrc"
71 ];
72
73 postPatch = ''
74 meson rewrite kwargs set project / version '${version}'
75 '';
76
77 postFixup = ''
78 sed -i "1 a imports.package._findEffectiveEntryPointName = () => 'com.vixalien.sticky';" $out/bin/.com.vixalien.sticky-wrapped
79 '';
80
81 meta = {
82 description = "Simple sticky notes app for GNOME";
83 homepage = "https://github.com/vixalien/sticky";
84 changelog = "https://github.com/vixalien/sticky/releases/tag/v${version}";
85 license = lib.licenses.mit;
86 maintainers = with lib.maintainers; [ pokon548 ];
87 mainProgram = "com.vixalien.sticky";
88 platforms = lib.platforms.linux;
89 };
90}