koreader-from-src: specify thirdparty sources as attrs instead of list
This commit is contained in:
@@ -35,12 +35,13 @@ stdenv.mkDerivation rec {
|
|||||||
# hash = "sha256-gdf7AUTpIJ6T4H915YqRG1WzxYHrGmzX6X4dMriWzRA=";
|
# hash = "sha256-gdf7AUTpIJ6T4H915YqRG1WzxYHrGmzX6X4dMriWzRA=";
|
||||||
name = "koreader";
|
name = "koreader";
|
||||||
})
|
})
|
||||||
] ++ (builtins.map
|
] ++ (lib.mapAttrsToList
|
||||||
(s: fetchgit (
|
(name: src: fetchgit (
|
||||||
{
|
{
|
||||||
|
inherit name;
|
||||||
leaveDotGit = true; # maybe not needed, but we'd need another way to query the rev during build process below
|
leaveDotGit = true; # maybe not needed, but we'd need another way to query the rev during build process below
|
||||||
deepClone = true; # probably not needed
|
deepClone = true; # probably not needed
|
||||||
} // s
|
} // src
|
||||||
))
|
))
|
||||||
sources.thirdparty
|
sources.thirdparty
|
||||||
);
|
);
|
||||||
@@ -117,8 +118,8 @@ stdenv.mkDerivation rec {
|
|||||||
chmod u+w -R "$prefix/src/$lib"
|
chmod u+w -R "$prefix/src/$lib"
|
||||||
}
|
}
|
||||||
|
|
||||||
'' + builtins.concatStringsSep "\n" (builtins.map
|
'' + builtins.concatStringsSep "\n" (lib.mapAttrsToList
|
||||||
(l: ''install_lib "${l.name}" "${l.rev}"'')
|
(name: src: ''install_lib "${name}" "${src.rev}"'')
|
||||||
sources.thirdparty
|
sources.thirdparty
|
||||||
) + ''
|
) + ''
|
||||||
|
|
||||||
|
@@ -1,48 +1,41 @@
|
|||||||
{
|
{
|
||||||
thirdparty = [
|
thirdparty = {
|
||||||
{
|
luajit = {
|
||||||
url = "https://github.com/LuaJIT/LuaJIT";
|
url = "https://github.com/LuaJIT/LuaJIT";
|
||||||
rev = "8635cbabf3094c4d8bd00578c7d812bea87bb2d3";
|
rev = "8635cbabf3094c4d8bd00578c7d812bea87bb2d3";
|
||||||
hash = "sha256-8ij/Zjss8Rz5fKL9LJuRiTQdoT9OVMNOY1a4D2hRcEU=";
|
hash = "sha256-8ij/Zjss8Rz5fKL9LJuRiTQdoT9OVMNOY1a4D2hRcEU=";
|
||||||
name = "luajit";
|
};
|
||||||
}
|
libjpeg-turbo = {
|
||||||
{
|
|
||||||
url = "https://github.com/libjpeg-turbo/libjpeg-turbo.git";
|
url = "https://github.com/libjpeg-turbo/libjpeg-turbo.git";
|
||||||
rev = "3.0.0";
|
rev = "3.0.0";
|
||||||
hash = "sha256-CEqlV/LzF5okvPwUDyqDBvL4bTGc6TYqfADHtRLPJb4=";
|
hash = "sha256-CEqlV/LzF5okvPwUDyqDBvL4bTGc6TYqfADHtRLPJb4=";
|
||||||
name = "libjpeg-turbo";
|
};
|
||||||
}
|
djvulibre = {
|
||||||
{
|
|
||||||
url = "https://gitlab.com/koreader/djvulibre.git";
|
url = "https://gitlab.com/koreader/djvulibre.git";
|
||||||
rev = "6a1e5ba1c9ef81c205a4b270c3f121a1e106f4fc";
|
rev = "6a1e5ba1c9ef81c205a4b270c3f121a1e106f4fc";
|
||||||
hash = "sha256-H0HWR+hpAYLGbBdY3BwxgKPUrWhrIsVMnoURdbn8iIE=";
|
hash = "sha256-H0HWR+hpAYLGbBdY3BwxgKPUrWhrIsVMnoURdbn8iIE=";
|
||||||
name = "djvulibre";
|
};
|
||||||
}
|
libpng = {
|
||||||
{
|
|
||||||
url = "https://github.com/glennrp/libpng.git";
|
url = "https://github.com/glennrp/libpng.git";
|
||||||
rev = "v1.6.40";
|
rev = "v1.6.40";
|
||||||
hash = "sha256-/994yXMCaX0fVYH94oPPtwc8VDgZNMKXeGUyHd5H3KI=";
|
hash = "sha256-/994yXMCaX0fVYH94oPPtwc8VDgZNMKXeGUyHd5H3KI=";
|
||||||
name = "libpng";
|
};
|
||||||
}
|
tesseract = {
|
||||||
{
|
|
||||||
url = "https://github.com/tesseract-ocr/tesseract.git";
|
url = "https://github.com/tesseract-ocr/tesseract.git";
|
||||||
rev = "60176fc5ae5e7f6bdef60c926a4b5ea03de2bfa7";
|
rev = "60176fc5ae5e7f6bdef60c926a4b5ea03de2bfa7";
|
||||||
hash = "sha256-xPhXnMdJJFL0UPAzOWUyx2l4lfjVU154/WgbStq9RDo=";
|
hash = "sha256-xPhXnMdJJFL0UPAzOWUyx2l4lfjVU154/WgbStq9RDo=";
|
||||||
name = "tesseract";
|
};
|
||||||
}
|
leptonica = {
|
||||||
{
|
|
||||||
url = "https://github.com/DanBloomberg/leptonica.git";
|
url = "https://github.com/DanBloomberg/leptonica.git";
|
||||||
rev = "1.74.1";
|
rev = "1.74.1";
|
||||||
hash = "sha256-vpgKAPBMQpbF2iCvtX8V+RQ9ynjpWRKN22fOehWxHNE=";
|
hash = "sha256-vpgKAPBMQpbF2iCvtX8V+RQ9ynjpWRKN22fOehWxHNE=";
|
||||||
name = "leptonica";
|
};
|
||||||
}
|
libk2pdfopt = {
|
||||||
{
|
|
||||||
url = "https://github.com/koreader/libk2pdfopt.git";
|
url = "https://github.com/koreader/libk2pdfopt.git";
|
||||||
rev = "60b82eeecf71d1776951da970fe8cd2cc5735ded";
|
rev = "60b82eeecf71d1776951da970fe8cd2cc5735ded";
|
||||||
hash = "sha256-JKf6vA5S7VNqk4GzOaX5k1OgAd0vLmoTXusAzR6Otto=";
|
hash = "sha256-JKf6vA5S7VNqk4GzOaX5k1OgAd0vLmoTXusAzR6Otto=";
|
||||||
name = "libk2pdfopt";
|
};
|
||||||
}
|
};
|
||||||
];
|
|
||||||
|
|
||||||
externalProjects = {
|
externalProjects = {
|
||||||
zlib = {
|
zlib = {
|
||||||
|
Reference in New Issue
Block a user