···11+{ lib
22+, rustPlatform
33+, fetchgit
44+, makeWrapper
55+, ffmpeg
66+, callPackage
77+, unstableGitUpdater
88+}:
99+1010+rustPlatform.buildRustPackage {
1111+ pname = "faircamp";
1212+ version = "unstable-2022-01-19";
1313+1414+ # TODO when switching to a stable release, use fetchFromGitea and add a
1515+ # version test. Meanwhile, fetchgit is used to make unstableGitUpdater work.
1616+ src = fetchgit {
1717+ url = "https://codeberg.org/simonrepp/faircamp.git";
1818+ rev = "f8ffc7a35a12251b83966b35c63f72b4912f75a9";
1919+ sha256 = "sha256-9t42+813IPLUChbLkcwzoCr7FXSL1g+ZG6I3d+7pmec=";
2020+ };
2121+2222+ cargoHash = "sha256-24ALBede3W8rjlBRdtL0aazRyK1RmNLdHF/bt5i4S5Y=";
2323+2424+ nativeBuildInputs = [
2525+ makeWrapper
2626+ ];
2727+2828+ postInstall = ''
2929+ wrapProgram $out/bin/faircamp \
3030+ --prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
3131+ '';
3232+3333+ passthru.tests.wav = callPackage ./test-wav.nix { };
3434+3535+ passthru.updateScript = unstableGitUpdater { };
3636+3737+ meta = with lib; {
3838+ description = "A self-hostable, statically generated bandcamp alternative";
3939+ longDescription = ''
4040+ Faircamp takes a directory on your disk - your Catalog - and from it
4141+ produces a fancy-looking (and technically simple and completely static)
4242+ website, which presents your music in a way similar to how popular
4343+ commercial service bandcamp does it.
4444+4545+ You can upload the files faircamp generates to any webspace - no database
4646+ and no programming language support (PHP or such) is required. If your
4747+ webspace supports SSH access, faircamp can be configured to upload your
4848+ website for you automatically, otherwise you can use FTP or whichever
4949+ means you prefer to do that manually.
5050+ '';
5151+ homepage = "https://codeberg.org/simonrepp/faircamp";
5252+ license = licenses.gpl3Plus;
5353+ maintainers = with maintainers; [ fgaz ];
5454+ platforms = platforms.all;
5555+ };
5656+}