64 lines
2 KiB
Nix
64 lines
2 KiB
Nix
{
|
|
description = "artemist's NixOS packages and shells for development";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, utils }:
|
|
utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [ self.overlays.default ];
|
|
};
|
|
inherit (pkgs) lib;
|
|
names = builtins.attrNames (self.overlays.default pkgs pkgs);
|
|
in {
|
|
devShells = {
|
|
axidraw = pkgs.callPackage ./shells/axidraw { };
|
|
zephyr = pkgs.callPackage ./shells/zephyr { };
|
|
};
|
|
|
|
formatter = pkgs.nixfmt;
|
|
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);
|
|
}) // {
|
|
overlays.default = final: prev: {
|
|
attic = final.callPackage ./packages/attic { };
|
|
attic-client = final.attic.override { clientOnly = true; };
|
|
ipsw = final.callPackage ./packages/ipsw { };
|
|
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 { };
|
|
|
|
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
|
(pythonFinal: pythonPrev:
|
|
(final.callPackage ./packages/axidraw/modules.nix {
|
|
inherit pythonFinal pythonPrev;
|
|
}))
|
|
];
|
|
};
|
|
};
|
|
}
|
|
|