build: Add Nix flake for building x86_64- and aarch64-linux Nix packages
This commit is contained in:
parent
3410f647f5
commit
5c55bd3e97
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
__pycache__
|
||||
/dist/
|
||||
/.coverage*
|
||||
/result
|
||||
|
|
27
flake.lock
Normal file
27
flake.lock
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1717428950,
|
||||
"narHash": "sha256-Pr3lhu2No1GHJarhjt+Jsfxye1wNLoY12E44p0b3VO0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4fad892a8f64635a55423e4acfefeefb6caf4d0d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-23.11-small",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
45
flake.nix
Normal file
45
flake.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
description = "A simple NixOS deployment tool using nixos-rebuild internally, but trying to make infrastructure deployment more convenient.";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11-small";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, ... }:
|
||||
let
|
||||
version = "0.0.1";
|
||||
in
|
||||
{
|
||||
packages = nixpkgs.lib.attrsets.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages."${system}";
|
||||
in
|
||||
rec {
|
||||
infra-rebuild = pkgs.python3Packages.buildPythonApplication {
|
||||
pname = "infra-rebuild";
|
||||
inherit version;
|
||||
pyproject = true;
|
||||
|
||||
src = ./.;
|
||||
|
||||
nativeBuildInputs = with pkgs.python3Packages; [
|
||||
hatchling
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pkgs.python3Packages.click
|
||||
pkgs.nixos-rebuild
|
||||
];
|
||||
|
||||
meta = with nixpkgs.lib; {
|
||||
description = "A simple NixOS deployment tool using nixos-rebuild internally";
|
||||
longDescription = "A simple NixOS deployment tool using nixos-rebuild internally, but trying to make infrastructure deployment more convenient.";
|
||||
homepage = "https://git.hamburg.ccc.de/CCCHH/infra-rebuild";
|
||||
license = licenses.gpl3Plus;
|
||||
};
|
||||
};
|
||||
default = infra-rebuild;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue