2023-11-03 07:25:58 +00:00
|
|
|
{
|
2023-11-03 09:40:30 +00:00
|
|
|
description = "A personal package overlay";
|
2023-11-03 07:25:58 +00:00
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
2024-07-21 21:33:41 +00:00
|
|
|
systems.url = "github:nix-systems/default-linux";
|
2023-11-03 09:40:30 +00:00
|
|
|
|
|
|
|
flake-compat = {
|
|
|
|
url = "github:edolstra/flake-compat";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-11-03 07:25:58 +00:00
|
|
|
};
|
|
|
|
|
2024-07-21 21:19:39 +00:00
|
|
|
outputs = {
|
2024-07-21 21:33:41 +00:00
|
|
|
self,
|
2024-07-21 21:19:39 +00:00
|
|
|
nixpkgs,
|
|
|
|
flake-parts,
|
|
|
|
...
|
2024-07-28 12:42:36 +00:00
|
|
|
} @ inputs:
|
2024-07-21 21:19:39 +00:00
|
|
|
flake-parts.lib.mkFlake {inherit inputs self;} {
|
2024-07-21 21:33:41 +00:00
|
|
|
systems = import inputs.systems;
|
2024-07-21 21:19:39 +00:00
|
|
|
imports = [flake-parts.flakeModules.easyOverlay];
|
|
|
|
|
|
|
|
perSystem = {
|
|
|
|
system,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
2024-07-28 12:42:36 +00:00
|
|
|
inherit (builtins) concatStringsSep match;
|
|
|
|
inherit (lib.attrsets) recursiveUpdate;
|
2024-07-21 21:19:39 +00:00
|
|
|
inherit (lib.filesystem) packagesFromDirectoryRecursive;
|
2024-07-28 12:42:36 +00:00
|
|
|
inherit (lib.customisation) callPackageWith;
|
|
|
|
|
|
|
|
pins = import ./npins;
|
|
|
|
date = concatStringsSep "-" (match "(.{4})(.{2})(.{2}).*" self.lastModifiedDate);
|
2024-07-21 21:19:39 +00:00
|
|
|
in {
|
|
|
|
_module.args.pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
overlayAttrs = config.packages;
|
|
|
|
packages = packagesFromDirectoryRecursive {
|
2024-07-28 12:42:36 +00:00
|
|
|
callPackage = callPackageWith (recursiveUpdate pkgs {inherit pins date;});
|
2024-07-21 21:19:39 +00:00
|
|
|
directory = ./pkgs;
|
|
|
|
};
|
2023-11-03 07:25:58 +00:00
|
|
|
|
2024-07-21 21:33:41 +00:00
|
|
|
formatter = config.packages.alejandra-custom;
|
|
|
|
devShells = {
|
|
|
|
default = self.devShells.${system}.npins;
|
|
|
|
npins = pkgs.mkShellNoCC {
|
|
|
|
packages = [pkgs.npins];
|
|
|
|
};
|
|
|
|
};
|
2023-11-03 09:40:30 +00:00
|
|
|
};
|
2023-11-03 07:25:58 +00:00
|
|
|
};
|
|
|
|
}
|