This commit is contained in:
parent
0c723151cb
commit
72c2a27e5a
31
flake.nix
31
flake.nix
@ -86,7 +86,6 @@
|
||||
dontConfigure = true;
|
||||
dontInstall = true;
|
||||
buildPhase = ''
|
||||
mypy --version
|
||||
mkdir $out
|
||||
mypy --strict huecli --junit-xml $out/junit.xml
|
||||
'';
|
||||
@ -122,19 +121,27 @@
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pythonSet = pythonSets.${system};
|
||||
venv = pythonSet.mkVirtualEnv "huecli-env" workspace.deps.default;
|
||||
in
|
||||
{
|
||||
default = (pythonSet.mkVirtualEnv "huecli" workspace.deps.default).overrideAttrs (
|
||||
_final: prev: {
|
||||
nativeBuildInputs = prev.nativeBuildInputs ++ [ pkgs.installShellFiles ];
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd huecli \
|
||||
--bash <($out/bin/huecli --show-completion bash) \
|
||||
--zsh <($out/bin/huecli --show-completion zsh) \
|
||||
--fish <($out/bin/huecli --show-completion fish)
|
||||
'';
|
||||
}
|
||||
);
|
||||
default = pkgs.stdenv.mkDerivation {
|
||||
pname = "huecli";
|
||||
# TODO: Fix this, get version from pyproject
|
||||
version = "0.1.7";
|
||||
dontConfigure = true;
|
||||
dontUnpack = true;
|
||||
dontBuild = true;
|
||||
buildInputs = [ venv ];
|
||||
nativeBuildInputs = [ pkgs.installShellFiles ];
|
||||
postInstall = ''
|
||||
mkdir -p $out/bin
|
||||
ln -s ${venv}/bin/huecli $out/bin/huecli
|
||||
installShellCompletion --cmd huecli \
|
||||
--bash <($out/bin/huecli --show-completion bash) \
|
||||
--zsh <($out/bin/huecli --show-completion zsh) \
|
||||
--fish <($out/bin/huecli --show-completion fish)
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user