mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-01-08 22:08:03 -05:00
feat: Nix: bundle yt-dlp with fabric package + fabric-slim variant
- rename original fabric package to fabricSlim - create fabric package as symlinkJoin of fabricSlim and yt-dlp - add fabric-slim output for the slim variant - update default package to point to bundled fabric - enhance fabric meta description to note yt-dlp inclusion - set mainProgram to fabric in bundled package
This commit is contained in:
27
flake.nix
27
flake.nix
@@ -73,14 +73,33 @@
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
goVersion = getGoVersion system;
|
||||
in
|
||||
{
|
||||
default = self.packages.${system}.fabric;
|
||||
fabric = pkgs.callPackage ./nix/pkgs/fabric {
|
||||
fabricSlim = pkgs.callPackage ./nix/pkgs/fabric {
|
||||
go = goVersion;
|
||||
inherit self;
|
||||
inherit (gomod2nix.legacyPackages.${system}) buildGoApplication;
|
||||
};
|
||||
fabric = pkgs.symlinkJoin {
|
||||
name = "fabric-${fabricSlim.version}";
|
||||
inherit (fabricSlim) version;
|
||||
paths = [
|
||||
fabricSlim
|
||||
pkgs.yt-dlp
|
||||
];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/fabric \
|
||||
--prefix PATH : $out/bin
|
||||
'';
|
||||
meta = fabricSlim.meta // {
|
||||
description = "${fabricSlim.meta.description} (includes yt-dlp)";
|
||||
mainProgram = "fabric";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
default = fabric;
|
||||
inherit fabric;
|
||||
"fabric-slim" = fabricSlim;
|
||||
inherit (gomod2nix.legacyPackages.${system}) gomod2nix;
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user