mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-01-07 21:44:02 -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:
7
cmd/generate_changelog/incoming/1890.txt
Normal file
7
cmd/generate_changelog/incoming/1890.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
### PR [#1890](https://github.com/danielmiessler/Fabric/pull/1890) by [ksylvan](https://github.com/ksylvan): Bundle yt-dlp with fabric in Nix flake, introduce slim variant
|
||||
|
||||
- Added yt-dlp bundling with fabric package and introduced fabric-slim variant
|
||||
- Renamed original fabric package to fabricSlim and created new fabric package as symlinkJoin of fabricSlim and yt-dlp
|
||||
- Added fabric-slim output for the slim variant and updated default package to point to bundled fabric
|
||||
- Enhanced fabric meta description to note yt-dlp inclusion and set mainProgram to fabric in bundled package
|
||||
- Added wrapper for fabric binary to include PATH in execution environment
|
||||
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