2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
2023-10-09 19:29:22 +00:00
|
|
|
, stdenv
|
2022-03-30 09:31:56 +00:00
|
|
|
, rustPlatform
|
2023-11-16 04:20:00 +00:00
|
|
|
, fetchFromGitea
|
2022-03-30 09:31:56 +00:00
|
|
|
, makeWrapper
|
2022-10-21 18:38:19 +00:00
|
|
|
, pkg-config
|
|
|
|
, glib
|
|
|
|
, libopus
|
|
|
|
, vips
|
2022-03-30 09:31:56 +00:00
|
|
|
, ffmpeg
|
|
|
|
, callPackage
|
2023-10-09 19:29:22 +00:00
|
|
|
, darwin
|
2023-11-16 04:20:00 +00:00
|
|
|
, testers
|
|
|
|
, faircamp
|
2022-03-30 09:31:56 +00:00
|
|
|
}:
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2022-03-30 09:31:56 +00:00
|
|
|
pname = "faircamp";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.14.0";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
src = fetchFromGitea {
|
|
|
|
domain = "codeberg.org";
|
|
|
|
owner = "simonrepp";
|
|
|
|
repo = "faircamp";
|
|
|
|
rev = version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-gHlm5ZQ5u+gOSBERlg6iYJxGTfs/+L4y2TY+ZOsVYh8=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-04-21 15:54:59 +00:00
|
|
|
"enolib-0.4.2" = "sha256-FJuWKcwjoi/wKfTzxghobNWblhnKRdUvHOejhpCF7kY=";
|
2023-03-27 19:17:25 +00:00
|
|
|
};
|
|
|
|
};
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
buildFeatures = [ "libvips" ];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
2022-10-21 18:38:19 +00:00
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
libopus
|
|
|
|
vips
|
2023-10-09 19:29:22 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.CoreServices
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/faircamp \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
|
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.tests = {
|
|
|
|
wav = callPackage ./test-wav.nix { };
|
|
|
|
version = testers.testVersion { package = faircamp; };
|
|
|
|
};
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A self-hostable, statically generated bandcamp alternative";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "faircamp";
|
2022-03-30 09:31:56 +00:00
|
|
|
longDescription = ''
|
|
|
|
Faircamp takes a directory on your disk - your Catalog - and from it
|
|
|
|
produces a fancy-looking (and technically simple and completely static)
|
|
|
|
website, which presents your music in a way similar to how popular
|
|
|
|
commercial service bandcamp does it.
|
|
|
|
|
|
|
|
You can upload the files faircamp generates to any webspace - no database
|
|
|
|
and no programming language support (PHP or such) is required. If your
|
|
|
|
webspace supports SSH access, faircamp can be configured to upload your
|
|
|
|
website for you automatically, otherwise you can use FTP or whichever
|
|
|
|
means you prefer to do that manually.
|
|
|
|
'';
|
2023-04-12 12:48:02 +00:00
|
|
|
homepage = "https://simonrepp.com/faircamp/";
|
2022-03-30 09:31:56 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|