Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchFromGitHub 4, fetchpatch 5, buildPythonApplication 6, appstream-glib 7, dbus-python 8, desktop-file-utils 9, gettext 10, glib 11, gobject-introspection 12, gtk3 13, hicolor-icon-theme 14, libappindicator 15, libhandy 16, meson 17, ninja 18, pkg-config 19, pygobject3 20, pyxdg 21, systemd 22, wrapGAppsHook 23}: 24 25buildPythonApplication rec { 26 pname = "cpupower-gui"; 27 version = "1.0.0"; 28 29 # This packages doesn't have a setup.py 30 format = "other"; 31 32 src = fetchFromGitHub { 33 owner = "vagnum08"; 34 repo = pname; 35 rev = "v${version}"; 36 sha256 = "05lvpi3wgyi741sd8lgcslj8i7yi3wz7jwl7ca3y539y50hwrdas"; 37 }; 38 39 patches = [ 40 # Fix build with 0.61, can be removed on next update 41 # https://hydra.nixos.org/build/171052557/nixlog/1 42 (fetchpatch { 43 url = "https://github.com/vagnum08/cpupower-gui/commit/97f8ac02fe33e412b59d3f3968c16a217753e74b.patch"; 44 sha256 = "XYnpm03kq8JLMjAT73BMCJWlzz40IAuHESm715VV6G0="; 45 }) 46 ]; 47 48 nativeBuildInputs = [ 49 appstream-glib 50 desktop-file-utils # needed for update-desktop-database 51 gettext 52 glib # needed for glib-compile-schemas 53 gobject-introspection # need for gtk namespace to be available 54 hicolor-icon-theme # needed for postinstall script 55 meson 56 ninja 57 pkg-config 58 wrapGAppsHook 59 60 # Python packages 61 dbus-python 62 libappindicator 63 pygobject3 64 pyxdg 65 ]; 66 67 buildInputs = [ 68 glib 69 gtk3 70 libhandy 71 ]; 72 73 propagatedBuildInputs = [ 74 dbus-python 75 libappindicator 76 pygobject3 77 pyxdg 78 ]; 79 80 mesonFlags = [ 81 "-Dsystemddir=${placeholder "out"}/lib/systemd" 82 ]; 83 84 preConfigure = '' 85 patchShebangs build-aux/meson/postinstall.py 86 ''; 87 88 strictDeps = false; 89 dontWrapGApps = true; 90 91 makeWrapperArgs = [ "\${gappsWrapperArgs[@]}" ]; 92 93 postFixup = '' 94 wrapPythonProgramsIn $out/lib "$out $propagatedBuildInputs" 95 ''; 96 97 meta = with lib; { 98 description = "Change the frequency limits of your cpu and its governor"; 99 homepage = "https://github.com/vagnum08/cpupower-gui/"; 100 license = licenses.gpl3Plus; 101 maintainers = with maintainers; [ unode ]; 102 }; 103}