1
0
chuang-packages/flake.nix

75 lines
1.5 KiB
Nix
Raw Normal View History

2025-02-27 15:35:05 +00:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs =
{
self,
nixpkgs,
treefmt-nix,
...
}:
2025-02-27 15:35:05 +00:00
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
2025-02-27 15:35:05 +00:00
packages-inode = with pkgs; [
libgcc
libxcrypt-legacy
libuuid
libpng12
libjpeg
libudev0-shim
libz
atk
ell
bash
coreutils
2025-02-27 15:35:05 +00:00
glib
cairo
ncurses5
pango
gtk2
gdk-pixbuf
freetype
fontconfig
xorg.libSM
xorg.libX11
xorg.libXxf86vm
];
inherit (pkgs) mkShell;
in
{
2025-02-27 15:35:05 +00:00
formatter.${system} = treefmtEval.config.build.wrapper;
devShell."${system}" = mkShell {
nativeBuildInputs = with pkgs; [
tokei
nil
];
buildInputs = packages-inode;
2025-02-27 15:35:05 +00:00
};
packages."${system}" = {
h3c-inode-client = pkgs.callPackage ./h3c-inode-client/package.nix { };
2025-02-27 15:35:05 +00:00
};
2025-02-28 09:15:38 +00:00
nixosModules =
let
pkgs-chuang = self.packages."${system}";
in
rec {
chuang-packages =
{ config, lib, ... }:
{
imports = [
(import ./h3c-inode-client/module.nix { inherit lib pkgs-chuang config; })
];
};
2025-02-28 12:50:09 +00:00
default = chuang-packages;
};
2025-02-27 15:35:05 +00:00
};
}