2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-03-30 00:18:56 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2020-03-30 00:18:56 +01:00
|
|
|
, rofi-unwrapped
|
|
|
|
, libqalculate
|
|
|
|
, glib
|
|
|
|
, cairo
|
|
|
|
, gobject-introspection
|
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rofi-calc";
|
2021-02-04 12:40:34 +00:00
|
|
|
version = "2.0.0";
|
2020-03-30 00:18:56 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "svenstaro";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-02-04 12:40:34 +00:00
|
|
|
sha256 = "NbWXMash0pK7Y9gOEBbL7zXjFytoeZBN9/wIbRTvQ8g=";
|
2020-03-30 00:18:56 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2020-03-30 00:18:56 +01:00
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
rofi-unwrapped
|
|
|
|
libqalculate
|
|
|
|
glib
|
|
|
|
cairo
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./0001-Patch-plugindir-to-output.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed "s|qalc_binary = \"qalc\"|qalc_binary = \"${libqalculate}/bin/qalc\"|" -i src/calc.c
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-30 00:18:56 +01:00
|
|
|
description = "Do live calculations in rofi!";
|
|
|
|
homepage = "https://github.com/svenstaro/rofi-calc";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ luc65r albakham ];
|
2020-10-25 12:51:32 +00:00
|
|
|
platforms = with platforms; linux;
|
2020-03-30 00:18:56 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|