Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 96 lines 2.0 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, alsa-lib 5, appstream-glib 6, cargo 7, cmake 8, desktop-file-utils 9, glib 10, gstreamer 11, gtk4 12, libadwaita 13, libxml2 14, meson 15, ninja 16, pkg-config 17, poppler 18, python3 19, rustPlatform 20, rustc 21, shared-mime-info 22, wrapGAppsHook4 23, AudioUnit 24}: 25 26stdenv.mkDerivation rec { 27 pname = "rnote"; 28 version = "0.6.0"; 29 30 src = fetchFromGitHub { 31 owner = "flxzt"; 32 repo = "rnote"; 33 rev = "v${version}"; 34 hash = "sha256-47mWlUXp62fMh5c13enFjmuMxzrmEZlwJFsZhYCB1Vs="; 35 }; 36 37 cargoDeps = rustPlatform.importCargoLock { 38 lockFile = ./Cargo.lock; 39 outputHashes = { 40 "ink-stroke-modeler-rs-0.1.0" = "sha256-DrbFolHGL3ywk2p6Ly3x0vbjqxy1mXld+5CPrNlJfQM="; 41 "librsvg-2.56.0" = "sha256-4poP7xsoylmnKaUWuJ0tnlgEMpw9iJrM3dvt4IaFi7w="; 42 "piet-0.6.2" = "sha256-If0qiZkgXeLvsrECItV9/HmhTk1H52xmVO7cUsD9dcU="; 43 }; 44 }; 45 46 nativeBuildInputs = [ 47 appstream-glib # For appstream-util 48 cmake 49 desktop-file-utils # For update-desktop-database 50 meson 51 ninja 52 pkg-config 53 python3 # For the postinstall script 54 rustPlatform.bindgenHook 55 rustPlatform.cargoSetupHook 56 cargo 57 rustc 58 shared-mime-info # For update-mime-database 59 wrapGAppsHook4 60 ]; 61 62 dontUseCmakeConfigure = true; 63 64 mesonFlags = [ 65 (lib.mesonBool "cli" true) 66 ]; 67 68 buildInputs = [ 69 glib 70 gstreamer 71 gtk4 72 libadwaita 73 libxml2 74 poppler 75 ] ++ lib.optionals stdenv.isLinux [ 76 alsa-lib 77 ] ++ lib.optionals stdenv.isDarwin [ 78 AudioUnit 79 ]; 80 81 postPatch = '' 82 pushd build-aux 83 chmod +x cargo_build.py meson_post_install.py 84 patchShebangs cargo_build.py meson_post_install.py 85 popd 86 ''; 87 88 meta = with lib; { 89 homepage = "https://github.com/flxzt/rnote"; 90 changelog = "https://github.com/flxzt/rnote/releases/tag/${src.rev}"; 91 description = "Simple drawing application to create handwritten notes"; 92 license = licenses.gpl3Plus; 93 maintainers = with maintainers; [ dotlambda yrd ]; 94 platforms = platforms.unix; 95 }; 96}