nixpkgs/pkgs/applications/graphics/displaycal/default.nix
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00

73 lines
1.5 KiB
Nix

{ python2
, lib, stdenv
, fetchurl
, pkg-config
, libXext
, libXxf86vm
, libX11
, libXrandr
, libXinerama
, libXScrnSaver
, argyllcms
}:
let
inherit (python2.pkgs) buildPythonApplication wxPython numpy dbus-python;
in buildPythonApplication rec {
pname = "displaycal";
version = "3.8.9.3";
enableParallelBuilding = true;
src = fetchurl {
url = "mirror://sourceforge/project/dispcalgui/release/${version}/DisplayCAL-${version}.tar.gz";
sha256 = "1sivi4q7sqsrc95qg5gh37bsm2761md4mpl89hflzwk6kyyxyd3w";
};
propagatedBuildInputs = [
libXext
libXxf86vm
libX11
libXrandr
libXinerama
libXScrnSaver
argyllcms
wxPython
numpy
dbus-python
];
nativeBuildInputs = [
pkg-config
];
preConfigure = ''
mkdir dist
cp {misc,dist}/net.displaycal.DisplayCAL.appdata.xml
touch dist/copyright
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/";
license = lib.licenses.gpl3;
maintainers = [lib.maintainers.marcweber];
platforms = lib.platforms.linux;
};
}