nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 61 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 pkg-config, 6 rofi-unwrapped, 7 libqalculate, 8 glib, 9 cairo, 10 gobject-introspection, 11 wrapGAppsHook3, 12 meson, 13 ninja, 14}: 15 16stdenv.mkDerivation rec { 17 pname = "rofi-calc"; 18 version = "2.4.0"; 19 20 src = fetchFromGitHub { 21 owner = "svenstaro"; 22 repo = "rofi-calc"; 23 rev = "v${version}"; 24 sha256 = "sha256-iTLi76GinRASawPSWAqmxSwLZPGvHesarHNoqO4m4dM="; 25 }; 26 27 nativeBuildInputs = [ 28 pkg-config 29 gobject-introspection 30 wrapGAppsHook3 31 meson 32 ninja 33 ]; 34 35 buildInputs = [ 36 rofi-unwrapped 37 libqalculate 38 glib 39 cairo 40 ]; 41 42 mesonBuildType = "release"; 43 44 postPatch = '' 45 substituteInPlace src/calc.c --replace-fail \ 46 "qalc_binary = \"qalc\"" \ 47 "qalc_binary = \"${lib.getExe libqalculate}\"" 48 49 substituteInPlace src/meson.build --replace-fail \ 50 "rofi.get_variable('pluginsdir')" \ 51 "'$out/lib/rofi'" 52 ''; 53 54 meta = with lib; { 55 description = "Do live calculations in rofi"; 56 homepage = "https://github.com/svenstaro/rofi-calc"; 57 license = licenses.mit; 58 maintainers = with maintainers; [ albakham ]; 59 platforms = with platforms; linux; 60 }; 61}