uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
47
pkgs/tools/misc/units/default.nix
Normal file
47
pkgs/tools/misc/units/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchurl,
|
||||
readline,
|
||||
enableCurrenciesUpdater ? true,
|
||||
pythonPackages ? null
|
||||
}:
|
||||
|
||||
assert enableCurrenciesUpdater -> pythonPackages != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "units";
|
||||
version = "2.21";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/units/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-bD6AqfmAWJ/ZYqWFKiZ0ZCJX2xxf1bJ8TZ5mTzSGy68=";
|
||||
};
|
||||
|
||||
pythonEnv = pythonPackages.python.withPackages(ps: [
|
||||
ps.requests
|
||||
]);
|
||||
|
||||
buildInputs = [ readline ]
|
||||
++ lib.optionals enableCurrenciesUpdater [
|
||||
pythonEnv
|
||||
]
|
||||
;
|
||||
prePatch = ''
|
||||
substituteInPlace units_cur \
|
||||
--replace "#!/usr/bin/env python" ${pythonEnv}/bin/python
|
||||
'';
|
||||
postInstall = ''
|
||||
cp units_cur ${placeholder "out"}/bin/
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Unit conversion tool";
|
||||
homepage = "https://www.gnu.org/software/units/";
|
||||
license = [ licenses.gpl3Plus ];
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.vrthra ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue