4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
51 lines
1.2 KiB
Nix
51 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, pythonPackages }:
|
|
|
|
let
|
|
inherit (pythonPackages) python;
|
|
pname = "honcho";
|
|
|
|
in
|
|
|
|
pythonPackages.buildPythonApplication rec {
|
|
name = "${pname}-${version}";
|
|
version = "1.0.1";
|
|
namePrefix = "";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nickstenning";
|
|
repo = "honcho";
|
|
rev = "v${version}";
|
|
sha256 = "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b";
|
|
};
|
|
|
|
checkInputs = with pythonPackages; [ jinja2 pytest mock coverage ];
|
|
|
|
buildPhase = ''
|
|
${python.interpreter} setup.py build
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p "$out/${python.sitePackages}"
|
|
|
|
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
|
|
|
|
${python.interpreter} setup.py install \
|
|
--install-lib=$out/${python.sitePackages} \
|
|
--prefix="$out"
|
|
'';
|
|
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
PATH=$out/bin:$PATH coverage run -m pytest
|
|
runHook postCheck
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A Python clone of Foreman, a tool for managing Procfile-based applications";
|
|
license = licenses.mit;
|
|
homepage = "https://github.com/nickstenning/honcho";
|
|
maintainers = with maintainers; [ benley ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|