tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
dart.printing: init
aucub
1 year ago
cdfe4702
1b169c7e
+74
3 changed files
expand all
collapse all
unified
split
pkgs
development
compilers
dart
package-source-builders
default.nix
printing
default.nix
printing.patch
+1
pkgs/development/compilers/dart/package-source-builders/default.nix
···
8
8
matrix = callPackage ./matrix { };
9
9
media_kit_libs_linux = callPackage ./media_kit_libs_linux { };
10
10
olm = callPackage ./olm { };
11
11
+
printing = callPackage ./printing { };
11
12
rhttp = callPackage ./rhttp { };
12
13
sqlcipher_flutter_libs = callPackage ./sqlcipher_flutter_libs { };
13
14
sqlite3 = callPackage ./sqlite3 { };
+28
pkgs/development/compilers/dart/package-source-builders/printing/default.nix
···
1
1
+
{
2
2
+
stdenv,
3
3
+
pdfium-binaries,
4
4
+
replaceVars,
5
5
+
}:
6
6
+
7
7
+
{ version, src, ... }:
8
8
+
9
9
+
stdenv.mkDerivation rec {
10
10
+
pname = "printing";
11
11
+
inherit version src;
12
12
+
inherit (src) passthru;
13
13
+
14
14
+
patches = [
15
15
+
(replaceVars ./printing.patch {
16
16
+
inherit pdfium-binaries;
17
17
+
})
18
18
+
];
19
19
+
20
20
+
installPhase = ''
21
21
+
runHook preInstall
22
22
+
23
23
+
mkdir $out
24
24
+
cp -a ./* $out/
25
25
+
26
26
+
runHook postInstall
27
27
+
'';
28
28
+
}
+45
pkgs/development/compilers/dart/package-source-builders/printing/printing.patch
···
1
1
+
--- old/linux/CMakeLists.txt 2024-07-16 18:45:19.000000000 +0800
2
2
+
+++ new/linux/CMakeLists.txt 2024-10-01 01:49:05.544910894 +0800
3
3
+
@@ -16,6 +16,7 @@
4
4
+
set(PROJECT_NAME "printing")
5
5
+
project(${PROJECT_NAME} LANGUAGES CXX)
6
6
+
7
7
+
+set(PDFIUM_DIR @pdfium-binaries@)
8
8
+
set(PDFIUM_VERSION "5200" CACHE STRING "Version of pdfium used")
9
9
+
string(REPLACE "linux-" "" TARGET_ARCH ${FLUTTER_TARGET_PLATFORM})
10
10
+
set(PDFIUM_ARCH ${TARGET_ARCH} CACHE STRING "Architecture of pdfium used")
11
11
+
@@ -32,18 +33,11 @@
12
12
+
)
13
13
+
endif()
14
14
+
15
15
+
-# Download pdfium
16
16
+
-include(../windows/DownloadProject.cmake)
17
17
+
-download_project(PROJ
18
18
+
- pdfium
19
19
+
- URL
20
20
+
- ${PDFIUM_URL})
21
21
+
-
22
22
+
# This value is used when generating builds using this plugin, so it must not be
23
23
+
# changed
24
24
+
set(PLUGIN_NAME "printing_plugin")
25
25
+
26
26
+
-include(${pdfium_SOURCE_DIR}/PDFiumConfig.cmake)
27
27
+
+include(${PDFIUM_DIR}/PDFiumConfig.cmake)
28
28
+
29
29
+
# System-level dependencies.
30
30
+
find_package(PkgConfig REQUIRED)
31
31
+
@@ -67,7 +61,7 @@
32
32
+
target_link_libraries(${PLUGIN_NAME}
33
33
+
PRIVATE PkgConfig::GTK PkgConfig::GTKUnixPrint)
34
34
+
target_link_libraries(${PLUGIN_NAME} PRIVATE pdfium)
35
35
+
-get_filename_component(PDFium_lib_path "${PDFium_LIBRARY}" DIRECTORY)
36
36
+
+set(PDFium_lib_path "${PDFIUM_DIR}/lib")
37
37
+
set_target_properties(${PLUGIN_NAME}
38
38
+
PROPERTIES SKIP_BUILD_RPATH
39
39
+
FALSE
40
40
+
@@ -77,4 +71,4 @@
41
41
+
"$ORIGIN:${PDFium_lib_path}")
42
42
+
43
43
+
# List of absolute paths to libraries that should be bundled with the plugin
44
44
+
-set(printing_bundled_libraries "${PDFium_LIBRARY}" PARENT_SCOPE)
45
45
+
+set(printing_bundled_libraries "${PDFIUM_DIR}/lib/libpdfium.so" PARENT_SCOPE)