2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, python3, wrapQtAppsHook }:
|
2020-11-09 02:45:09 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (python3.pkgs) wrapPython pyqt5;
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "convertall";
|
|
|
|
version = "0.8.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "doug-101";
|
|
|
|
repo = "ConvertAll";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "02xxasgbjbivsbhyfpn3cpv52lscdx5kc95s6ns1dvnmdg0fpng0";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ python3 wrapPython wrapQtAppsHook ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pyqt5 ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
python3 install.py -p $out -x
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
buildPythonPath $out
|
|
|
|
patchPythonScript $out/share/convertall/convertall.py
|
|
|
|
makeQtWrapper $out/share/convertall/convertall.py $out/bin/convertall
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-11-09 02:45:09 +01:00
|
|
|
homepage = "https://convertall.bellz.org/";
|
|
|
|
description = "Graphical unit converter";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
platforms = pyqt5.meta.platforms;
|
|
|
|
};
|
|
|
|
}
|