6 enableCurrenciesUpdater ? true,
10 assert enableCurrenciesUpdater -> pythonPackages != null;
12 stdenv.mkDerivation rec {
17 url = "mirror://gnu/units/${pname}-${version}.tar.gz";
18 sha256 = "sha256-bD6AqfmAWJ/ZYqWFKiZ0ZCJX2xxf1bJ8TZ5mTzSGy68=";
21 pythonEnv = pythonPackages.python.withPackages(ps: [
25 buildInputs = [ readline ]
26 ++ lib.optionals enableCurrenciesUpdater [
31 substituteInPlace units_cur \
32 --replace "#!/usr/bin/env python" ${pythonEnv}/bin/python
35 cp units_cur ${placeholder "out"}/bin/
41 description = "Unit conversion tool";
42 homepage = "https://www.gnu.org/software/units/";
43 license = [ licenses.gpl3Plus ];
44 platforms = platforms.all;
45 maintainers = [ maintainers.vrthra ];