summary refs log tree commit diff
path: root/pkgs/tools/misc/colord/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-05-31 09:59:33 +0000
committerAlyssa Ross <hi@alyssa.is>2022-05-31 09:59:57 +0000
commit9ff36293d1e428cd7bf03e8d4b03611b6d361c28 (patch)
tree1ab51a42b868c55b83f6ccdb80371b9888739dd9 /pkgs/tools/misc/colord/default.nix
parent1c4fcd0d4b0541e674ee56ace1053e23e562cc80 (diff)
parentddc3c396a51918043bb0faa6f676abd9562be62c (diff)
downloadnixpkgs-archive.tar
nixpkgs-archive.tar.gz
nixpkgs-archive.tar.bz2
nixpkgs-archive.tar.lz
nixpkgs-archive.tar.xz
nixpkgs-archive.tar.zst
nixpkgs-archive.zip
Last good Nixpkgs for Weston+nouveau? archive
I came this commit hash to terwiz[m] on IRC, who is trying to figure out
what the last version of Spectrum that worked on their NUC with Nvidia
graphics is.
Diffstat (limited to 'pkgs/tools/misc/colord/default.nix')
-rw-r--r--pkgs/tools/misc/colord/default.nix117
1 files changed, 117 insertions, 0 deletions
diff --git a/pkgs/tools/misc/colord/default.nix b/pkgs/tools/misc/colord/default.nix
new file mode 100644
index 00000000000..3a1a69c7842
--- /dev/null
+++ b/pkgs/tools/misc/colord/default.nix
@@ -0,0 +1,117 @@
+{ lib
+, stdenv
+, fetchurl
+, nixosTests
+, bash-completion
+, glib
+, polkit
+, pkg-config
+, gettext
+, gusb
+, lcms2
+, sqlite
+, systemd
+, dbus
+, gobject-introspection
+, argyllcms
+, meson
+, ninja
+, vala
+, libgudev
+, wrapGAppsHook
+, shared-mime-info
+, sane-backends
+, docbook_xsl
+, docbook_xsl_ns
+, docbook_xml_dtd_412
+, gtk-doc
+, libxslt
+, enableDaemon ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "colord";
+  version = "1.4.6";
+
+  outputs = [ "out" "dev" "devdoc" "man" "installedTests" ];
+
+  src = fetchurl {
+    url = "https://www.freedesktop.org/software/colord/releases/${pname}-${version}.tar.xz";
+    sha256 = "dAdjGie/5dG2cueuQndwAcEF2GC3tzkig8jGMA3ojm8=";
+  };
+
+  patches = [
+    # Put installed tests into its own output
+    ./installed-tests-path.patch
+  ];
+
+  postPatch = ''
+    for file in data/tests/meson.build lib/colord/cd-test-shared.c lib/colord/meson.build; do
+        substituteInPlace $file --subst-var-by installed_tests_dir "$installedTests"
+    done
+  '';
+
+  mesonFlags = [
+    "--localstatedir=/var"
+    "-Dinstalled_tests=true"
+    "-Dlibcolordcompat=true"
+    "-Dsane=true"
+    "-Dvapi=true"
+    "-Ddaemon=${lib.boolToString enableDaemon}"
+    "-Ddaemon_user=colord"
+  ];
+
+  nativeBuildInputs = [
+    docbook_xml_dtd_412
+    docbook_xsl
+    docbook_xsl_ns
+    gettext
+    gobject-introspection
+    gtk-doc
+    libxslt
+    meson
+    ninja
+    pkg-config
+    shared-mime-info
+    vala
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    argyllcms
+    bash-completion
+    dbus
+    glib
+    gusb
+    lcms2
+    libgudev
+    polkit
+    sane-backends
+    sqlite
+    systemd
+  ];
+
+  postInstall = ''
+    glib-compile-schemas $out/share/glib-2.0/schemas
+  '';
+
+  PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
+  PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
+  PKG_CONFIG_SYSTEMD_TMPFILESDIR = "${placeholder "out"}/lib/tmpfiles.d";
+  PKG_CONFIG_BASH_COMPLETION_COMPLETIONSDIR = "${placeholder "out"}/share/bash-completion/completions";
+  PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev";
+
+  passthru = {
+    tests = {
+      installedTests = nixosTests.installed-tests.colord;
+    };
+  };
+
+  meta = with lib; {
+    description = "System service to manage, install and generate color profiles to accurately color manage input and output devices";
+    homepage = "https://www.freedesktop.org/software/colord/";
+    license = licenses.lgpl2Plus;
+    maintainers = [ maintainers.marcweber ] ++ teams.freedesktop.members;
+    platforms = platforms.linux;
+  };
+}