flake.nix: init
This commit is contained in:
18
default.nix
Normal file
18
default.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ lib
|
||||||
|
, python3Packages
|
||||||
|
}:
|
||||||
|
python3Packages.buildPythonApplication {
|
||||||
|
pname = "libdib";
|
||||||
|
version = "unstable";
|
||||||
|
src = lib.cleanSource ./.;
|
||||||
|
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
|
nativeBuildInputs = with python3Packages; [
|
||||||
|
setuptools
|
||||||
|
setuptools-scm
|
||||||
|
];
|
||||||
|
propagatedBuildInputs = with python3Packages; [
|
||||||
|
sqlalchemy
|
||||||
|
];
|
||||||
|
}
|
60
flake.lock
generated
Normal file
60
flake.lock
generated
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "flake-utils",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1749143949,
|
||||||
|
"narHash": "sha256-QuUtALJpVrPnPeozlUG/y+oIMSLdptHxb3GK6cpSVhA=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "d3d2d80a2191a73d1e86456a751b83aa13085d7d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
41
flake.nix
Normal file
41
flake.nix
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
description = "Dibbler and Worblehat shadow voodoo magic";
|
||||||
|
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, flake-utils }: let
|
||||||
|
inherit (nixpkgs) lib;
|
||||||
|
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"x86_64-darwin"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
|
||||||
|
forAllSystems = f: lib.genAttrs systems (system: let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in f system pkgs);
|
||||||
|
in {
|
||||||
|
packages = forAllSystems (system: pkgs: {
|
||||||
|
default = self.packages.${system}.libdib;
|
||||||
|
libdib = pkgs.callPackage ./default.nix {
|
||||||
|
python3Packages = pkgs.python313Packages;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
overlays = {
|
||||||
|
default = self.overlays.libdib;
|
||||||
|
libdib = final: prev: {
|
||||||
|
inherit (self.packages.${prev.system}) libdib;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells = forAllSystems (system: pkgs: {
|
||||||
|
default = self.devShells.${system}.libdib;
|
||||||
|
libdib = pkgs.callPackage ./shell.nix {
|
||||||
|
python = pkgs.python313;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
@@ -12,5 +12,11 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["hatchling"]
|
requires = ["setuptools", "setuptools-scm"]
|
||||||
build-backend = "hatchling.build"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[tool.black]
|
||||||
|
line-length = 100
|
||||||
|
|
||||||
|
[tool.ruff]
|
||||||
|
line-length = 100
|
||||||
|
Reference in New Issue
Block a user