Add custom package support
This commit is contained in:
parent
92ef1db3de
commit
58be44ed2c
@ -55,6 +55,7 @@
|
|||||||
flake = flake-utils.lib;
|
flake = flake-utils.lib;
|
||||||
};
|
};
|
||||||
pkgsLibOverlay = final: prev: { lib = prev.lib.extend libOverlay; };
|
pkgsLibOverlay = final: prev: { lib = prev.lib.extend libOverlay; };
|
||||||
|
myPkgsOverlay = final: prev: import ./pkgs { lib = prev.lib; pkgs = prev; };
|
||||||
|
|
||||||
# Override the flake-level lib since we're going to use it for non-config specific stuff
|
# Override the flake-level lib since we're going to use it for non-config specific stuff
|
||||||
pkgsFlakes = mapAttrs (_: pkgsFlake: pkgsFlake // { lib = pkgsFlake.lib.extend libOverlay; }) {
|
pkgsFlakes = mapAttrs (_: pkgsFlake: pkgsFlake // { lib = pkgsFlake.lib.extend libOverlay; }) {
|
||||||
@ -81,6 +82,7 @@
|
|||||||
(_: path: mkDefaultSystemsPkgs path (system: {
|
(_: path: mkDefaultSystemsPkgs path (system: {
|
||||||
overlays = [
|
overlays = [
|
||||||
pkgsLibOverlay
|
pkgsLibOverlay
|
||||||
|
myPkgsOverlay
|
||||||
inputs.devshell.overlay
|
inputs.devshell.overlay
|
||||||
inputs.agenix.overlay
|
inputs.agenix.overlay
|
||||||
inputs.deploy-rs.overlay
|
inputs.deploy-rs.overlay
|
||||||
@ -94,6 +96,7 @@
|
|||||||
(_: path: mkDefaultSystemsPkgs path (_: {
|
(_: path: mkDefaultSystemsPkgs path (_: {
|
||||||
overlays = [
|
overlays = [
|
||||||
pkgsLibOverlay
|
pkgsLibOverlay
|
||||||
|
myPkgsOverlay
|
||||||
];
|
];
|
||||||
}))
|
}))
|
||||||
pkgsFlakes;
|
pkgsFlakes;
|
||||||
@ -135,6 +138,8 @@
|
|||||||
nixpkgs = pkgs';
|
nixpkgs = pkgs';
|
||||||
inherit lib nixfiles;
|
inherit lib nixfiles;
|
||||||
|
|
||||||
|
overlays.default = myPkgsOverlay;
|
||||||
|
|
||||||
nixosModules = nixfiles.config.nixos.modules;
|
nixosModules = nixfiles.config.nixos.modules;
|
||||||
homeModules = nixfiles.config.home-manager.modules;
|
homeModules = nixfiles.config.home-manager.modules;
|
||||||
|
|
||||||
@ -181,6 +186,8 @@
|
|||||||
deploy = recurseIntoAttrs (pkgs.deploy-rs.lib.deployChecks self.deploy);
|
deploy = recurseIntoAttrs (pkgs.deploy-rs.lib.deployChecks self.deploy);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
packages = flattenTree (import ./pkgs { inherit lib pkgs; });
|
||||||
|
|
||||||
devShells.default = shell;
|
devShells.default = shell;
|
||||||
devShell = shell;
|
devShell = shell;
|
||||||
}));
|
}));
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
python310
|
python310
|
||||||
|
monocraft
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
8
pkgs/default.nix
Normal file
8
pkgs/default.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ lib, pkgs }:
|
||||||
|
let
|
||||||
|
inherit (pkgs) callPackage;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# yeah turns out this is in nixpkgs now... we'll leave it as a sample i guess lol
|
||||||
|
monocraft' = callPackage ./monocraft.nix { };
|
||||||
|
}
|
25
pkgs/monocraft.nix
Normal file
25
pkgs/monocraft.nix
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{ lib, fetchFromGitHub }:
|
||||||
|
fetchFromGitHub rec {
|
||||||
|
pname = "monocraft";
|
||||||
|
version = "1.4";
|
||||||
|
|
||||||
|
owner = "IdreesInc";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
|
||||||
|
postFetch = ''
|
||||||
|
install -Dm444 -t $out/share/fonts/opentype/ $out/Monocraft.otf
|
||||||
|
shopt -s extglob dotglob
|
||||||
|
rm -rf $out/!(share)
|
||||||
|
shopt -u extglob dotglob
|
||||||
|
'';
|
||||||
|
hash = "sha256-e/kLeYK9//iw+8XOfC0bocldhFGojGApT/EtNtdf4tc=";
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A programming font based on the typeface used in Minecraft";
|
||||||
|
homepage = "https://github.com/${owner}/${repo}";
|
||||||
|
license = licenses.ofl;
|
||||||
|
platforms = platforms.all;
|
||||||
|
maintainers = [ maintainers.devplayer0 ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user