Unverified Commit 5ae6cb3a authored by Felix Bühler's avatar Felix Bühler Committed by GitHub
Browse files

Merge pull request #263306 from fgaz/faircamp/0.8.0

faircamp: unstable-2023-04-10 -> 0.8.0
parents b30e97ac 04a87a55
Loading
Loading
Loading
Loading
+642 −419

File changed.

Preview size limit exceeded, changes collapsed.

+18 −14
Original line number Diff line number Diff line
{ lib
, stdenv
, rustPlatform
, fetchgit
, fetchFromGitea
, makeWrapper
, pkg-config
, glib
@@ -9,29 +9,32 @@
, vips
, ffmpeg
, callPackage
, unstableGitUpdater
, darwin
, testers
, faircamp
}:

rustPlatform.buildRustPackage {
rustPlatform.buildRustPackage rec {
  pname = "faircamp";
  version = "unstable-2023-04-10";
  version = "0.8.0";

  # TODO when switching to a stable release, use fetchFromGitea and add a
  # version test. Meanwhile, fetchgit is used to make unstableGitUpdater work.
  src = fetchgit {
    url = "https://codeberg.org/simonrepp/faircamp.git";
    rev = "21f775dc35a88c54015694f9757e81c97fa860ea";
    hash = "sha256-aMSMMIGfoiqtg8Dj8QiCbUE40OKQXMXt4hvlvbXQLls=";
  src = fetchFromGitea {
    domain = "codeberg.org";
    owner = "simonrepp";
    repo = "faircamp";
    rev = version;
    hash = "sha256-Rz/wMlVNjaGhk26QMnS4+W3oA/RSdB6FuigC84L8eDg=";
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
    outputHashes = {
      "enolib-0.1.0" = "sha256-0+T8RRQnqbIiIup/aDJgvxeV8sRV4YrlA9JVbQxMfF0=";
      "enolib-0.2.1" = "sha256-ryB5Tk90BvsstdXgYw7F0BJymWWetAIijhVpLeVBOa8=";
    };
  };

  buildFeatures = [ "libvips" ];

  nativeBuildInputs = [
    makeWrapper
    pkg-config
@@ -50,9 +53,10 @@ rustPlatform.buildRustPackage {
      --prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
  '';

  passthru.tests.wav = callPackage ./test-wav.nix { };

  passthru.updateScript = unstableGitUpdater { };
  passthru.tests = {
    wav = callPackage ./test-wav.nix { };
    version = testers.testVersion { package = faircamp; };
  };

  meta = with lib; {
    description = "A self-hostable, statically generated bandcamp alternative";