Compare commits
6 Commits
47917c9c34
...
master
Author | SHA1 | Date | |
---|---|---|---|
c2ff98ce55
|
|||
e36fb131be
|
|||
d7ab746344
|
|||
72c2a27e5a
|
|||
0c723151cb
|
|||
263d0423a3
|
34
flake.nix
34
flake.nix
@@ -86,7 +86,6 @@
|
|||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
dontInstall = true;
|
dontInstall = true;
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
mypy --version
|
|
||||||
mkdir $out
|
mkdir $out
|
||||||
mypy --strict huecli --junit-xml $out/junit.xml
|
mypy --strict huecli --junit-xml $out/junit.xml
|
||||||
'';
|
'';
|
||||||
@@ -122,22 +121,33 @@
|
|||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
pythonSet = pythonSets.${system};
|
pythonSet = pythonSets.${system};
|
||||||
|
venv = pythonSet.mkVirtualEnv "huecli-env" workspace.deps.default;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
default = (pythonSet.mkVirtualEnv "huecli" workspace.deps.default).overrideAttrs (
|
default = pkgs.stdenv.mkDerivation {
|
||||||
_final: prev: {
|
pname = "huecli";
|
||||||
nativeBuildInputs = prev.nativeBuildInputs ++ [ pkgs.installShellFiles ];
|
version = pythonSet.huecli.version;
|
||||||
postInstall = ''
|
dontConfigure = true;
|
||||||
installShellCompletion --cmd huecli \
|
dontUnpack = true;
|
||||||
--bash <($out/bin/huecli --show-completion bash) \
|
dontBuild = true;
|
||||||
--zsh <($out/bin/huecli --show-completion zsh) \
|
buildInputs = [ venv ];
|
||||||
--fish <($out/bin/huecli --show-completion fish)
|
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)
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
overlays.default = final: prev: {
|
||||||
|
huecli = self.packages.${prev.system}.default;
|
||||||
|
};
|
||||||
|
|
||||||
# Use an editable Python set for development.
|
# Use an editable Python set for development.
|
||||||
devShells = forAllSystems (
|
devShells = forAllSystems (
|
||||||
system:
|
system:
|
||||||
|
Reference in New Issue
Block a user