about summary refs log tree commit diff
path: root/pkgs/tools/misc/colord
diff options
context:
space:
mode:
authorMarc Weber <marco-oweber@gmx.de>2013-05-10 19:17:36 +0200
committerEvgeny Egorochkin <phreedom@yandex.ru>2013-09-15 11:53:11 +0300
commit513dad6527239cdd2b41fad23c3261c6b6a1a85e (patch)
tree51569baa60836f72769724faff22183bf50b04c0 /pkgs/tools/misc/colord
parent953eecb0fcbaaa14ace17f1b10788adadbae25f0 (diff)
downloadnixlib-513dad6527239cdd2b41fad23c3261c6b6a1a85e.tar
nixlib-513dad6527239cdd2b41fad23c3261c6b6a1a85e.tar.gz
nixlib-513dad6527239cdd2b41fad23c3261c6b6a1a85e.tar.bz2
nixlib-513dad6527239cdd2b41fad23c3261c6b6a1a85e.tar.lz
nixlib-513dad6527239cdd2b41fad23c3261c6b6a1a85e.tar.xz
nixlib-513dad6527239cdd2b41fad23c3261c6b6a1a85e.tar.zst
nixlib-513dad6527239cdd2b41fad23c3261c6b6a1a85e.zip
colord, gusb: package.
Part of #517.
Diffstat (limited to 'pkgs/tools/misc/colord')
-rw-r--r--pkgs/tools/misc/colord/default.nix57
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/tools/misc/colord/default.nix b/pkgs/tools/misc/colord/default.nix
new file mode 100644
index 000000000000..e6787ec76c8a
--- /dev/null
+++ b/pkgs/tools/misc/colord/default.nix
@@ -0,0 +1,57 @@
+{ stdenv, fetchurl, fetchgit
+, glib, polkit, pkgconfig, intltool, gusb, libusb1, lcms2, sqlite, systemd, dbus
+
+, automake, autoconf, libtool, gtk_doc, which, gobjectIntrospection
+, version ? "git"
+}:
+
+# colord wants to write to the etc/colord.conf and var/run/colord/mapping.db
+# thus they get symlinked to /etc and /var
+
+stdenv.mkDerivation (stdenv.lib.mergeAttrsByVersion "colord" version {
+  "0.1.33" = {
+    name = "colord-0.1.33";
+    src = fetchurl {
+      url = http://www.freedesktop.org/software/colord/releases/colord-0.1.32.tar.xz;
+      sha256 = "1smbkh4z1c2jjwxg626f12sslv7ff3yzak1zqrc493cl467ll0y7";
+    };
+  };
+  "git" = {
+    name = "colord-git-11dca";
+    src = fetchgit {
+      url = "https://github.com/hughsie/colord.git";
+      rev = "11dcaba034edff3955ceff53795df82c57c34adc";
+      sha256 = "1280q7zbfm5wqql872kcxmk5rmwjs7cv7cgz8nx0i9g4ac8j2mrf";
+    };
+
+    preConfigure = ''
+      ./autogen.sh
+    '';
+    buildInputs = [ automake autoconf libtool gtk_doc which gobjectIntrospection ];
+  };
+} {
+
+  enableParallelBuilding = true;
+
+  preConfigure = ''
+    configureFlags="$configureFlags --with-udevrulesdir=$out/lib/udev/rules.d --with-systemdsystemunitdir=$out/lib/udev/rules.d"
+  '';
+
+  buildInputs = [glib polkit pkgconfig intltool gusb libusb1 lcms2 sqlite systemd dbus];
+
+  postInstall = ''
+    sed -i '/usb_id\|usb-db/d' $out/lib/udev/rules.d/69-cd-sensors.rules
+    mv $out/etc/colord.conf{,.default}
+    ln -s /etc/colord.conf $out/etc/colord.conf
+    rm -fr $out/var/lib/colord
+    ln -s /var/lib/colord $out/var/lib/colord
+  '';
+
+  meta = {
+    description = "system service that makes it easy to manage, install and generate color profiles to accurately color manage input and output devices";
+    homepage = http://www.freedesktop.org/software/colord/intro.html;
+    license = stdenv.lib.licenses.lgpl2Plus;
+    maintainers = [stdenv.lib.maintainers.marcweber];
+    platforms = stdenv.lib.platforms.linux;
+  };
+})