update-from-hydra/flake.nix
2023-07-21 23:26:00 +02:00

54 lines
1.2 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, ... }: {
packages.x86_64-linux = let
pkgs = import nixpkgs { system = "x86_64-linux"; };
in {
update-from-hydra = pkgs.python3Packages.buildPythonPackage rec {
pname = "update-from-hydra";
version = "0.0.1";
src = ./.;
format = "pyproject";
buildInputs = [ pkgs.python3Packages.hatchling ];
propagatedBuildInputs = [ pkgs.python3Packages.requests ];
};
default = self.packages.x86_64-linux.update-from-hydra;
};
apps.x86_64-linux = {
update-from-hydra = {
type = "app";
program = self.packages.x86_64-linux.update-from-hydra + "/bin/update-from-hydra";
};
default = self.apps.x86_64-linux.update-from-hydra;
};
nixosModules = {
update-from-hydra = { ... }: {
imports = [
./nix/module.nix
];
nixpkgs.overlays = [
(_: _: {
inherit (self.packages."x86_64-linux")
update-from-hydra;
})
];
};
default = self.nixosModules.update-from-hydra;
};
hydraJobs = {
inherit (self)
packages;
};
};
}