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