Wrap xonsh with extraPackages support for NixOS module compatibility
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
{ lib, python3Packages }:
|
||||
|
||||
python3Packages.buildPythonPackage rec {
|
||||
pname = "xonsh";
|
||||
version = "0.22.7";
|
||||
|
||||
src = python3Packages.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-gPApjBEctw1eLWN5gtz0ArJXPOcSqwyBNJBHdFMdRwk=";
|
||||
};
|
||||
|
||||
# xonsh uses pyproject.toml setuptools
|
||||
format = "pyproject";
|
||||
build-system = [ python3Packages.setuptools ];
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
ply
|
||||
prompt-toolkit
|
||||
pygments
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python-powered shell that combines Python with shell features";
|
||||
homepage = "https://xon.sh";
|
||||
license = licenses.bsd3;
|
||||
};
|
||||
}
|
||||
+27
-28
@@ -1,29 +1,28 @@
|
||||
{ lib, python3Packages }:
|
||||
{
|
||||
lib,
|
||||
python3,
|
||||
runCommand,
|
||||
xonsh-unwrapped,
|
||||
extraPackages ? (ps: [ ]),
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonPackage rec {
|
||||
pname = "xonsh";
|
||||
version = "0.22.7";
|
||||
|
||||
src = python3Packages.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-gPApjBEctw1eLWN5gtz0ArJXPOcSqwyBNJBHdFMdRwk=";
|
||||
};
|
||||
|
||||
# xonsh uses pyproject.toml setuptools
|
||||
format = "pyproject";
|
||||
build-system = [ python3Packages.setuptools ];
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
ply
|
||||
prompt-toolkit
|
||||
pygments
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python-powered shell that combines Python with shell features";
|
||||
homepage = "https://xon.sh";
|
||||
license = licenses.bsd3;
|
||||
};
|
||||
}
|
||||
let
|
||||
pythonEnv = python3.withPackages (ps: [ xonsh-unwrapped ] ++ extraPackages ps);
|
||||
in
|
||||
runCommand "xonsh-${xonsh-unwrapped.version}"
|
||||
{
|
||||
inherit (xonsh-unwrapped)
|
||||
pname
|
||||
version
|
||||
meta
|
||||
;
|
||||
passthru = {
|
||||
unwrapped = xonsh-unwrapped;
|
||||
};
|
||||
}
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
for bin in ${lib.getBin xonsh-unwrapped}/bin/*; do
|
||||
ln -s ${pythonEnv}/bin/$(basename "$bin") $out/bin/
|
||||
done
|
||||
''
|
||||
|
||||
Reference in New Issue
Block a user