diff --git a/pkgs/development/libraries/openjpeg/1.x.nix b/pkgs/development/libraries/openjpeg/1.x.nix index 2147bab0a6a..14886f02142 100644 --- a/pkgs/development/libraries/openjpeg/1.x.nix +++ b/pkgs/development/libraries/openjpeg/1.x.nix @@ -1,7 +1,10 @@ -{ callPackage, ... } @ args: +{ callPackage, fetchurl, ... } @ args: callPackage ./generic.nix (args // rec { version = "${branch}.2"; branch = "1.5"; - sha256 = "11waq9w215zvzxrpv40afyd18qf79mxc28fda80bm3ax98cpppqm"; + src = fetchurl { + url = "mirror://gentoo/distfiles/openjpeg-${version}.tar.gz"; + sha256 = "11waq9w215zvzxrpv40afyd18qf79mxc28fda80bm3ax98cpppqm"; + }; }) diff --git a/pkgs/development/libraries/openjpeg/2.0.1.nix b/pkgs/development/libraries/openjpeg/2.0.1.nix new file mode 100644 index 00000000000..25575450b47 --- /dev/null +++ b/pkgs/development/libraries/openjpeg/2.0.1.nix @@ -0,0 +1,10 @@ +{ callPackage, fetchurl, ... } @ args: + +callPackage ./generic.nix (args // rec { + version = "${branch}.0.1"; + branch = "2"; + src = fetchurl { + url = "mirror://sourceforge/openjpeg.mirror/openjpeg-${version}.tar.gz"; + sha256 = "1c2xc3nl2mg511b63rk7hrckmy14681p1m44mzw3n1fyqnjm0b0z"; + }; +}) diff --git a/pkgs/development/libraries/openjpeg/2.1.nix b/pkgs/development/libraries/openjpeg/2.1.nix new file mode 100644 index 00000000000..7e48b656ae2 --- /dev/null +++ b/pkgs/development/libraries/openjpeg/2.1.nix @@ -0,0 +1,10 @@ +{ callPackage, fetchurl, ... } @ args: + +callPackage ./generic.nix (args // rec { + version = "${branch}.0"; + branch = "2.1"; + src = fetchurl { + url = "mirror://gentoo/distfiles/openjpeg-${version}.tar.gz"; + sha256 = "00zzm303zvv4ijzancrsb1cqbph3pgz0nky92k9qx3fq9y0vnchj"; + }; +}) diff --git a/pkgs/development/libraries/openjpeg/2.x.nix b/pkgs/development/libraries/openjpeg/2.x.nix deleted file mode 100644 index f6b3ce3a9cd..00000000000 --- a/pkgs/development/libraries/openjpeg/2.x.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ callPackage, ... } @ args: - -callPackage ./generic.nix (args // rec { - version = "${branch}.0"; - branch = "2.1"; - sha256 = "00zzm303zvv4ijzancrsb1cqbph3pgz0nky92k9qx3fq9y0vnchj"; -}) diff --git a/pkgs/development/libraries/openjpeg/generic.nix b/pkgs/development/libraries/openjpeg/generic.nix index 4418ecd1fd0..a635f68839b 100644 --- a/pkgs/development/libraries/openjpeg/generic.nix +++ b/pkgs/development/libraries/openjpeg/generic.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, pkgconfig, libpng, libtiff, lcms2, glib/*passthru only*/ +{ stdenv, cmake, pkgconfig, libpng, libtiff, lcms2, glib/*passthru only*/ , sharedLibsSupport ? true # Build shared libraries , codecSupport ? true # Codec executables , mj2Support ? true # MJ2 executables @@ -11,7 +11,7 @@ , thirdPartySupport ? false # Third party libraries - OFF: only build when found, ON: always build , testsSupport ? false # Inherit generics -, branch, sha256, version, ... +, branch, src, version, ... }: assert jpipServerSupport -> (jpipLibSupport && (curl != null) && (fcgi != null)); @@ -28,11 +28,7 @@ stdenv.mkDerivation rec { name = "openjpeg-${version}"; inherit branch; inherit version; - - src = fetchurl { - url = "mirror://gentoo/distfiles/${name}.tar.gz"; - inherit sha256; - }; + inherit src; cmakeFlags = [ (mkFlag sharedLibsSupport "BUILD_SHARED_LIBS") diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4dea95572d6..db97fb7126d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6944,8 +6944,9 @@ let opal = callPackage ../development/libraries/opal {}; openjpeg_1 = callPackage ../development/libraries/openjpeg/1.x.nix { }; - openjpeg_2 = callPackage ../development/libraries/openjpeg/2.x.nix { }; - openjpeg = openjpeg_2; + openjpeg_2_0_1 = callPackage ../development/libraries/openjpeg/2.0.1.nix { }; + openjpeg_2_1 = callPackage ../development/libraries/openjpeg/2.1.nix { }; + openjpeg = openjpeg_2_1; openscenegraph = callPackage ../development/libraries/openscenegraph { giflib = giflib_4_1; @@ -11005,7 +11006,9 @@ let lua = lua5; }; - mupdf = callPackage ../applications/misc/mupdf { }; + mupdf = callPackage ../applications/misc/mupdf { + openjpeg = openjpeg_2_0_1; + }; mypaint = callPackage ../applications/graphics/mypaint { };