mirror of
https://github.com/Superredstone/spotiflac-cli.git
synced 2026-03-07 20:18:07 +01:00
build: remove spotiflac dependency
This commit is contained in:
27
flake.nix
27
flake.nix
@@ -7,8 +7,6 @@
|
|||||||
{ self, ... }@inputs:
|
{ self, ... }@inputs:
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "spotiflac-cli";
|
|
||||||
version = "7.0.9";
|
|
||||||
goVersion = 24; # Change this to update the whole stack
|
goVersion = 24; # Change this to update the whole stack
|
||||||
|
|
||||||
supportedSystems = [
|
supportedSystems = [
|
||||||
@@ -28,18 +26,6 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
pkgs = import inputs.nixpkgs {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
overlays = [ inputs.self.overlays.default ];
|
|
||||||
};
|
|
||||||
|
|
||||||
spotiflac = pkgs.fetchFromGitHub {
|
|
||||||
owner = "afkarxyz";
|
|
||||||
repo = "SpotiFLAC";
|
|
||||||
tag = "v${version}";
|
|
||||||
hash = "sha256-VHYof17C+eRoZfssXRQpbB8GXlcfPhyRiWltM6yDqe0=";
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
overlays.default = final: prev: {
|
overlays.default = final: prev: {
|
||||||
@@ -55,8 +41,6 @@
|
|||||||
go
|
go
|
||||||
# Required for .deb build
|
# Required for .deb build
|
||||||
dpkg
|
dpkg
|
||||||
|
|
||||||
ffmpeg_7
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -64,8 +48,6 @@
|
|||||||
packages = forEachSupportedSystem (
|
packages = forEachSupportedSystem (
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
# Set this to true to ship with FFmpeg which is required to download songs from amazon and qobuz
|
|
||||||
withAdditionalServices ? false,
|
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
default = pkgs.buildGoModule (finalAttrs: {
|
default = pkgs.buildGoModule (finalAttrs: {
|
||||||
@@ -73,8 +55,6 @@
|
|||||||
src = ./.;
|
src = ./.;
|
||||||
vendorHash = "sha256-EpGgfiCqJjHEOphV2x8FmXeIFls7eq2NVxb/or4NLUo=";
|
vendorHash = "sha256-EpGgfiCqJjHEOphV2x8FmXeIFls7eq2NVxb/or4NLUo=";
|
||||||
|
|
||||||
dependencies = if withAdditionalServices then [ pkgs.ffmpeg_7 ] else [ ];
|
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
installShellFiles
|
installShellFiles
|
||||||
];
|
];
|
||||||
@@ -83,13 +63,6 @@
|
|||||||
"."
|
"."
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
cp -r ${spotiflac} ./SpotiFLAC/
|
|
||||||
sed -i "s/git clone https:\/\/github.com\/afkarxyz\/SpotiFLAC.git//g" ./tools/fetch_spotiflac_backend.sh
|
|
||||||
sed -i "s/rm -rf SpotiFLAC//g" ./tools/fetch_spotiflac_backend.sh
|
|
||||||
./tools/fetch_spotiflac_backend.sh
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
installShellCompletion --cmd spotiflac-cli \
|
installShellCompletion --cmd spotiflac-cli \
|
||||||
--bash <($out/bin/spotiflac-cli completion bash) \
|
--bash <($out/bin/spotiflac-cli completion bash) \
|
||||||
|
|||||||
Reference in New Issue
Block a user