Skip to content

Commit

Permalink
fix: actually make yt-dlp a RUNTIME dep
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaxbits committed Apr 19, 2024
1 parent faa5e29 commit 52d6126
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
26 changes: 17 additions & 9 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
dream2nix.modules.dream2nix.rust-crane
];

mkDerivation = {
src = ./.;
buildInputs = with config.deps; [openssl yt-dlp rustc];
nativeBuildInputs = [config.deps.pkg-config];
};

deps = {
nixpkgs,
latest,
Expand All @@ -25,14 +19,28 @@
pkg-config
rustc
openssl
lib
makeWrapper
;
inherit (latest) yt-dlp;
};

mkDerivation = with config.deps; {
src = ./.;
buildInputs = [openssl rustc];
nativeBuildInputs = [pkg-config makeWrapper];
postFixup = let
inherit (config.deps) lib yt-dlp;
in ''
wrapProgram $out/bin/vpod \
--set PATH ${lib.makeBinPath [yt-dlp]}
'';
};

rust-crane = {
depsDrv = {
mkDerivation.buildInputs = with config.deps; [openssl yt-dlp rustc];
mkDerivation.nativeBuildInputs = [config.deps.pkg-config];
depsDrv.mkDerivation = with config.deps; {
buildInputs = [openssl rustc];
nativeBuildInputs = [pkg-config];
};
runTests = false;
};
Expand Down
5 changes: 3 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@
};

oci-image = let
inherit (nixpkgs.legacyPackages.${system}) cacert dockerTools;
inherit (nixpkgs.legacyPackages.${system}) dockerTools;
in
dockerTools.buildLayeredImage {
inherit name;
tag = version;
contents = [cacert];
maxLayers = 128;
contents = [dockerTools.caCertificates];
config.Cmd = [
"${self.packages.${system}.default}/bin/vpod"
];
Expand Down

0 comments on commit 52d6126

Please sign in to comment.