···1+{ lib
2+, rustPlatform
3+, fetchgit
4+, makeWrapper
5+, ffmpeg
6+, callPackage
7+, unstableGitUpdater
8+}:
9+10+rustPlatform.buildRustPackage {
11+ pname = "faircamp";
12+ version = "unstable-2022-01-19";
13+14+ # TODO when switching to a stable release, use fetchFromGitea and add a
15+ # version test. Meanwhile, fetchgit is used to make unstableGitUpdater work.
16+ src = fetchgit {
17+ url = "https://codeberg.org/simonrepp/faircamp.git";
18+ rev = "f8ffc7a35a12251b83966b35c63f72b4912f75a9";
19+ sha256 = "sha256-9t42+813IPLUChbLkcwzoCr7FXSL1g+ZG6I3d+7pmec=";
20+ };
21+22+ cargoHash = "sha256-24ALBede3W8rjlBRdtL0aazRyK1RmNLdHF/bt5i4S5Y=";
23+24+ nativeBuildInputs = [
25+ makeWrapper
26+ ];
27+28+ postInstall = ''
29+ wrapProgram $out/bin/faircamp \
30+ --prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
31+ '';
32+33+ passthru.tests.wav = callPackage ./test-wav.nix { };
34+35+ passthru.updateScript = unstableGitUpdater { };
36+37+ meta = with lib; {
38+ description = "A self-hostable, statically generated bandcamp alternative";
39+ longDescription = ''
40+ Faircamp takes a directory on your disk - your Catalog - and from it
41+ produces a fancy-looking (and technically simple and completely static)
42+ website, which presents your music in a way similar to how popular
43+ commercial service bandcamp does it.
44+45+ You can upload the files faircamp generates to any webspace - no database
46+ and no programming language support (PHP or such) is required. If your
47+ webspace supports SSH access, faircamp can be configured to upload your
48+ website for you automatically, otherwise you can use FTP or whichever
49+ means you prefer to do that manually.
50+ '';
51+ homepage = "https://codeberg.org/simonrepp/faircamp";
52+ license = licenses.gpl3Plus;
53+ maintainers = with maintainers; [ fgaz ];
54+ platforms = platforms.all;
55+ };
56+}