Skip to content

Commit

Permalink
home-assistant: don't pass two different hashes to fetchPypi
Browse files Browse the repository at this point in the history
Let's stop using src.override.  I see no advantage.
  • Loading branch information
vcunat authored and mweinelt committed Jul 26, 2022
1 parent cb704bf commit ccf609a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions pkgs/servers/home-assistant/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ let
(self: super: {
pytest-aiohttp = super.pytest-aiohttp.overridePythonAttrs (oldAttrs: rec {
version = "0.3.0";
src = oldAttrs.src.override {
src = self.fetchPypi {
inherit version;
pname = "pytest-aiohttp";
hash = "sha256-ySmFQzljeXc3WDhwO2L+9jUoWYvAqdRRY566lfSqpE8=";
};
propagatedBuildInputs = with python3.pkgs; [ aiohttp pytest ];
Expand Down Expand Up @@ -86,7 +87,16 @@ let
})

# Pinned due to API changes in 0.1.0
(mkOverride "poolsense" "0.0.8" "sha256-17MHrYRmqkH+1QLtgq2d6zaRtqvb9ju9dvPt9gB2xCc=")
(self: super: {
poolsense = super.poolsense.overridePythonAttrs (oldAttrs: rec {
version = "0.0.8";
src = super.fetchPypi {
pname = "poolsense";
inherit version;
hash = "sha256-17MHrYRmqkH+1QLtgq2d6zaRtqvb9ju9dvPt9gB2xCc=";
};
});
})

# Pinned due to API changes >0.3.5.3
(self: super: {
Expand Down Expand Up @@ -144,16 +154,6 @@ let
})
];

mkOverride = attrName: version: hash:
self: super: {
${attrName} = super.${attrName}.overridePythonAttrs (oldAttrs: {
inherit version;
src = oldAttrs.src.override {
inherit version hash;
};
});
};

python = python3.override {
# Put packageOverrides at the start so they are applied after defaultOverrides
packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) ([ packageOverrides ] ++ defaultOverrides);
Expand Down

0 comments on commit ccf609a

Please sign in to comment.