copyparty/flake.nix
Tom van Dijk 4f1ca5c480
nix: add flake check that makes sure it builds with all flags
Because sometimes an import might be missing, and if it is an optional
then you'll only figure out that it's broken if you set the flag.
2025-07-28 13:47:46 +02:00

67 lines
1.6 KiB
Nix

{
inputs = {
nixpkgs.url = "nixpkgs/nixos-25.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
{
nixosModules.default = ./contrib/nixos/modules/copyparty.nix;
overlays.default = self: super: rec {
copyparty = self.python3.pkgs.callPackage ./contrib/package/nix/copyparty {
ffmpeg = self.ffmpeg-full;
};
partyfuse = super.callPackage ./contrib/package/nix/partyfuse {
inherit copyparty;
};
u2c = super.callPackage ./contrib/package/nix/u2c {
inherit copyparty;
};
};
}
// flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
config = {
allowAliases = false;
};
overlays = [ self.overlays.default ];
};
in
{
# check that copyparty builds with all optionals turned on
checks.copyparty-full = self.packages.${system}.copyparty.override {
withHashedPasswords = true;
withCertgen = true;
withThumbnails = true;
withFastThumbnails = true;
withMediaProcessing = true;
withBasicAudioMetadata = true;
withZeroMQ = true;
withFTPS = true;
withSMB = true;
};
packages = {
inherit (pkgs)
copyparty
partyfuse
u2c
;
default = self.packages.${system}.copyparty;
};
formatter = pkgs.nixfmt-tree;
}
);
}