nixpkgs/pkgs/applications/graphics/displaycal/default.nix

73 lines
1.5 KiB
Nix
Raw Normal View History

{ python2
, stdenv
, fetchurl
, pkgconfig
, libXext
, libXxf86vm
, libX11
, libXrandr
, libXinerama
, libXScrnSaver
, argyllcms
2017-03-04 18:18:04 +00:00
}:
let
2020-05-20 01:05:47 +00:00
inherit (python2.pkgs) buildPythonApplication wxPython numpy dbus-python;
in buildPythonApplication rec {
pname = "displaycal";
2020-05-20 01:05:47 +00:00
version = "3.8.9.3";
2017-03-04 18:18:04 +00:00
enableParallelBuilding = true;
src = fetchurl {
2020-05-20 01:05:47 +00:00
url = "mirror://sourceforge/project/dispcalgui/release/${version}/DisplayCAL-${version}.tar.gz";
sha256 = "1sivi4q7sqsrc95qg5gh37bsm2761md4mpl89hflzwk6kyyxyd3w";
2017-03-04 18:18:04 +00:00
};
propagatedBuildInputs = [
libXext
libXxf86vm
libX11
libXrandr
libXinerama
2018-03-22 20:08:39 +00:00
libXScrnSaver
2017-03-04 18:18:04 +00:00
argyllcms
wxPython
numpy
2020-05-20 01:05:47 +00:00
dbus-python
2017-03-04 18:18:04 +00:00
];
nativeBuildInputs = [
pkgconfig
];
preConfigure = ''
mkdir dist
2020-05-20 01:05:47 +00:00
cp {misc,dist}/net.displaycal.DisplayCAL.appdata.xml
touch dist/copyright
2017-03-04 18:18:04 +00:00
mkdir -p $out
ln -s $out/share/DisplayCAL $out/Resources
'';
# no idea why it looks there - symlink .json lang (everything)
postInstall = ''
for x in $out/share/DisplayCAL/*; do
ln -s $x $out/lib/python2.7/site-packages/DisplayCAL
done
for prog in "$out/bin/"*; do
wrapProgram "$prog" \
--prefix PYTHONPATH : "$PYTHONPATH" \
--prefix PATH : ${argyllcms}/bin
done
'';
meta = {
description = "Display Calibration and Characterization powered by Argyll CMS";
homepage = "https://displaycal.net/";
2017-03-04 18:18:04 +00:00
license = stdenv.lib.licenses.gpl3;
maintainers = [stdenv.lib.maintainers.marcweber];
platforms = stdenv.lib.platforms.linux;
};
}