Unverified Commit 49eb7acd authored by Wolfgang Walther's avatar Wolfgang Walther Committed by GitHub
Browse files

ansel: fix compilation, remove libsoup_2_4 and make improvements (#432089)

parents 4b66d476 ecb90c5b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -16085,6 +16085,12 @@
    githubId = 51356;
    name = "Mathieu Boespflug";
  };
  mBornand = {
    email = "dev.mbornand@systemb.ch";
    github = "mBornand";
    githubId = 63592189;
    name = "Marc Bornand";
  };
  mbprtpmnr = {
    name = "mbprtpmnr";
    email = "mbprtpmnr@pm.me";
+57 −57
Original line number Diff line number Diff line
{
  libsepol,
  libavif,
  bash,
  curl,
  librsvg,
  libselinux,
  util-linux,
  libwebp,
  libheif,
  lib,
  stdenv,
  fetchFromGitHub,
  libxslt,
  libxml2,
  cmake,
  colord,
  colord-gtk,
  curl,
  dav1d,
  desktop-file-utils,
  exiftool,
  openexr,
  exiv2,
  fetchFromGitHub,
  glib,
  python3Packages,
  perlPackages,
  lensfun,
  intltool,
  pkg-config,
  desktop-file-utils,
  libffi,
  gtk3,
  libjpeg,
  pugixml,
  pcre,
  pcre2,
  lcms,
  sqlite,
  json-glib,
  jasper,
  libsecret,
  gmic,
  graphicsmagick,
  gtk3,
  icu,
  colord,
  colord-gtk,
  intltool,
  isocodes,
  jasper,
  json-glib,
  lcms,
  lensfun,
  lerc,
  lib,
  libaom,
  libavif,
  libdatrie,
  libsysprof-capture,
  libde265,
  isocodes,
  libpsl,
  libepoxy,
  libsoup_2_4,
  exiv2,
  libXtst,
  libffi,
  libgcrypt,
  libgpg-error,
  libheif,
  libjpeg,
  libpsl,
  librsvg,
  libsecret,
  libselinux,
  libsepol,
  libsoup_3,
  libsysprof-capture,
  libthai,
  x265,
  libwebp,
  libXdmcp,
  openjpeg,
  libgpg-error,
  libxkbcommon,
  libxml2,
  libXtst,
  llvmPackages,
  openexr,
  openjpeg,
  osm-gps-map,
  wrapGAppsHook3,
  pcre2,
  perlPackages,
  pkg-config,
  pugixml,
  python3Packages,
  rav1e,
  dav1d,
  libgcrypt,
  graphicsmagick,
  saxon,
  sqlite,
  stdenv,
  unstableGitUpdater,
  util-linux,
  wrapGAppsHook3,
  x265,
}:

let
@@ -103,11 +104,12 @@ stdenv.mkDerivation {
    desktop-file-utils
    exiftool
    intltool
    libxml2
    llvmPackages.llvm
    pkg-config
    perlPackages.perl
    python3Packages.jsonschema
    wrapGAppsHook3
    saxon
  ];

  buildInputs = [
@@ -127,8 +129,9 @@ stdenv.mkDerivation {
    jasper
    lcms
    lensfun
    lerc
    libaom
    libavif_0_11
    libavif
    libdatrie
    libde265
    libepoxy
@@ -142,18 +145,17 @@ stdenv.mkDerivation {
    libsecret
    libselinux
    libsepol
    libsoup_2_4
    libsoup_3
    libsysprof-capture
    libthai
    libwebp
    libXdmcp
    libxkbcommon
    libxslt
    libxml2
    libXtst
    openexr
    openjpeg
    osm-gps-map
    pcre
    pcre2
    perlPackages.Po4a
    pugixml
@@ -168,22 +170,20 @@ stdenv.mkDerivation {
      --prefix LD_LIBRARY_PATH ":" "$out/lib/ansel"
    )
  '';
  cmakeFlags = [
    "-DBINARY_PACKAGE_BUILD=1"
  ];

  passthru.updateScript = unstableGitUpdater {
    # Tags inherited from Darktable, + a "nightly" 0.0.0 tag that new artefacts get attached to
    hardcodeZeroVersion = true;
  };

  # cmake can't find the binary itself
  cmakeFlags = [
    (lib.cmakeFeature "Xsltproc_BIN" (lib.getExe' libxslt "xsltproc"))
  ];

  meta = {
    description = "Darktable fork minus the bloat plus some design vision";
    homepage = "https://ansel.photos/";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ ];
    maintainers = with lib.maintainers; [ mBornand ];
    mainProgram = "ansel";
    platforms = lib.platforms.linux;
  };
+1 −13
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@
  lib,
  stdenv,
  fetchurl,
  runCommand,

  # nativeBuildInputs
  cmake,
@@ -80,17 +79,6 @@
  gitUpdater,
}:

let
  # Create a wrapper for saxon to provide saxon-xslt command
  saxon-xslt = runCommand "saxon-xslt" { } ''
    mkdir -p $out/bin
    cat > $out/bin/saxon-xslt << 'EOF'
    #!/bin/sh
    exec ${saxon}/bin/saxon "$@"
    EOF
    chmod +x $out/bin/saxon-xslt
  '';
in
stdenv.mkDerivation rec {
  version = "5.2.1";
  pname = "darktable";
@@ -109,7 +97,7 @@ stdenv.mkDerivation rec {
    perl
    pkg-config
    wrapGAppsHook3
    saxon-xslt # Use Saxon instead of libxslt to fix XSLT generate-id() consistency issues
    saxon # Use Saxon instead of libxslt to fix XSLT generate-id() consistency issues
  ];

  buildInputs = [
+4 −0
Original line number Diff line number Diff line
@@ -53,6 +53,10 @@ let
          mkdir -p $out/bin
          makeWrapper ${lib.getExe jre} $out/bin/${mainProgram} \
            --add-flags "-jar $out/share/java/${jar'}.jar"

          # Other distributions like debian distribute it as saxon*-xslt,
          # this makes compilling packages that target other distros easier.
          ln -s $out/bin/${mainProgram} $out/bin/${mainProgram}-xslt
        ''
        + lib.optionalString (versionAtLeast finalAttrs.version "11") ''
          mv lib $out/share/java