Using nix build
with the flake.nix below, the build should fail since the references github repository does not exist.
Yet, whenever I build the flake, while it shows ecsdsddsdse.fghfghfghfghgfh
as the package, it just builds paho-mqtt (that was referenced there a while ago).
Apparently, my nix installation somehow remembers the repository referenced a while ago (paho-mqtt) and always fetches that, regardless of what I actually write as owner and repo.
I have already removed /nix
and reinstalled without any results.
Does anyone have an idea why it fetches the wrong repo?
{
description = "Nix flake for packaging modpoll (a Poetry application) from GitHub";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable"; # Latest Nixpkgs
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils, poetry2nix }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
};
pname = "modpoll";
version = "1.2.0";
updatedPahoMqtt = pkgs.python3Packages.buildPythonPackage rec {
pname = "dsfsdfsdf";
version = "fghfghfghfghgfh";
format = "setuptools";
src = pkgs.fetchFromGitHub {
owner = "ecsdsddsdse";
repo = "pdsfsdfsdfh";
rev = "sdfsdfsdf";
hash = "sha256-9nH6xROVpmI+iTKXfwv2Ar1PAmWbEunI3HO0pZyK6Rh";
};
};
app = pkgs.python3Packages.buildPythonPackage rec {
inherit version pname;
pyproject = true;
dependencies = [
updatedPahoMqtt
pkgs.python3Packages.poetry-core
];
src = pkgs.fetchPypi rec {
inherit pname version;
sha256 = "sha256-t69tvHqQNeNs3iErcq49Rcq2LtCiQkmNiVxhGZtMaF8=";
};
};
in
{
packages.x86_64-linux.default = app;
};
}