initial commit
This commit is contained in:
commit
e3b0136650
9 changed files with 245 additions and 0 deletions
31
flake.nix
Normal file
31
flake.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
description = "Jetperch tools";
|
||||
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
inputs."nixpkgs-24.11".url = "github:nixos/nixpkgs/nixos-24.11";
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs: let
|
||||
lib = nixpkgs.lib;
|
||||
|
||||
scan = root: pkg: let
|
||||
path = ./. + "/${root}";
|
||||
entries = lib.optionalAttrs (builtins.pathExists path) (builtins.readDir path);
|
||||
in lib.attrsets.foldlAttrs (acc: name: value: acc // lib.optionalAttrs (builtins.pathExists ("${./.}/${root}/${name}/default.nix")) {
|
||||
${name} = pkg name (import "${./.}/${root}/${name}/default.nix");
|
||||
}) {} entries;
|
||||
|
||||
overlay = final: prev: let
|
||||
all = packages final;
|
||||
python3 = prev.python3.override {
|
||||
self = python3;
|
||||
packageOverrides = pself: psuper: {
|
||||
watchdog = psuper.watchdog;
|
||||
};
|
||||
};
|
||||
in { inherit python3; } // all;
|
||||
|
||||
packages = pkgs: scan "package" (name: pkg: (pkgs.extend overlay).callPackage pkg { jetperch = self; inherit name; });
|
||||
in {
|
||||
packages = builtins.mapAttrs (_: packages) nixpkgs.legacyPackages;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue