2024-11-13 16:41:51 +01:00
|
|
|
{
|
|
|
|
description = "A GUI for yt-dlp written in Rust";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
|
|
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
|
|
crane = {
|
|
|
|
url = "github:ipetkov/crane";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
flake-utils,
|
|
|
|
crane,
|
|
|
|
rust-overlay,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
craneLib = (crane.mkLib nixpkgs.legacyPackages.${system});
|
|
|
|
|
|
|
|
pkgs = import nixpkgs { inherit system; overlays = [ rust-overlay.overlays.default ]; };
|
|
|
|
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
gettext
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
gtk4 # for gtk-update-icon-cache
|
|
|
|
glib # for glib-compile-schemas
|
|
|
|
desktop-file-utils
|
|
|
|
cargo
|
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
rustc
|
|
|
|
wrapGAppsHook4
|
|
|
|
blueprint-compiler
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
glib
|
|
|
|
gtk4
|
|
|
|
libadwaita
|
|
|
|
libhandy
|
|
|
|
openssl
|
|
|
|
alsa-lib
|
|
|
|
libpulseaudio
|
|
|
|
gst_all_1.gst-plugins-base
|
|
|
|
gst_all_1.gstreamer
|
|
|
|
];
|
|
|
|
|
2024-11-14 09:40:56 +01:00
|
|
|
|
2024-11-13 16:41:51 +01:00
|
|
|
cargoArtifacts = craneLib.buildDepsOnly ({
|
|
|
|
src = craneLib.cleanCargoSource (craneLib.path ./.);
|
|
|
|
inherit buildInputs nativeBuildInputs;
|
|
|
|
pname = "spot";
|
|
|
|
});
|
|
|
|
in with pkgs; {
|
|
|
|
packages = rec {
|
|
|
|
spot = craneLib.buildPackage {
|
|
|
|
src = craneLib.path ./.;
|
2024-11-14 09:44:40 +01:00
|
|
|
cargoHash = "";
|
2024-11-13 16:41:51 +01:00
|
|
|
|
|
|
|
inherit buildInputs nativeBuildInputs cargoArtifacts;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
default = spot;
|
|
|
|
};
|
|
|
|
|
|
|
|
devShells.default = mkShell {
|
|
|
|
inherit buildInputs nativeBuildInputs;
|
|
|
|
|
|
|
|
packages = with pkgs; [
|
|
|
|
(rust-bin.stable.latest.default.override {
|
|
|
|
extensions = [ "rust-src" "rust-analyzer" ];
|
|
|
|
})
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
cargo
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}) // {
|
|
|
|
overlays.default = final: prev: {
|
|
|
|
inherit (self.packages.${final.system}) spot;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|