packages/flake.nix

62 lines
1.9 KiB
Nix
Raw Normal View History

2023-11-11 23:03:50 +00:00
{
description = "artemist's NixOS packages and shells for development";
2023-11-12 01:16:34 +00:00
2023-11-11 23:03:50 +00:00
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
};
2023-11-12 01:16:34 +00:00
outputs = { self, nixpkgs, utils }:
utils.lib.eachDefaultSystem (system:
2023-11-12 05:10:09 +00:00
let
pkgs = import nixpkgs {
inherit system;
2023-12-02 00:57:07 +00:00
overlays = [ self.overlays.default ];
2023-11-12 05:10:09 +00:00
};
2024-01-15 15:55:17 +00:00
inherit (pkgs) lib;
names = builtins.attrNames (self.overlays.default pkgs pkgs);
2023-11-12 01:16:34 +00:00
in {
2024-01-15 15:55:17 +00:00
devShells = {
axidraw = pkgs.callPackage ./shells/axidraw { };
zephyr = pkgs.callPackage ./shells/zephyr { };
};
2023-11-12 05:10:09 +00:00
2023-11-12 01:16:34 +00:00
formatter = pkgs.nixfmt;
2024-01-15 15:55:17 +00:00
packages = builtins.listToAttrs (lib.concatMap (name:
let pkg = pkgs.${name};
in lib.optional (builtins.typeOf pkg == "set") {
inherit name;
value = if lib.isDerivation pkg then
pkg
else
pkg // {
type = "derivation";
name = "dummy-attrset";
};
}) names);
2023-12-02 00:57:07 +00:00
}) // {
overlays.default = final: prev: {
2023-12-19 06:21:29 +00:00
ipsw = final.callPackage ./packages/ipsw { };
2024-01-15 15:55:17 +00:00
jlink = final.callPackage ./packages/jlink { };
zephyrPackages = final.callPackage ./packages/zephyr { };
inherit (final.python3.pkgs) axicli;
inkscape-extensions = prev.inkscape-extensions // {
axidraw = final.callPackage ./packages/axidraw/inkscape.nix { };
};
kernelPatches = prev.kernelPatches
// final.callPackage ./packages/kernelPatches { };
2024-01-15 15:55:17 +00:00
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
2024-01-15 20:42:27 +00:00
(pythonFinal: pythonPrev:
(final.callPackage ./packages/axidraw/modules.nix {
2024-01-15 15:55:17 +00:00
inherit pythonFinal pythonPrev;
2024-01-15 20:42:27 +00:00
}))
2024-01-15 15:55:17 +00:00
];
2023-12-02 00:57:07 +00:00
};
};
2023-11-12 01:16:34 +00:00
}
2023-11-11 23:03:50 +00:00