push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,82 @@
{
lib,
stdenv,
fetchFromGitHub,
puredata,
pkg-config,
cmake,
openssl,
libogg,
libvorbis,
opusfile,
ffmpeg,
zlib,
}:
stdenv.mkDerivation rec {
pname = "pd-else";
version = "1.0-rc13";
src = fetchFromGitHub {
owner = "porres";
repo = "pd-else";
tag = "v.${version}";
hash = "sha256-WebjdozcFup2xk3cS9LPTiA6m0l1sR6sj3hHlt6ScfU=";
};
nativeBuildInputs = [
pkg-config
cmake
];
buildInputs = [
puredata
openssl
libogg
libvorbis
opusfile
ffmpeg
zlib
];
# Set up Pure Data headers and configure with system libraries
preConfigure = ''
substituteInPlace CMakeLists.txt \
--replace-fail 'add_subdirectory(Source/Shared/ffmpeg)' '# add_subdirectory(Source/Shared/ffmpeg) - using system FFmpeg' \
--replace-fail 'target_link_libraries(play.file_tilde PRIVATE ffmpeg)' 'target_link_libraries(play.file_tilde PRIVATE avformat avcodec avutil swresample z)' \
--replace-fail 'target_link_libraries(sfload PRIVATE ffmpeg)' 'target_link_libraries(sfload PRIVATE avformat avcodec avutil swresample z)' \
--replace-fail 'target_link_libraries(sfinfo PRIVATE ffmpeg)' 'target_link_libraries(sfinfo PRIVATE avformat avcodec avutil swresample z)'
'';
cmakeFlags = [
"-DCMAKE_C_FLAGS=-I${puredata}/include/pd"
"-DCMAKE_CXX_FLAGS=-I${puredata}/include/pd"
"-DUSE_LTO=ON"
"-DOPENSSL_CRYPTO_LIBRARY=${lib.getLib openssl}/lib/libcrypto.so"
"-DOPENSSL_SSL_LIBRARY=${lib.getLib openssl}/lib/libssl.so"
];
postInstall = ''
mv else/ $out/else/
rm -rf $out/include/ $out/lib/
'';
postFixup = ''
interpreter=$(cat $NIX_CC/nix-support/dynamic-linker)
find $out -type f -executable -exec patchelf --set-interpreter "$interpreter" --set-rpath ${lib.makeLibraryPath buildInputs} {} \;
'';
meta = {
description = "EL Locus Solus' Externals for Pure Data";
longDescription = ''
ELSE is a library of externals and abstractions for Pure Data.
It provides a comprehensive set of tools for signal processing,
MIDI, GUI, and more in Pure Data.
'';
homepage = "https://github.com/porres/pd-else";
license = lib.licenses.wtfpl;
platforms = lib.platforms.unix;
broken = stdenv.hostPlatform.isDarwin;
maintainers = [ lib.maintainers.kugland ];
};
}

View File

@@ -0,0 +1,148 @@
{
lib,
stdenv,
callPackage,
ctestCheckHook,
fetchFromGitHub,
testers,
enableE57 ? lib.meta.availableOn stdenv.hostPlatform libe57format,
cmake,
curl,
gdal,
gtest,
hdf5-cpp,
laszip,
libe57format,
libgeotiff,
libpq,
libtiff,
libxml2,
openscenegraph,
pkg-config,
proj,
sqlite,
tiledb,
xercesc,
zlib,
zstd,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pdal";
version = "2.9.2";
src = fetchFromGitHub {
owner = "PDAL";
repo = "PDAL";
tag = finalAttrs.version;
hash = "sha256-W3HTgdLHzETfmp/DZ5s9pWXQeBaic4/O55ckGzDDtxs=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
curl
gdal
gtest
hdf5-cpp
laszip
libgeotiff
libpq
libtiff
libxml2
openscenegraph
proj
sqlite
tiledb
xercesc
zlib
zstd
]
++ lib.optionals enableE57 [
libe57format
];
strictDeps = true;
cmakeFlags = [
"-DBUILD_PLUGIN_E57=${if enableE57 then "ON" else "OFF"}"
"-DBUILD_PLUGIN_HDF=ON"
"-DBUILD_PLUGIN_PGPOINTCLOUD=ON"
"-DBUILD_PLUGIN_TILEDB=ON"
"-DWITH_COMPLETION=ON"
"-DWITH_TESTS=ON"
"-DBUILD_PGPOINTCLOUD_TESTS=OFF"
# Plugins can probably not be made work easily:
"-DBUILD_PLUGIN_CPD=OFF"
"-DBUILD_PLUGIN_FBX=OFF" # Autodesk FBX SDK is gratis+proprietary; not packaged in nixpkgs
"-DBUILD_PLUGIN_GEOWAVE=OFF"
"-DBUILD_PLUGIN_I3S=OFF"
"-DBUILD_PLUGIN_ICEBRIDGE=OFF"
"-DBUILD_PLUGIN_MATLAB=OFF"
"-DBUILD_PLUGIN_MBIO=OFF"
"-DBUILD_PLUGIN_MRSID=OFF"
"-DBUILD_PLUGIN_NITF=OFF"
"-DBUILD_PLUGIN_OCI=OFF"
"-DBUILD_PLUGIN_RDBLIB=OFF" # Riegl rdblib is proprietary; not packaged in nixpkgs
"-DBUILD_PLUGIN_RIVLIB=OFF"
];
doCheck = true;
# tests are flaky and they seem to fail less often when they don't run in
# parallel
enableParallelChecking = false;
disabledTests = [
# Tests failing due to TileDB library implementation, disabled also
# by upstream CI.
# See: https://github.com/PDAL/PDAL/blob/2.9.2/.github/workflows/linux.yml#L81
"pdal_io_tiledb_writer_test"
"pdal_io_tiledb_reader_test"
"pdal_io_tiledb_time_writer_test"
"pdal_io_tiledb_time_reader_test"
"pdal_io_tiledb_bit_fields_test"
"pdal_io_tiledb_utils_test"
"pdal_io_e57_read_test"
"pdal_io_e57_write_test"
"pdal_io_stac_reader_test"
# Require data to be downloaded from Internet
"pdal_io_copc_reader_test"
];
nativeCheckInputs = [
gdal # gdalinfo
ctestCheckHook
];
postInstall = ''
patchShebangs --update --build $out/bin/pdal-config
'';
passthru.tests = {
version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "pdal --version";
version = "pdal ${finalAttrs.finalPackage.version}";
};
pdal = callPackage ./tests.nix { pdal = finalAttrs.finalPackage; };
pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
};
meta = with lib; {
description = "Point Data Abstraction Library. GDAL for point cloud data";
homepage = "https://pdal.io";
license = licenses.bsd3;
teams = [ teams.geospatial ];
platforms = platforms.all;
pkgConfigModules = [ "pdal" ];
};
})

View File

@@ -0,0 +1,9 @@
{ runCommand, pdal }:
let
inherit (pdal) pname;
in
runCommand "${pname}-tests" { meta.timeout = 60; } ''
${pdal}/bin/pdal --drivers
touch $out
''

945
pkgs/by-name/pd/pdepend/composer.lock generated Normal file
View File

@@ -0,0 +1,945 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "798f54294447492ecbff9cff6999c060",
"packages": [
{
"name": "psr/container",
"version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963",
"reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963",
"shasum": ""
},
"require": {
"php": ">=7.4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common Container Interface (PHP FIG PSR-11)",
"homepage": "https://github.com/php-fig/container",
"keywords": [
"PSR-11",
"container",
"container-interface",
"container-interop",
"psr"
],
"support": {
"issues": "https://github.com/php-fig/container/issues",
"source": "https://github.com/php-fig/container/tree/2.0.2"
},
"time": "2021-11-05T16:47:00+00:00"
},
{
"name": "symfony/config",
"version": "v7.0.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
"reference": "86a5027869ca3d6bdecae6d5d6c2f77c8f2c1d16"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/config/zipball/86a5027869ca3d6bdecae6d5d6c2f77c8f2c1d16",
"reference": "86a5027869ca3d6bdecae6d5d6c2f77c8f2c1d16",
"shasum": ""
},
"require": {
"php": ">=8.2",
"symfony/deprecation-contracts": "^2.5|^3",
"symfony/filesystem": "^6.4|^7.0",
"symfony/polyfill-ctype": "~1.8"
},
"conflict": {
"symfony/finder": "<6.4",
"symfony/service-contracts": "<2.5"
},
"require-dev": {
"symfony/event-dispatcher": "^6.4|^7.0",
"symfony/finder": "^6.4|^7.0",
"symfony/messenger": "^6.4|^7.0",
"symfony/service-contracts": "^2.5|^3",
"symfony/yaml": "^6.4|^7.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Config\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Helps you find, load, combine, autofill and validate configuration values of any kind",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/config/tree/v7.0.3"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-01-30T08:34:29+00:00"
},
{
"name": "symfony/dependency-injection",
"version": "v7.0.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
"reference": "e915c6684b8e3ae90a4441f6823ebbb40edf0b92"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/e915c6684b8e3ae90a4441f6823ebbb40edf0b92",
"reference": "e915c6684b8e3ae90a4441f6823ebbb40edf0b92",
"shasum": ""
},
"require": {
"php": ">=8.2",
"psr/container": "^1.1|^2.0",
"symfony/deprecation-contracts": "^2.5|^3",
"symfony/service-contracts": "^3.3",
"symfony/var-exporter": "^6.4|^7.0"
},
"conflict": {
"ext-psr": "<1.1|>=2",
"symfony/config": "<6.4",
"symfony/finder": "<6.4",
"symfony/yaml": "<6.4"
},
"provide": {
"psr/container-implementation": "1.1|2.0",
"symfony/service-implementation": "1.1|2.0|3.0"
},
"require-dev": {
"symfony/config": "^6.4|^7.0",
"symfony/expression-language": "^6.4|^7.0",
"symfony/yaml": "^6.4|^7.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\DependencyInjection\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Allows you to standardize and centralize the way objects are constructed in your application",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/dependency-injection/tree/v7.0.3"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-01-30T08:34:29+00:00"
},
{
"name": "symfony/deprecation-contracts",
"version": "v3.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "7c3aff79d10325257a001fcf92d991f24fc967cf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf",
"reference": "7c3aff79d10325257a001fcf92d991f24fc967cf",
"shasum": ""
},
"require": {
"php": ">=8.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.4-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"files": [
"function.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2023-05-23T14:45:45+00:00"
},
{
"name": "symfony/filesystem",
"version": "v7.0.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "2890e3a825bc0c0558526c04499c13f83e1b6b12"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/2890e3a825bc0c0558526c04499c13f83e1b6b12",
"reference": "2890e3a825bc0c0558526c04499c13f83e1b6b12",
"shasum": ""
},
"require": {
"php": ">=8.2",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-mbstring": "~1.8"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Filesystem\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/filesystem/tree/v7.0.3"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-01-23T15:02:46+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4",
"reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-ctype": "*"
},
"suggest": {
"ext-ctype": "For best performance"
},
"type": "library",
"extra": {
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for ctype functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"ctype",
"polyfill",
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
"reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-mbstring": "*"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"type": "library",
"extra": {
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/service-contracts",
"version": "v3.4.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
"reference": "fe07cbc8d837f60caf7018068e350cc5163681a0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/fe07cbc8d837f60caf7018068e350cc5163681a0",
"reference": "fe07cbc8d837f60caf7018068e350cc5163681a0",
"shasum": ""
},
"require": {
"php": ">=8.1",
"psr/container": "^1.1|^2.0"
},
"conflict": {
"ext-psr": "<1.1|>=2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.4-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\Service\\": ""
},
"exclude-from-classmap": [
"/Test/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Generic abstractions related to writing services",
"homepage": "https://symfony.com",
"keywords": [
"abstractions",
"contracts",
"decoupling",
"interfaces",
"interoperability",
"standards"
],
"support": {
"source": "https://github.com/symfony/service-contracts/tree/v3.4.1"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2023-12-26T14:02:43+00:00"
},
{
"name": "symfony/var-exporter",
"version": "v7.0.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-exporter.git",
"reference": "1fb79308cb5fc2b44bff6e8af10a5af6812e05b8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-exporter/zipball/1fb79308cb5fc2b44bff6e8af10a5af6812e05b8",
"reference": "1fb79308cb5fc2b44bff6e8af10a5af6812e05b8",
"shasum": ""
},
"require": {
"php": ">=8.2"
},
"require-dev": {
"symfony/var-dumper": "^6.4|^7.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\VarExporter\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Allows exporting any serializable PHP data structure to plain PHP code",
"homepage": "https://symfony.com",
"keywords": [
"clone",
"construct",
"export",
"hydrate",
"instantiate",
"lazy-loading",
"proxy",
"serialize"
],
"support": {
"source": "https://github.com/symfony/var-exporter/tree/v7.0.3"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-01-23T15:02:46+00:00"
}
],
"packages-dev": [
{
"name": "easy-doc/easy-doc",
"version": "1.4.1",
"source": {
"type": "git",
"url": "https://github.com/kylekatarnls/php-easy-doc.git",
"reference": "194433f262ca2ba65089e095b574b7b81891f27b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/kylekatarnls/php-easy-doc/zipball/194433f262ca2ba65089e095b574b7b81891f27b",
"reference": "194433f262ca2ba65089e095b574b7b81891f27b",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0",
"simple-cli/simple-cli": "^1.4.1"
},
"require-dev": {
"erusev/parsedown": "^1.7",
"phpunit/phpunit": "^7.5.18",
"symfony/process": "^4.4 || ^5.0"
},
"bin": [
"bin/easy-doc"
],
"type": "library",
"autoload": {
"psr-4": {
"EasyDoc\\": "src/EasyDoc/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "KyleK",
"email": "kylekatarnls@gmail.com"
}
],
"description": "An easy way to generate a static website from HTML/Markdown/RST/Pug/anything sources",
"support": {
"issues": "https://github.com/kylekatarnls/php-easy-doc/issues",
"source": "https://github.com/kylekatarnls/php-easy-doc/tree/master"
},
"funding": [
{
"url": "https://github.com/kylekatarnls",
"type": "github"
},
{
"url": "https://opencollective.com/Carbon",
"type": "open_collective"
},
{
"url": "https://tidelift.com/funding/github/packagist/nesbot/carbon",
"type": "tidelift"
}
],
"time": "2020-05-24T10:15:11+00:00"
},
{
"name": "gregwar/rst",
"version": "v1.0.6",
"target-dir": "Gregwar/RST",
"source": {
"type": "git",
"url": "https://github.com/Gregwar/RST.git",
"reference": "93c630ae18c47d8f7503230fa6ca39a79ad3c598"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Gregwar/RST/zipball/93c630ae18c47d8f7503230fa6ca39a79ad3c598",
"reference": "93c630ae18c47d8f7503230fa6ca39a79ad3c598",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"symfony/polyfill-mbstring": "^1.12"
},
"require-dev": {
"phpunit/phpunit": "^6.4"
},
"type": "library",
"autoload": {
"psr-0": {
"Gregwar\\RST": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Grégoire Passault",
"email": "g.passault@gmail.com",
"homepage": "http://www.gregwar.com/"
}
],
"description": "PHP library to parse reStructuredText documents",
"homepage": "https://github.com/Gregwar/RST",
"keywords": [
"markup",
"parser",
"rst"
],
"support": {
"issues": "https://github.com/Gregwar/RST/issues",
"source": "https://github.com/Gregwar/RST/tree/v1.0.6"
},
"time": "2020-04-09T08:09:05+00:00"
},
{
"name": "simple-cli/simple-cli",
"version": "1.6.0",
"source": {
"type": "git",
"url": "https://github.com/kylekatarnls/simple-cli.git",
"reference": "47055c9a172ab032e33a498001d2978c9800fd59"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/kylekatarnls/simple-cli/zipball/47055c9a172ab032e33a498001d2978c9800fd59",
"reference": "47055c9a172ab032e33a498001d2978c9800fd59",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.15.0",
"phan/phan": "^2.3",
"phpmd/phpmd": "dev-master",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^7",
"squizlabs/php_codesniffer": "^3.0",
"vimeo/psalm": "^3.6"
},
"bin": [
"bin/simple-cli"
],
"type": "library",
"autoload": {
"psr-4": {
"SimpleCli\\": "src/SimpleCli/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "KyleK",
"email": "kylekatarnls@gmail.com"
}
],
"description": "A simple command line framework",
"support": {
"issues": "https://github.com/kylekatarnls/simple-cli/issues",
"source": "https://github.com/kylekatarnls/simple-cli/tree/1.6.0"
},
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/simple-cli/simple-cli",
"type": "tidelift"
}
],
"time": "2020-11-18T22:40:00+00:00"
},
{
"name": "squizlabs/php_codesniffer",
"version": "2.9.2",
"source": {
"type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
"reference": "2acf168de78487db620ab4bc524135a13cfe6745"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745",
"reference": "2acf168de78487db620ab4bc524135a13cfe6745",
"shasum": ""
},
"require": {
"ext-simplexml": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
"php": ">=5.1.2"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"bin": [
"scripts/phpcs",
"scripts/phpcbf"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
},
"autoload": {
"classmap": [
"CodeSniffer.php",
"CodeSniffer/CLI.php",
"CodeSniffer/Exception.php",
"CodeSniffer/File.php",
"CodeSniffer/Fixer.php",
"CodeSniffer/Report.php",
"CodeSniffer/Reporting.php",
"CodeSniffer/Sniff.php",
"CodeSniffer/Tokens.php",
"CodeSniffer/Reports/",
"CodeSniffer/Tokenizers/",
"CodeSniffer/DocGenerators/",
"CodeSniffer/Standards/AbstractPatternSniff.php",
"CodeSniffer/Standards/AbstractScopeSniff.php",
"CodeSniffer/Standards/AbstractVariableSniff.php",
"CodeSniffer/Standards/IncorrectPatternException.php",
"CodeSniffer/Standards/Generic/Sniffs/",
"CodeSniffer/Standards/MySource/Sniffs/",
"CodeSniffer/Standards/PEAR/Sniffs/",
"CodeSniffer/Standards/PSR1/Sniffs/",
"CodeSniffer/Standards/PSR2/Sniffs/",
"CodeSniffer/Standards/Squiz/Sniffs/",
"CodeSniffer/Standards/Zend/Sniffs/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Greg Sherwood",
"role": "lead"
}
],
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
"homepage": "http://www.squizlabs.com/php-codesniffer",
"keywords": [
"phpcs",
"standards"
],
"support": {
"issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
"source": "https://github.com/squizlabs/PHP_CodeSniffer",
"wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
},
"funding": [
{
"url": "https://github.com/PHPCSStandards",
"type": "github"
},
{
"url": "https://github.com/jrfnl",
"type": "github"
},
{
"url": "https://opencollective.com/php_codesniffer",
"type": "open_collective"
}
],
"time": "2018-11-07T22:31:41+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=5.3.7"
},
"platform-dev": [],
"plugin-api-version": "2.6.0"
}

View File

@@ -0,0 +1,40 @@
{
php,
fetchFromGitHub,
lib,
versionCheckHook,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "pdepend";
version = "2.16.2";
src = fetchFromGitHub {
owner = "pdepend";
repo = "pdepend";
tag = finalAttrs.version;
hash = "sha256-2Ruubcm9IWZYu2LGeGeKm1tmHca0P5xlKYkuBCCV9ag=";
};
composerLock = ./composer.lock;
vendorHash = "sha256-szKVZhWcd8p4307irNqgSAK2+hl8AW+gCPyf0EEco8A=";
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
versionCheckProgramArg = "--version";
meta = {
changelog = "https://github.com/pdepend/pdepend/releases/tag/${finalAttrs.version}";
description = "Adaptation of JDepend for PHP";
homepage = "https://github.com/pdepend/pdepend";
license = lib.licenses.bsd3;
longDescription = "
PHP Depend is an adaptation of the established Java
development tool JDepend. This tool shows you the quality
of your design in terms of extensibility, reusability and
maintainability.
";
mainProgram = "pdepend";
teams = [ lib.teams.php ];
};
})

View File

@@ -0,0 +1,64 @@
{
lib,
python3Packages,
fetchzip,
writeScript,
}:
python3Packages.buildPythonApplication rec {
pname = "pdf-parser";
version = "0.7.10";
pyproject = false;
src = fetchzip {
url = "https://didierstevens.com/files/software/pdf-parser_V${
lib.replaceStrings [ "." ] [ "_" ] version
}.zip";
hash = "sha256-RhgEGue3RcALjLXKOnnXyx/0subXHNuXfDg8hbO3VDg=";
};
postPatch = ''
# quote regular expressions correctly
substituteInPlace pdf-parser.py \
--replace-fail \
"re.sub('" \
"re.sub(r'" \
--replace-fail \
"re.match('" \
"re.match(r'"
'';
installPhase = ''
install -Dm555 pdf-parser.py $out/bin/pdf-parser.py
'';
preFixup = ''
substituteInPlace $out/bin/pdf-parser.py \
--replace-fail '/usr/bin/python' '${python3Packages.python}/bin/python'
'';
passthru.updateScript = writeScript "update-pdf-parser" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts curl pcre2
set -eu -o pipefail
version="$(curl -s https://blog.didierstevens.com/programs/pdf-tools/ |
pcre2grep -O '$1.$2.$3' '\bpdf-parser_V(\d+)_(\d+)_(\d+)\.zip\b.*')"
update-source-version "$UPDATE_NIX_ATTR_PATH" "$version"
'';
meta = {
description = "Parse a PDF document";
longDescription = ''
This tool will parse a PDF document to identify the fundamental elements used in the analyzed file.
It will not render a PDF document.
'';
homepage = "https://blog.didierstevens.com/programs/pdf-tools/";
license = lib.licenses.publicDomain;
maintainers = [ lib.maintainers.lightdiscord ];
platforms = lib.platforms.all;
mainProgram = "pdf-parser.py";
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
fetchFromGitHub,
pkgs,
python3,
wrapGAppsHook3,
gobject-introspection,
}:
python3.pkgs.buildPythonApplication {
pname = "pdf-quench";
version = "1.0.5";
src = fetchFromGitHub {
owner = "linuxerwang";
repo = "pdf-quench";
rev = "b72b3970b371026f9a7ebe6003581e8a63af98f6";
sha256 = "1rp9rlwr6rarcsxygv5x2c5psgwl6r69k0lsgribgyyla9cf2m7n";
};
nativeBuildInputs = [
wrapGAppsHook3
gobject-introspection
];
buildInputs = with pkgs; [
gtk3
goocanvas2
poppler_gi
];
propagatedBuildInputs = with python3.pkgs; [
pygobject3
pypdf2
];
format = "other";
doCheck = false;
installPhase = ''
install -D -T -m 755 src/pdf_quench.py $out/bin/pdf-quench
'';
meta = with lib; {
homepage = "https://github.com/linuxerwang/pdf-quench";
description = "Visual tool for cropping pdf files";
mainProgram = "pdf-quench";
platforms = platforms.linux;
license = licenses.gpl2;
maintainers = with maintainers; [ flokli ];
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
stdenv,
fetchFromGitHub,
python3,
ghostscript,
qpdf,
poppler-utils,
makeBinaryWrapper,
}:
let
python = python3.withPackages (ps: with ps; [ tkinter ]);
binPath = lib.makeBinPath [
ghostscript
qpdf
poppler-utils
];
in
stdenv.mkDerivation {
pname = "pdf-sign";
version = "0-unstable-2024-07-16";
src = fetchFromGitHub {
owner = "svenssonaxel";
repo = "pdf-sign";
rev = "6c373e3df2ac53af74ea84c3b5f299b13d7dae9c";
hash = "sha256-yx1ff1JMTydCd5sCIoiT30zRwxNEwFbgEM9++nkJKY4=";
};
nativeBuildInputs = [ makeBinaryWrapper ];
buildInputs = [ python ];
installPhase = ''
runHook preInstall
for exe in "pdf-sign" "pdf-create-empty" "pdf-from-text"; do
# Install wrapped programs into $out/lib so that they are not renamed.
# Renaming them, like wrapProgram does, would produce the wrong output
# from `--help`.
install -Dm755 $exe -t $out/lib
makeWrapper $out/lib/$exe $out/bin/$exe --prefix PATH : ${binPath}
done
runHook postInstall
'';
meta = {
description = "Tool to visually sign PDF files";
homepage = "https://github.com/svenssonaxel/pdf-sign";
license = lib.licenses.mit;
mainProgram = "pdf-sign";
maintainers = with lib.maintainers; [ tomasajt ];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,69 @@
{
stdenv,
lib,
fetchFromGitHub,
autoreconfHook,
gettext,
libtool,
pkg-config,
djvulibre,
exiv2,
fontconfig,
graphicsmagick,
libjpeg,
libuuid,
poppler,
}:
stdenv.mkDerivation rec {
version = "0.9.19";
pname = "pdf2djvu";
src = fetchFromGitHub {
owner = "jwilk";
repo = "pdf2djvu";
rev = version;
sha256 = "sha256-j4mYdmLZ56qTA1KbWBjBvyTyLaeuIITKYsALRIO7lj0=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
djvulibre
exiv2
fontconfig
graphicsmagick
libjpeg
libuuid
poppler
];
postPatch = ''
substituteInPlace private/autogen \
--replace /usr/share/gettext ${gettext}/share/gettext \
--replace /usr/share/libtool ${libtool}/share/libtool
substituteInPlace configure.ac \
--replace '$djvulibre_bin_path' ${djvulibre.bin}/bin
'';
preAutoreconf = ''
private/autogen
'';
enableParallelBuilding = true;
# Required by Poppler
CXXFLAGS = "-std=c++20";
meta = with lib; {
description = "Creates djvu files from PDF files";
homepage = "https://jwilk.net/software/pdf2djvu";
license = licenses.gpl2Only;
maintainers = with maintainers; [ pSub ];
mainProgram = "pdf2djvu";
};
}

View File

@@ -0,0 +1,66 @@
{
lib,
resholve,
fetchFromGitHub,
bc,
coreutils,
file,
gawk,
ghostscript,
gnused,
imagemagick,
zip,
runtimeShell,
findutils,
}:
resholve.mkDerivation {
pname = "pdf2odt";
version = "20220827";
src = fetchFromGitHub {
owner = "gutschke";
repo = "pdf2odt";
rev = "a05fbdebcc39277d905d1ae66f585a19f467b406";
hash = "sha256-995iF5Z1V4QEXeXUB8irG451TXpQBHZThJcEfHwfRtE=";
};
installPhase = ''
runHook preInstall
install -Dm0555 pdf2odt -t $out/bin
install -Dm0444 README.md LICENSE -t $out/share/doc/pdf2odt
ln -rs $out/bin/pdf2odt $out/bin/pdf2ods
runHook postInstall
'';
solutions.default = {
scripts = [ "bin/pdf2odt" ];
interpreter = runtimeShell;
inputs = [
bc
coreutils
file
findutils
gawk
ghostscript
gnused
imagemagick
zip
];
execer = [
# zip can exec; confirmed 2 invocations in pdf2odt don't
"cannot:${zip}/bin/zip"
];
};
meta = with lib; {
description = "PDF to ODT/ODS format converter";
homepage = "https://github.com/gutschke/pdf2odt";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ peterhoeg ];
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
cairo,
gtk2,
poppler,
}:
stdenv.mkDerivation rec {
pname = "pdf2svg";
version = "0.2.4";
src = fetchFromGitHub {
owner = "db9052";
repo = "pdf2svg";
rev = "v${version}";
sha256 = "sha256-zME0U+PyENnoLyjo9W2i2MRM00wNmHkYcR2LMEtTbBY=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
cairo
poppler
gtk2
];
meta = with lib; {
description = "PDF converter to SVG format";
homepage = "http://www.cityinthesky.co.uk/opensource/pdf2svg";
license = licenses.gpl2Plus;
maintainers = [ maintainers.ianwookim ];
platforms = platforms.unix;
mainProgram = "pdf2svg";
};
}

View File

@@ -0,0 +1,21 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 298cdca..8894db3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,7 +55,15 @@ endif()
qt_standard_project_setup()
find_package(OpenSSL REQUIRED)
-find_package(lcms2 REQUIRED)
+SET(LCMS2_NAMES ${LCMS2_NAMES} lcms2 liblcms2 liblcms2_static)
+FIND_LIBRARY(LCMS2_LIBRARY NAMES ${LCMS2_NAMES} )
+FIND_PATH(LCMS2_INCLUDE_DIR lcms2.h)
+add_library(lcms2::lcms2 UNKNOWN IMPORTED)
+set_target_properties(lcms2::lcms2 PROPERTIES
+ IMPORTED_LOCATION ${LCMS2_LIBRARY}
+ INTERFACE_INCLUDE_DIRECTORIES ${LCMS2_INCLUDE_DIR}
+ INTERFACE_COMPILE_DEFINITIONS "HAVE_LCMS2=1;CMS_NO_REGISTER_KEYWORD=1")
+set_property(GLOBAL APPEND PROPERTY INTERNAL_DEPS_PROP lcms2::lcms2)
find_package(ZLIB REQUIRED)
find_package(Freetype REQUIRED)
find_package(OpenJPEG CONFIG REQUIRED)

View File

@@ -0,0 +1,79 @@
{
lib,
stdenv,
fetchFromGitHub,
lcms,
cmake,
pkg-config,
qt6,
wrapGAppsHook3,
openjpeg,
onetbb,
blend2d,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pdf4qt";
version = "1.5.1.0";
src = fetchFromGitHub {
owner = "JakubMelka";
repo = "PDF4QT";
tag = "v${finalAttrs.version}";
hash = "sha256-Ysrz/uCSTFK5wGNdTXhpq6QVf7Ju1xWisNVUtBtdEjc=";
};
patches = [
# lcms2 cmake module only appears when built with vcpkg.
# We directly search for the corresponding libraries and
# header files instead.
./find_lcms2_path.patch
];
nativeBuildInputs = [
cmake
pkg-config
qt6.qttools
qt6.wrapQtAppsHook
# GLib-GIO-ERROR: No GSettings schemas are installed on the system
wrapGAppsHook3
];
buildInputs = [
qt6.qtbase
qt6.qtwayland
qt6.qtsvg
qt6.qtspeech
lcms
openjpeg
onetbb
blend2d
];
cmakeFlags = [
(lib.cmakeBool "PDF4QT_INSTALL_TO_USR" false)
];
dontWrapGApps = true;
preFixup = ''
qtWrapperArgs+=(''${gappsWrapperArgs[@]})
'';
meta = {
description = "Open source PDF editor";
longDescription = ''
This software is consisting of PDF rendering library,
and several applications, such as advanced document
viewer, command line tool, and document page
manipulator application. Software is implementing PDF
functionality based on PDF Reference 2.0.
'';
homepage = "https://jakubmelka.github.io";
changelog = "https://github.com/JakubMelka/PDF4QT/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
mainProgram = "Pdf4QtViewer";
maintainers = with lib.maintainers; [ aleksana ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,38 @@
{
lib,
python3,
fetchFromGitHub,
}:
python3.pkgs.buildPythonApplication rec {
pname = "pdfannots";
version = "0.4";
pyproject = true;
src = fetchFromGitHub {
owner = "0xabu";
repo = "pdfannots";
rev = "v${version}";
hash = "sha256-C0Ss6kZvPx0hHnpBKquEolxeuTfjshhSBSIDXcCKtM8=";
};
nativeBuildInputs = [
python3.pkgs.setuptools
];
propagatedBuildInputs = [
python3.pkgs.pdfminer-six
];
pythonImportsCheck = [
"pdfannots"
];
meta = with lib; {
description = "Extracts and formats text annotations from a PDF file";
homepage = "https://github.com/0xabu/pdfannots";
license = licenses.mit;
maintainers = [ ];
mainProgram = "pdfannots";
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
let
pname = "pdfannots2json";
version = "1.0.16";
in
buildGoModule {
inherit pname version;
src = fetchFromGitHub {
owner = "mgmeyers";
repo = "pdfannots2json";
tag = version;
hash = "sha256-qk4OSws/6SevN/Q0lsyxw+fZkm2uy1WwOYYL7CB7QUk=";
};
vendorHash = null;
meta = with lib; {
homepage = "https://github.com/mgmeyers/pdfannots2json";
license = licenses.agpl3Only;
description = "Tool to convert PDF annotations to JSON";
mainProgram = "pdfannots2json";
maintainers = with maintainers; [ _0nyr ];
};
}

View File

@@ -0,0 +1,69 @@
{
fetchFromGitHub,
lib,
wrapGAppsHook3,
python3Packages,
gtk3,
poppler_gi,
libhandy,
gettext,
stdenv,
}:
python3Packages.buildPythonApplication rec {
pname = "pdfarranger";
version = "1.12.1";
pyproject = true;
src = fetchFromGitHub {
owner = "pdfarranger";
repo = "pdfarranger";
tag = version;
hash = "sha256-of1itPubf6LBJ4rSh1bca3yoNTiz5Qt9ar9XDe4nhxI=";
};
nativeBuildInputs = [ wrapGAppsHook3 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ gettext ];
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
LINTL="${lib.getLib gettext}/lib/libintl.8.dylib"
substituteInPlace pdfarranger/pdfarranger.py --replace-fail \
"return 'libintl.8.dylib'" \
"return '$LINTL'"
unset LINTL
'';
build-system = with python3Packages; [ setuptools ];
buildInputs = [
gtk3
poppler_gi
libhandy
];
dependencies = with python3Packages; [
pygobject3
pikepdf
img2pdf
setuptools
python-dateutil
];
# incompatible with wrapGAppsHook3
strictDeps = false;
dontWrapGApps = true;
makeWrapperArgs = [ "\${gappsWrapperArgs[@]}" ];
doCheck = false; # no tests
meta = {
inherit (src.meta) homepage;
description = "Merge or split pdf documents and rotate, crop and rearrange their pages using a graphical interface";
mainProgram = "pdfarranger";
maintainers = with lib.maintainers; [
symphorien
endle
];
license = lib.licenses.gpl3Plus;
changelog = "https://github.com/pdfarranger/pdfarranger/releases/tag/${src.tag}";
};
}

View File

@@ -0,0 +1,77 @@
{
lib,
stdenv,
fetchurl,
fetchDebianPatch,
autoconf,
gtkmm3,
glib,
pdftk,
pkg-config,
wrapGAppsHook3,
}:
stdenv.mkDerivation rec {
pname = "pdfchain";
version = "0.4.4.2";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}/${pname}-${version}.tar.gz";
hash = "sha256-Hu4Pk9voyc75+f5OwKEOCkXKjN5nzWzv+izmyEN1Lz0=";
};
nativeBuildInputs = [
pkg-config
wrapGAppsHook3
autoconf
];
buildInputs = [
gtkmm3
pdftk
glib
];
patches =
let
fetchDebianPatch' =
args:
fetchDebianPatch (
{
inherit pname;
version = "1:0.4.4.2";
debianRevision = "2";
}
// args
);
in
[
(fetchDebianPatch' {
patch = "fix_crash_on_startup";
hash = "sha256-1UyMHHGrmUIFhY53ILdMMsyocSIbcV6CKQ7sLVNhNQw=";
})
(fetchDebianPatch' {
patch = "fix_desktop_file";
hash = "sha256-L6lhUs7GqVN1XOQO6bbz6BT29n4upsJtlHCAIGzk1Bw=";
})
(fetchDebianPatch' {
patch = "fix_spelling";
hash = "sha256-sOUUslPfcOo2K3zuaLcux+CNdgfWM0phsfe6g4GUFes=";
})
];
postPatch = ''
substituteInPlace src/constant.h \
--replace '"pdftk"' '"${pdftk}/bin/pdftk"' \
--replace "/usr/share" "$out/share"
'';
meta = with lib; {
description = "Graphical user interface for the PDF Toolkit (PDFtk)";
homepage = "https://pdfchain.sourceforge.io";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ hqurve ];
platforms = platforms.unix;
mainProgram = "pdfchain";
};
}

View File

@@ -0,0 +1,86 @@
{
lib,
buildGoModule,
stdenv,
fetchFromGitHub,
writableTmpDirAsHomeHook,
}:
buildGoModule rec {
pname = "pdfcpu";
version = "0.11.0";
src = fetchFromGitHub {
owner = "pdfcpu";
repo = "pdfcpu";
tag = "v${version}";
hash = "sha256-HTqaFl/ug/4sdchZBD4VQiXbD1L0/DVf2efZ3BV/vx4=";
# Apparently upstream requires that the compiled executable will know the
# commit hash and the date of the commit. This information is also presented
# in the output of `pdfcpu version` which we use as a sanity check in the
# installCheckPhase. This was discussed upstream in:
#
# - https://github.com/pdfcpu/pdfcpu/issues/751
# - https://github.com/pdfcpu/pdfcpu/pull/752
#
# The trick used here is to write that information into files in `src`'s
# `$out`, and then read them into the `ldflags`. We also delete the `.git`
# directories in `src`'s $out afterwards, imitating what's done if
# `leaveDotGit = false;` See also:
# https://github.com/NixOS/nixpkgs/issues/8567
leaveDotGit = true;
postFetch = ''
cd "$out"
git rev-parse HEAD > $out/COMMIT
git log -1 --pretty=%cd --date=format:'%Y-%m-%dT%H:%M:%SZ' > $out/SOURCE_DATE
find "$out" -name .git -print0 | xargs -0 rm -rf
'';
};
vendorHash = "sha256-5qB3zXiee4yMFpV8Ia8jICZaw+8Zpxd2Fs7DZ/DW/Jg=";
ldflags = [
"-s"
"-w"
"-X main.version=v${version}"
];
# ldflags based on metadata from git and source
preBuild = ''
ldflags+=" -X main.commit=$(cat COMMIT)"
ldflags+=" -X main.date=$(cat SOURCE_DATE)"
'';
# No tests
doCheck = false;
doInstallCheck = true;
installCheckInputs = [
writableTmpDirAsHomeHook
];
# NOTE: Can't use `versionCheckHook` since a writeable $HOME is required and
# `versionCheckHook` uses --ignore-environment
installCheckPhase = ''
echo checking the version print of pdfcpu
mkdir -p $HOME/"${
if stdenv.hostPlatform.isDarwin then "Library/Application Support" else ".config"
}"/pdfcpu
versionOutput="$($out/bin/pdfcpu version)"
for part in ${version} $(cat COMMIT | cut -c1-8) $(cat SOURCE_DATE); do
if [[ ! "$versionOutput" =~ "$part" ]]; then
echo version output did not contain expected part $part . Output was:
echo "$versionOutput"
exit 3
fi
done
'';
subPackages = [ "cmd/pdfcpu" ];
meta = with lib; {
description = "PDF processor written in Go";
homepage = "https://pdfcpu.io";
license = licenses.asl20;
maintainers = with maintainers; [ doronbehar ];
mainProgram = "pdfcpu";
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "pdfcrack";
version = "0.21";
src = fetchurl {
url = "mirror://sourceforge/pdfcrack/pdfcrack/pdfcrack-${version}.tar.gz";
hash = "sha256-JvANSvy3C1g5BHvG9i5CUwc6xDe9tSbwHowEsiDpd2I=";
};
installPhase = ''
install -Dt $out/bin pdfcrack
'';
meta = with lib; {
homepage = "https://pdfcrack.sourceforge.net/";
description = "Small command line driven tool for recovering passwords and content from PDF files";
mainProgram = "pdfcrack";
license = with licenses; [ gpl2Plus ];
platforms = platforms.all;
maintainers = with maintainers; [ qoelet ];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
fetchFromGitHub,
python3Packages,
xpdf,
}:
python3Packages.buildPythonApplication rec {
pname = "pdfdiff";
version = "0.93";
src = fetchFromGitHub {
owner = "cascremers";
repo = "pdfdiff";
rev = version;
hash = "sha256-NPki/PFm0b71Ksak1mimR4w6J2a0jBCbQDTMQR4uZFI=";
};
format = "other";
dontConfigure = true;
dontBuild = true;
doCheck = false;
postPatch = ''
substituteInPlace pdfdiff.py \
--replace 'pdftotextProgram = "pdftotext"' 'pdftotextProgram = "${xpdf}/bin/pdftotext"' \
--replace 'progName = "pdfdiff.py"' 'progName = "pdfdiff"'
'';
installPhase = ''
mkdir -p $out/bin
cp pdfdiff.py $out/bin/pdfdiff
chmod +x $out/bin/pdfdiff
'';
meta = with lib; {
homepage = "https://github.com/cascremers/pdfdiff";
description = "Tool to view the difference between two PDF or PS files";
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
poppler,
libgcrypt,
pcre2,
asciidoc,
}:
stdenv.mkDerivation rec {
pname = "pdfgrep";
version = "2.2.0";
src = fetchurl {
url = "https://pdfgrep.org/download/${pname}-${version}.tar.gz";
hash = "sha256-BmHlMeTA7wl5Waocl3N5ZYXbOccshKAv+H0sNjfGIMs=";
};
postPatch = ''
for i in ./src/search.h ./src/pdfgrep.cc ./src/search.cc; do
substituteInPlace $i --replace '<cpp/' '<'
done
'';
configureFlags = [
"--with-libgcrypt-prefix=${lib.getDev libgcrypt}"
];
nativeBuildInputs = [
pkg-config
asciidoc
];
buildInputs = [
poppler
libgcrypt
pcre2
];
meta = {
description = "Commandline utility to search text in PDF files";
homepage = "https://pdfgrep.org/";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [
qknight
fpletz
];
platforms = with lib.platforms; unix;
mainProgram = "pdfgrep";
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
fetchzip,
python3,
python3Packages,
makeBinaryWrapper,
}:
python3Packages.buildPythonApplication rec {
pname = "pdfid";
version = "0.2.10";
format = "other";
src = fetchzip {
url = "https://didierstevens.com/files/software/pdfid_v${
builtins.replaceStrings [ "." ] [ "_" ] version
}.zip";
hash = "sha256-GxQOwIwCVaKEruFO+kxXciOiFcXtBO0vvCwb6683lGU=";
stripRoot = false;
};
nativeBuildInputs = [
makeBinaryWrapper
];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,share/pdfid}
cp -a * $out/share/pdfid/
makeWrapper ${lib.getExe python3} $out/bin/pdfid \
--prefix PYTHONPATH : "$PYTHONPATH" \
--add-flags "$out/share/pdfid/pdfid.py"
runHook postInstall
'';
meta = with lib; {
description = "Scan a file to look for certain PDF keywords";
homepage = "https://blog.didierstevens.com/programs/pdf-tools/";
license = with licenses; [ free ];
mainProgram = "pdfid";
maintainers = with maintainers; [ d3vil0p3r ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,77 @@
{
lib,
stdenv,
fetchzip,
python3Packages,
withV8 ? false,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pdfium-binaries";
# also update rev of headers in python3Packages.pypdfium2
version = "7087";
src =
let
selectSystem =
attrs:
attrs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
system = selectSystem {
x86_64-linux = "linux-x64";
aarch64-linux = "linux-arm64";
x86_64-darwin = "mac-x64";
aarch64-darwin = "mac-arm64";
};
in
fetchzip {
url = "https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F${finalAttrs.version}/pdfium${lib.optionalString withV8 "-v8"}-${system}.tgz";
hash =
if withV8 then
selectSystem {
x86_64-linux = "sha256-nKHXcBTEp165g18HLzaNGfKt8MtTYpKBGNgwIpSO0u4=";
aarch64-linux = "sha256-wip/ry42aDbyGiwYSUX8koxDuf88BLGZAmMZE0s+fL0=";
x86_64-darwin = "sha256-7pUMfNFgGqQ8Dnox57sHfrKKke+i8CGEma4tePJaTDA=";
aarch64-darwin = "sha256-o59kmTNC4nSCFLfww3E+4iIYs2kQ30yyFaX9f2Za7os=";
}
else
selectSystem {
x86_64-linux = "sha256-zn7QlTvChQa2mQCe5K+zEGVUtuD+l/jEtlKticrrSKg=";
aarch64-linux = "sha256-080X72NNfKaanHeVtmxE/4uNV6Ue4f/1Mri/p3nOT8c=";
x86_64-darwin = "sha256-XMStU0MN9ieCrLQnQL4/jKrNWxgQl9OtZHg9EmemPhU=";
aarch64-darwin = "sha256-Q8R/p1hX6+JeVTFc6w7MC9GPNGqxlu6m+iawRIMndic=";
};
stripRoot = false;
};
installPhase = ''
runHook preInstall
cp -r . $out
runHook postInstall
'';
passthru = {
updateScript = ./update.sh;
tests = {
inherit (python3Packages) pypdfium2;
};
};
meta = {
description = "Binary distribution of PDFium";
homepage = "https://github.com/bblanchon/pdfium-binaries";
license = with lib.licenses; [
asl20
mit
];
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
maintainers = [ ];
platforms = [
"aarch64-linux"
"aarch64-darwin"
"x86_64-linux"
"x86_64-darwin"
];
};
})

View File

@@ -0,0 +1,35 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash nix curl coreutils jq common-updater-scripts
set -eou pipefail
latestVersion=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sL https://api.github.com/repos/bblanchon/pdfium-binaries/releases/latest | jq -r '.tag_name | ltrimstr("chromium/")')
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; pdfium-binaries.version or (lib.getVersion pdfium-binaries)" | tr -d '"')
echo "latest version: $latestVersion"
echo "current version: $currentVersion"
if [[ "$latestVersion" == "$currentVersion" ]]; then
echo "package is up-to-date"
exit 0
fi
update-source-version pdfium-binaries $latestVersion || true
for system in \
x86_64-linux \
aarch64-linux \
x86_64-darwin \
aarch64-darwin; do
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url --unpack $(nix-instantiate --eval -E "with import ./. {}; pdfium-binaries.src.url" --system "$system" | tr -d '"')))
update-source-version pdfium-binaries $latestVersion $hash --system=$system --ignore-same-version
done
for system in \
x86_64-linux \
aarch64-linux \
x86_64-darwin \
aarch64-darwin; do
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url --unpack $(nix-instantiate --eval -E "with import ./. {}; pdfium-binaries-v8.src.url" --system "$system" | tr -d '"')))
update-source-version pdfium-binaries-v8 $latestVersion $hash --system=$system --ignore-same-version
done

View File

@@ -0,0 +1,60 @@
{
bash,
coreutils,
fetchFromGitHub,
ghostscript,
locale,
zenity,
gnused,
lib,
resholve,
}:
resholve.mkDerivation {
pname = "pdfmm";
version = "unstable-2019-01-24";
src = fetchFromGitHub {
owner = "jpfleury";
repo = "pdfmm";
rev = "45ee7796659d23bb030bf06647f1af85e1d2b52d";
hash = "sha256-TOISD/2g7MwnLrtpMnfr2Ln0IiwlJVNavWl4eh/uwN0=";
};
dontBuild = true;
installPhase = ''
install -Dm 0755 pdfmm $out/bin/pdfmm
'';
solutions.default = {
scripts = [
"bin/pdfmm"
];
interpreter = "${bash}/bin/bash";
inputs = [
coreutils
ghostscript
locale
zenity
gnused
];
fake = {
# only need xmessage if zenity is unavailable
external = [ "xmessage" ];
};
execer = [
"cannot:${zenity}/bin/zenity"
];
keep."$toutLu" = true;
};
meta = with lib; {
description = "Graphical assistant to reduce the size of a PDF file";
homepage = "https://github.com/jpfleury/pdfmm";
license = licenses.gpl3Only;
maintainers = with maintainers; [ urandom ];
mainProgram = "pdfmm";
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
python3,
fetchPypi,
}:
let
localPython = python3.override {
self = localPython;
packageOverrides = self: super: {
# Can be removed once this is merged
# https://gitlab.com/pdftools/pdfposter/-/merge_requests/7
pypdf2 = super.pypdf2.overridePythonAttrs (oldAttrs: rec {
version = "2.11.1";
format = "setuptools";
pyproject = null;
src = fetchPypi {
pname = "PyPDF2";
inherit version;
hash = "sha256-PHut1RLCFxHrF4nC6tv5YnkonA+URS7lSoZHO/vv1zI=";
};
});
};
};
in
with localPython.pkgs;
buildPythonApplication rec {
pname = "pdfposter";
version = "0.8.1";
format = "setuptools";
propagatedBuildInputs = [ pypdf2 ];
src = fetchPypi {
pname = "pdftools.pdfposter";
inherit version;
hash = "sha256-yWFtHgVKAWs4dRlSk8t8cB2KBJeBOa0Frh3BLR9txS0=";
};
pythonImportsCheck = [
"pdftools.pdfposter"
"pdftools.pdfposter.cmd"
];
meta = with lib; {
description = "Split large pages of a PDF into smaller ones for poster printing";
mainProgram = "pdfposter";
homepage = "https://pdfposter.readthedocs.io";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ wamserma ];
};
}

1028
pkgs/by-name/pd/pdfrip/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,34 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "pdfrip";
version = "2.0.1";
src = fetchFromGitHub {
owner = "mufeedvh";
repo = "pdfrip";
tag = "v${version}";
hash = "sha256-9KDWd71MJ2W9Xp3uqp0iZMmkBwIay+L4gnPUt7hylS0=";
};
cargoLock = {
lockFile = ./Cargo.lock;
};
postPatch = ''
ln -s ${./Cargo.lock} Cargo.lock
'';
meta = {
description = "PDF password cracking utility";
homepage = "https://github.com/mufeedvh/pdfrip";
changelog = "https://github.com/mufeedvh/pdfrip/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "pdfrip";
};
}

View File

@@ -0,0 +1,57 @@
{
lib,
stdenv,
ocaml,
makeWrapper,
fetchsvn,
ghostscript,
imagemagick,
perl,
poppler-utils,
tesseract,
unpaper,
}:
stdenv.mkDerivation {
version = "0.1.7";
pname = "pdfsandwich";
src = fetchsvn {
url = "svn://svn.code.sf.net/p/pdfsandwich/code/trunk/src";
rev = "75";
sha256 = "1420c33divch087xrr61lvyf975bapqkgjqaighl581i69nlzsm6";
};
strictDeps = true;
nativeBuildInputs = [
makeWrapper
ocaml
perl
];
installPhase = ''
mkdir -p $out/bin
cp -p pdfsandwich $out/bin
wrapProgram $out/bin/pdfsandwich --prefix PATH : ${
lib.makeBinPath [
imagemagick
ghostscript
poppler-utils
unpaper
tesseract
]
}
mkdir -p $out/man/man1
cp -p pdfsandwich.1.gz $out/man/man1
'';
meta = with lib; {
description = "OCR tool for scanned PDFs";
homepage = "http://www.tobias-elze.de/pdfsandwich/";
license = licenses.gpl2Plus;
maintainers = [ maintainers.rps ];
platforms = platforms.linux;
mainProgram = "pdfsandwich";
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
gettext,
intltool,
pkg-config,
wrapGAppsHook3,
gtkmm3,
libuuid,
poppler,
qpdf,
}:
stdenv.mkDerivation rec {
pname = "pdfslicer";
version = "1.8.8";
src = fetchFromGitHub {
owner = "junrrein";
repo = "pdfslicer";
tag = "v${version}";
fetchSubmodules = true;
sha256 = "0sja0ddd9c8wjjpzk2ag8q1lxpj09adgmhd7wnsylincqnj2jyls";
};
postPatch = ''
# Don't build tests, vendored catch doesn't build with latest glibc.
substituteInPlace CMakeLists.txt \
--replace "add_subdirectory (tests)" ""
'';
nativeBuildInputs = [
cmake
gettext
intltool
pkg-config
wrapGAppsHook3
];
buildInputs = [
gtkmm3
libuuid
poppler
qpdf
];
CXXFLAGS =
# Pending upstream compatibility with GCC 13
lib.optional (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "13") "-Wno-changes-meaning";
meta = with lib; {
description = "Simple application to extract, merge, rotate and reorder pages of PDF documents";
homepage = "https://junrrein.github.io/pdfslicer/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ dotlambda ];
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
meson,
vala,
ninja,
gtk3,
poppler,
wrapGAppsHook3,
}:
stdenv.mkDerivation rec {
pname = "pdftag";
version = "1.0.5";
src = fetchFromGitHub {
owner = "arrufat";
repo = "pdftag";
rev = "v${version}";
sha256 = "1paj8hs27akzsivn01a30fl3zx5gfn1h89wxg2m72fd806hk0hql";
};
nativeBuildInputs = [
pkg-config
meson
ninja
wrapGAppsHook3
vala
];
buildInputs = [
gtk3
poppler
];
meta = with lib; {
description = "Edit metadata found in PDFs";
license = licenses.gpl3;
maintainers = with maintainers; [ leenaars ];
platforms = platforms.unix;
mainProgram = "pdftag";
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
fetchFromGitHub,
python3Packages,
openai,
pdfminer,
withOpenai ? false,
}:
python3Packages.buildPythonApplication rec {
pname = "pdftitle";
version = "0.20";
pyproject = true;
src = fetchFromGitHub {
owner = "metebalci";
repo = "pdftitle";
tag = "v${version}";
hash = "sha256-05SaAXYJ7l0ZldYufj0x9mYRwwGT7vlmq9a+ZF4pYiA=";
};
build-system = with python3Packages; [ setuptools ];
dependencies =
with python3Packages;
[
pdfminer
python-dotenv
]
++ lib.optional withOpenai openai;
pythonImportsCheck = [ "pdftitle" ];
meta = {
description = "Utility to extract the title from a PDF file";
homepage = "https://github.com/metebalci/pdftitle";
changelog = "https://github.com/metebalci/pdftitle/blob/v${version}/CHANGELOG.md";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ dansbandit ];
mainProgram = "pdftitle";
};
}

215
pkgs/by-name/pd/pdftk/deps.json generated Normal file
View File

@@ -0,0 +1,215 @@
{
"!comment": "This is a nixpkgs Gradle dependency lockfile. For more details, refer to the Gradle section in the nixpkgs manual.",
"!version": 1,
"https://plugins.gradle.org/m2": {
"com/diffplug/durian#durian-collect/1.2.0": {
"jar": "sha256-sZTAuIAhzBFsIcHcdvScLB/hda9by3TIume527+aSMw=",
"pom": "sha256-i7diCGoKT9KmRzu/kFx0R2OvodWaVjD3O7BLeHLAn/M="
},
"com/diffplug/durian#durian-core/1.2.0": {
"jar": "sha256-F+0KrLOjwWMjMyFou96thpTzKACytH1p1KTEmxFNXa4=",
"pom": "sha256-hwMg6QdVNxsBeW/oG6Ul/R3ui3A0b1VFUe7dQonwtmI="
},
"com/diffplug/durian#durian-io/1.2.0": {
"jar": "sha256-CV/R3HeIjAc/C+OaAYFW7lJnInmLCd6eKF7yE14W6sQ=",
"pom": "sha256-NQkZQkMk4nUKPdwvobzmqQrIziklaYpgqbTR1uSSL/4="
},
"com/diffplug/spotless#com.diffplug.spotless.gradle.plugin/6.10.0": {
"pom": "sha256-KBM628w3hpIzn4fzKVkykdnjBnmrwpsBVCzmULjHoL4="
},
"com/diffplug/spotless#spotless-lib-extra/2.29.0": {
"jar": "sha256-m0zpiqT128dYUP5tmnnoeNMYvnGPmX5epAUsiFYhuqs=",
"module": "sha256-QW44lubwZ/WXlI70QVDJk43wV6NCt31X20gqj5aWgeg=",
"pom": "sha256-hf5PLJpFEVVtzqLbzFth9+f+VlxgedC5ItVmLJCIu+8="
},
"com/diffplug/spotless#spotless-lib/2.29.0": {
"jar": "sha256-G/rNp1jy4JDwLBVoR3PlORR/3od/rezZsAY3v536q8c=",
"module": "sha256-Rty7wtfX0d47lSZoX66uA20b/XwrvhL3izIuD1xLVk8=",
"pom": "sha256-v0UZJkr/2hRWrbjIHLazJ5AiMBqn/tdbNKlM34Oj4bo="
},
"com/diffplug/spotless#spotless-plugin-gradle/6.10.0": {
"jar": "sha256-p8P8jOFdk311AFsuSclmXdp2UfLSLk7Kn7G03eR79As=",
"module": "sha256-m6j/efMjDs5rZomCishSor+pbZl8JXKjre7wtrFckq0=",
"pom": "sha256-+PCTwoomONZy0ML6LCljz5WFVKoeFHuuvLIEsViM4ns="
},
"com/fasterxml#oss-parent/38": {
"pom": "sha256-yD+PRd/cqNC2s2YcYLP4R4D2cbEuBvka1dHBodH5Zug="
},
"com/fasterxml/jackson#jackson-base/2.11.2": {
"pom": "sha256-k0uchkLt8xBMUAKC+4EGxzxWeBw9xMdelr2NG7Ha3p0="
},
"com/fasterxml/jackson#jackson-bom/2.11.2": {
"pom": "sha256-2qQsw65gqJH9ssh0ZxtiPc0tH+/Kd7z7OU/rHRInfME="
},
"com/fasterxml/jackson#jackson-parent/2.11": {
"pom": "sha256-wbChPYz+Y7QLD66EWLmUYxae0MYPf8lj7z8FJXFQy+g="
},
"com/fasterxml/jackson/core#jackson-annotations/2.11.2": {
"jar": "sha256-kNYC0ZVd9QmxVpYYz/hpmUyvlIPLgqPMs5eCpc2lQSY=",
"pom": "sha256-AEEc6Dh0WAKZWB4oOuRaXtN7AFHm9WO2miVQeKtYk+4="
},
"com/fasterxml/jackson/core#jackson-core/2.11.2": {
"jar": "sha256-+NdoxOiIRSK+WIHdKpGuyBLQjU8FhStDQZDiLeZZ38k=",
"pom": "sha256-QL3NBekAYAtBM3NCz1xpwln9ii+en0p5aNYebvWeOYw="
},
"com/fasterxml/jackson/core#jackson-databind/2.11.2": {
"jar": "sha256-y4kLSq2O0hp7V+PI95JNvcoa7/nd0nyw/zckMDeuE0I=",
"pom": "sha256-9a5wZBwK4Svl+UaDjujKE9qIk+d7RNkNXuJfPfjhYQU="
},
"com/github/johnrengelman/shadow#com.github.johnrengelman.shadow.gradle.plugin/7.1.2": {
"pom": "sha256-lW5FCF5S6l7zLTRnHruE6xxBqDxFSa8m5oY18QYXmNM="
},
"com/googlecode/concurrent-trees#concurrent-trees/2.6.1": {
"jar": "sha256-BONySYTipcv1VgbPo3KlvT08XSohUzpwBOPN5Tl2H6U=",
"pom": "sha256-Q8K5sULnBV0fKlgn8QlEkl0idH2XVrMlDAeqtHU4qXE="
},
"com/googlecode/javaewah#JavaEWAH/1.1.12": {
"jar": "sha256-sZIEMxrG4gS++vUIpo9S7GtGONnZus3b69Q1+cTVAPI=",
"pom": "sha256-BhhOmwWeCAkRgnE2r17Hj1fuTDvBn2MutWGw34+HiM4="
},
"commons-io#commons-io/2.11.0": {
"jar": "sha256-lhsvbYfbrMXVSr9Fq3puJJX4m3VZiWLYxyPOqbwhCQg=",
"pom": "sha256-LgFv1+MkS18sIKytg02TqkeQSG7h5FZGQTYaPoMe71k="
},
"gradle/plugin/com/github/johnrengelman#shadow/7.1.2": {
"jar": "sha256-v3BcwupcAYCqhwoPqAs5vxOhTScSjh6zpLZ0vjT1jpA=",
"pom": "sha256-H6qwvkF9ezxBqXzKCsqKWwtkBvw7Etfyjiw0Ex3/k0o="
},
"gradle/plugin/org/mikeneck#graalvm-native-image-plugin/1.4.1": {
"jar": "sha256-hxjq0IdN8UuGNB6IOkxkp3amRd0GbzcO2o+0xaPPZSI=",
"pom": "sha256-nNX2P1cnBVME1ZPa+uqiQK5dE/nZ3xn6meED8wc0lKo="
},
"org/apache#apache/23": {
"pom": "sha256-vBBiTgYj82V3+sVjnKKTbTJA7RUvttjVM6tNJwVDSRw="
},
"org/apache/ant#ant-launcher/1.10.11": {
"jar": "sha256-2rUw33qYC1rI/X6NIIJDrg0+vW3gmxqiznVjYMwu0lY=",
"pom": "sha256-7SoGiCYb624I7FSzgxLx1ILM8aO4Y8R9KNW5CkRtHB4="
},
"org/apache/ant#ant-parent/1.10.11": {
"pom": "sha256-V6BTJoLzD6MHQWoiWSnVcQrNpy17Je4IyvmNyCzTXbY="
},
"org/apache/ant#ant/1.10.11": {
"jar": "sha256-iMC4m7uq4B4Nn8rpO+eS9au+NAkQb47uhY/fNl28B1Q=",
"pom": "sha256-wiiU2ctGq/XOv27rK8z+TXjhju6jEaDqat3VnftLH+M="
},
"org/apache/commons#commons-parent/52": {
"pom": "sha256-ddvo806Y5MP/QtquSi+etMvNO18QR9VEYKzpBtu0UC4="
},
"org/apache/logging#logging-parent/3": {
"pom": "sha256-djouwrgJTUFh3rbCZLEmIIW5vjC/OjHCzhNyQuV3Iqc="
},
"org/apache/logging/log4j#log4j-api/2.17.1": {
"jar": "sha256-sNikyKtPuLGIjQCVgicDsObUeTxBlVAgPanmkZYWHeQ=",
"pom": "sha256-HirO8yILKb4QrgmXKLFYsY2UP5Ghk8xFAbtC+SnB6Io="
},
"org/apache/logging/log4j#log4j-core/2.17.1": {
"jar": "sha256-yWfyI0h5gLk2TpSnx/mooB/T7nwZvb8LD5+MuFEfPUE=",
"pom": "sha256-C7s79tTSKhv6PDwJJ8KUEK8UoPsm47Ark3JvXH6Yqv0="
},
"org/apache/logging/log4j#log4j/2.17.1": {
"pom": "sha256-lnq8AkRDqcsJaTVVmvXprW8P9hN1+Esn1EDS+nCAawk="
},
"org/codehaus/groovy#groovy-xml/3.0.10": {
"jar": "sha256-vCrVETWWo6m7ZQ2mRx8biRUFQheCF0p/5g15DttinoU=",
"pom": "sha256-Zwf5O1jO4BxBc/uuhNLh2DDKQc00LZBgbNW3GKn/fSk="
},
"org/codehaus/groovy#groovy/3.0.10": {
"jar": "sha256-3/762oKUhlvlA1UVwDIPtnlEPShfSl+K2tzwDBEw6Ew=",
"pom": "sha256-SYKt9KbGxQVnsL489JSCXmwqJ9izhx2eGIIqdCcreao="
},
"org/codehaus/plexus#plexus-utils/3.4.1": {
"jar": "sha256-UtheBLORhyKvEdEoVbSoJX35ag52yPTjhS5vqoUfNXs=",
"pom": "sha256-sUTP+bHGJZ/sT+5b38DzYNacI6vU6m5URTOpSbaeNYI="
},
"org/codehaus/plexus#plexus/8": {
"pom": "sha256-/6NJ2wTnq/ZYhb3FogYvQZfA/50/H04qpXILdyM/dCw="
},
"org/eclipse/jgit#org.eclipse.jgit-parent/5.13.0.202109080827-r": {
"pom": "sha256-oY/X0MQf2o2PHEoktQAKhmRWFHokdG7mzEcx54ihje4="
},
"org/eclipse/jgit#org.eclipse.jgit/5.13.0.202109080827-r": {
"jar": "sha256-2r+DafDN+M8Xt/faS9qTIMVwu3VMiOC+t7hSgSz1zSU=",
"pom": "sha256-qEF3Rc+i2V1qlxHpQT/KmE/FZmt2J7rRVAzyfUYq6BM="
},
"org/jdom#jdom2/2.0.6": {
"jar": "sha256-E0XxG6YG0VYD1nQFUajCGUfAIVZAdw7GcnH+eL6pfPU=",
"pom": "sha256-R7I6ef4za3QbgkNMbgSdaBZSVuQF51wQkh/XL6imXY0="
},
"org/jetbrains#annotations/13.0": {
"jar": "sha256-rOKhDcji1f00kl7KwD5JiLLA+FFlDJS4zvSbob0RFHg=",
"pom": "sha256-llrrK+3/NpgZvd4b96CzuJuCR91pyIuGN112Fju4w5c="
},
"org/jetbrains/kotlin#kotlin-stdlib-common/1.3.21": {
"jar": "sha256-zqYfe2EYleZPWFaal1f8CrDVgvEHIR4ZMODOKgrdUqc=",
"pom": "sha256-HkQzMKGrEIPdEjMesYI7zaGM06YWLtxTagNeTeHXhz0="
},
"org/jetbrains/kotlin#kotlin-stdlib/1.3.21": {
"jar": "sha256-OLojcNnwb1BDPgayyndblEc8LieF9BCSYHmreTxysDQ=",
"pom": "sha256-nOHqMzlsW/5I7IQSoM1WHsyQnXHI+TZZZ6FPnyT9uaU="
},
"org/junit#junit-bom/5.7.2": {
"module": "sha256-87zrHFndT2mT9DBN/6WAFyuN9lp2zTb6T9ksBXjSitg=",
"pom": "sha256-zRSqqGmZH4ICHFhdVw0x/zQry6WLtEIztwGTdxuWSHs="
},
"org/mikeneck/graalvm-native-image#org.mikeneck.graalvm-native-image.gradle.plugin/1.4.1": {
"pom": "sha256-vxSiyLGrQgrTQ+r8tt9YEbEtbZsn+mBcM/7yz9QZeW8="
},
"org/ow2#ow2/1.5": {
"pom": "sha256-D4obEW52C4/mOJxRuE5LB6cPwRCC1Pk25FO1g91QtDs="
},
"org/ow2/asm#asm-analysis/9.2": {
"jar": "sha256-h4++UhcxwHLRTS1luYOxvq5q0G/aAAe2qLroH3P0M8Q=",
"pom": "sha256-dzzBor/BTGxKl5xRoHXAI0oL9pT8Or5PrPRU83oUXxs="
},
"org/ow2/asm#asm-commons/9.2": {
"jar": "sha256-vkzlMTiiOLtSLNeBz5Hzulzi9sqT7GLUahYqEnIl4KY=",
"pom": "sha256-AoJOg58qLw5ylZ/dMLSJckDwWvxD3kLXugsYQ3YBwHA="
},
"org/ow2/asm#asm-tree/9.2": {
"jar": "sha256-qr+b0jCRpOv8EJwfPufPPkuJ9rotP1HFJD8Ws8/64BE=",
"pom": "sha256-9h8+vqVSDd8Z9FKwPEJscjG92KgdesKHZctScSJaw3g="
},
"org/ow2/asm#asm/9.2": {
"jar": "sha256-udT+TXGTjfOIOfDspCqqpkz4sxPWeNoDbwyzyhmbR/U=",
"pom": "sha256-37EqGyJL8Bvh/WBAIEZviUJBvLZF3M45Xt2M1vilDfQ="
},
"org/slf4j#slf4j-api/1.7.30": {
"jar": "sha256-zboHlk0btAoHYUhcax6ML4/Z6x0ZxTkorA1/lRAQXFc=",
"pom": "sha256-fgdHdR6bZ+Gdy1IG8E6iLMA9JQxCJCZALq3QNRPywxQ="
},
"org/slf4j#slf4j-parent/1.7.30": {
"pom": "sha256-EWR5VuSKDFv7OsM/bafoPzQQAraFfv0zWlBbaHvjS3U="
},
"org/sonatype/oss#oss-parent/5": {
"pom": "sha256-FnjUEgpYXYpjATGu7ExSTZKDmFg7fqthbufVqH9SDT0="
},
"org/sonatype/oss#oss-parent/7": {
"pom": "sha256-tR+IZ8kranIkmVV/w6H96ne9+e9XRyL+kM5DailVlFQ="
},
"org/vafer#jdependency/2.7.0": {
"jar": "sha256-1j79V0b/QIlDp91++Frp8Jqn+2O7KxaRFCfObEW1n9A=",
"pom": "sha256-6yRCKwo+nofVrG6oCHeG+1HEsbvg0iXvdSFSxzaiBNA="
}
},
"https://repo.maven.apache.org/maven2/org": {
"apache#apache/23": {
"pom": "sha256-vBBiTgYj82V3+sVjnKKTbTJA7RUvttjVM6tNJwVDSRw="
},
"apache/commons#commons-lang3/3.12.0": {
"jar": "sha256-2RnZBEhsA3+NGTQS2gyS4iqfokIwudZ6V4VcXDHH6U4=",
"pom": "sha256-gtMfHcxFg+/9dE6XkWWxbaZL+GvKYj/F0bA+2U9FyFo="
},
"apache/commons#commons-parent/52": {
"pom": "sha256-ddvo806Y5MP/QtquSi+etMvNO18QR9VEYKzpBtu0UC4="
},
"bouncycastle#bcprov-jdk18on/1.71": {
"jar": "sha256-80M6l9eA/p+j3D1WKkHezVmy5hfOiE3pBgNJrBR1AEU=",
"pom": "sha256-u90garzosxsfGnMBORtEO6bN4X5y3udcH9LkEBFsXIc="
},
"junit#junit-bom/5.7.1": {
"module": "sha256-mFTjiU1kskhSB+AEa8oHs9QtFp54L0+oyc4imnj67gQ=",
"pom": "sha256-C5sUo9YhBvr+jGinF7h7h60YaFiZRRt1PAT6QbaFd4Q="
}
}
}

View File

@@ -0,0 +1,74 @@
{
lib,
stdenv,
fetchFromGitLab,
gradle_8,
jre_headless,
jre_minimal,
runtimeShell,
}:
let
# "Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0."
gradle = gradle_8;
jre = jre_minimal.override {
modules = [
"java.base"
"java.desktop"
];
jdk = jre_headless;
};
in
stdenv.mkDerivation rec {
pname = "pdftk";
version = "3.3.3";
src = fetchFromGitLab {
owner = "pdftk-java";
repo = "pdftk";
rev = "v${version}";
hash = "sha256-ciKotTHSEcITfQYKFZ6sY2LZnXGChBJy0+eno8B3YHY=";
};
nativeBuildInputs = [ gradle ];
mitmCache = gradle.fetchDeps {
inherit pname;
data = ./deps.json;
};
__darwinAllowLocalNetworking = true;
gradleFlags = [ "-Dfile.encoding=utf-8" ];
gradleBuildTask = "shadowJar";
installPhase = ''
mkdir -p $out/{bin,share/pdftk,share/man/man1}
cp build/libs/pdftk-all.jar $out/share/pdftk
cat << EOF > $out/bin/pdftk
#!${runtimeShell}
exec ${jre}/bin/java -jar "$out/share/pdftk/pdftk-all.jar" "\$@"
EOF
chmod a+x "$out/bin/pdftk"
cp ${src}/pdftk.1 $out/share/man/man1
'';
meta = with lib; {
description = "Command-line tool for working with PDFs";
homepage = "https://gitlab.com/pdftk-java/pdftk";
sourceProvenance = with sourceTypes; [
fromSource
binaryBytecode # deps
];
license = licenses.gpl2Plus;
maintainers = with maintainers; [
raskin
averelld
];
platforms = platforms.unix;
mainProgram = "pdftk";
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
poppler,
fetchpatch,
}:
stdenv.mkDerivation rec {
pname = "pdftoipe";
version = "7.2.29.1";
src = fetchFromGitHub {
owner = "otfried";
repo = "ipe-tools";
rev = "v${version}";
hash = "sha256-6FI0ZLRrDmNFAKyht7hB94MsCy+TasD6Mb/rx6sdCdg=";
};
sourceRoot = "${src.name}/pdftoipe";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ poppler ];
installPhase = ''
install -D pdftoipe $out/bin/pdftoipe
'';
meta = with lib; {
description = "Program that tries to convert arbitrary PDF documents to Ipe files";
homepage = "https://github.com/otfried/ipe-tools";
changelog = "https://github.com/otfried/ipe-tools/releases";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ yrd ];
mainProgram = "pdftoipe";
};
}

View File

@@ -0,0 +1,31 @@
From b3cd46bf1ea7ddc7ce26e9b713bb7fb5faadba40 Mon Sep 17 00:00:00 2001
From: Ulysses Zhan <ulysseszhan@gmail.com>
Date: Wed, 20 Mar 2024 21:57:47 -0700
Subject: [PATCH] fix `Unknown option --pdf-page` when calling inkscape
---
pdftowrite/pdftowrite.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pdftowrite/pdftowrite.py b/pdftowrite/pdftowrite.py
index 6c12515..4d03fc2 100644
--- a/pdftowrite/pdftowrite.py
+++ b/pdftowrite/pdftowrite.py
@@ -79,7 +79,7 @@ def process_page(filename: str, page_num: int, output_dir: str, ns: argparse.Nam
opts = ['--pdf-poppler'] if ns.mode is Mode.POPPLER or ns.mode is Mode.MIXED else []
utils.inkscape_run([
*opts,
- f'--pdf-page={page_num}',
+ f'--pages={page_num}',
f'--export-dpi={ns.dpi}',
'--export-plain-svg',
'-o', output,
@@ -90,7 +90,7 @@ def process_page(filename: str, page_num: int, output_dir: str, ns: argparse.Nam
if ns.mode is Mode.MIXED:
text_layer_output = str(Path(output_dir) / f'output-{page_num}-text.svg')
utils.inkscape_run([
- f'--pdf-page={page_num}',
+ f'--pages={page_num}',
f'--export-dpi={ns.dpi}',
'--export-plain-svg',
'-o', text_layer_output,

View File

@@ -0,0 +1,91 @@
{
lib,
python3Packages,
fetchFromGitHub,
makeWrapper,
versionCheckHook,
nix-update-script,
# shared
gzip,
# pdftowrite
poppler-utils,
inkscape,
ghostscript,
imagemagick,
libxml2,
libxslt,
# writetopdf
wkhtmltopdf,
pdftk,
librsvg,
}:
python3Packages.buildPythonApplication rec {
pname = "pdftowrite";
version = "2021.05.03";
pyproject = true;
src = fetchFromGitHub {
owner = "apebl";
repo = "pdftowrite";
tag = version;
hash = "sha256-IFX9K74tfGKyMtqlc/RsV00baZEzE3HcPAGfrmTHnDQ=";
};
dependencies = [
python3Packages.shortuuid
python3Packages.picosvg
];
build-system = [
python3Packages.setuptools
python3Packages.setuptools-scm
makeWrapper
];
patches = [
# fix inkscape flag (see https://gitlab.com/inkscape/inkscape/-/issues/4536)
./inkscape-unknown-option-pdf-page.patch
];
postInstall =
let
pdftowritePath = lib.makeBinPath [
# shared
gzip
# pdftowrite
poppler-utils
inkscape
ghostscript
imagemagick
libxml2
libxslt
];
writetopdfPath = lib.makeBinPath [
# shared
gzip
# writetopdf
wkhtmltopdf
pdftk
librsvg
];
in
# `SELF_CALL=xxx` prevents inkscape shananigans (see https://gitlab.com/inkscape/inkscape/-/issues/4716)
''
wrapProgram $out/bin/pdftowrite --prefix PATH : ${pdftowritePath} \
--set SELF_CALL=xxx
wrapProgram $out/bin/writetopdf --prefix PATH : ${writetopdfPath}
'';
nativeCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/apebl/pdftowrite";
description = "Utility that converts PDF to Stylus Labs Write documents, and vice versa";
platforms = lib.platforms.linux;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ henrispriet ];
};
}

View File

@@ -0,0 +1,68 @@
{
lib,
stdenv,
fetchFromGitHub,
meson,
pkg-config,
vala,
gtk3,
wrapGAppsHook3,
pantheon,
ninja,
ghostscript,
makeWrapper,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pdftricks";
version = "0.4.1";
src = fetchFromGitHub {
owner = "muriloventuroso";
repo = "pdftricks";
tag = finalAttrs.version;
hash = "sha256-l4Xg4Uk520qoaEo8UxdLE8MfpVkRj/bpGBzL5HwdDUo=";
};
nativeBuildInputs = [
meson
pkg-config
vala
wrapGAppsHook3
ninja
makeWrapper
];
buildInputs = [
gtk3
pantheon.granite
ghostscript
];
preFixup = ''
wrapProgram $out/bin/com.github.muriloventuroso.pdftricks \
--prefix PATH : ${lib.makeBinPath [ ghostscript ]} \
''${gappsWrapperArgs[@]}
'';
dontWrapGApps = true;
postPatch = ''
# Remove positional arguments that cause errors
substituteInPlace data/meson.build \
--replace-fail "'desktop'," "" \
--replace-fail "'appdata'," ""
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Simple, efficient application for small manipulations in PDF files using Ghostscript";
homepage = "https://github.com/muriloventuroso/pdftricks";
changelog = "https://github.com/muriloventuroso/pdftricks/releases";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ theobori ];
platforms = lib.platforms.linux;
mainProgram = "com.github.muriloventuroso.pdftricks";
};
})

View File

@@ -0,0 +1,93 @@
{
lib,
stdenv,
fetchFromGitHub,
# nativeBuildInputs
python3,
cmake,
gfortran,
pkg-config,
hdf5-mpi,
zpp,
# buildInputs
gbenchmark,
libyaml,
mpi,
spdlog,
# passthru
nix-update-script,
testers,
pdi,
}:
let
python = python3.withPackages (
p: with p; [
distutils
setuptools
]
);
in
stdenv.mkDerivation (finalAttrs: {
pname = "pdi";
version = "1.9.2";
src = fetchFromGitHub {
owner = "pdidev";
repo = "pdi";
tag = finalAttrs.version;
hash = "sha256-bbhsMbTVvG19vtkZyOiCRH168kCFk2ahSFc7davfXzo=";
};
# Current hdf5 version in nixpkgs is 1.14.4.3 which is 4 numbers long and doesn't match the 3 number regex. :')
# Patch it to make it match a 4 number-long version.
postPatch = ''
substituteInPlace plugins/decl_hdf5/cmake/FindHDF5.cmake \
--replace-fail '"H5_VERSION[ \t]+\"([0-9]+\\.[0-9]+\\.[0-9]+)' '"H5_VERSION[ \t]+\"([0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)*)'
'';
nativeBuildInputs = [
cmake
gfortran
pkg-config
python
hdf5-mpi
zpp
];
buildInputs = [
gbenchmark
hdf5-mpi
libyaml
mpi
spdlog
];
cmakeFlags = [
# Force using nix gbenchmark instead of vendored version
(lib.cmakeFeature "USE_benchmark" "SYSTEM")
];
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion {
package = pdi;
command = "pdirun";
};
};
meta = {
description = "Library that aims todecouple high-performance simulation codes from I/O concerns";
homepage = "https://pdi.dev/master/";
changelog = "https://github.com/pdidev/pdi/releases/tag/${finalAttrs.version}";
license = lib.licenses.bsd3;
mainProgram = "pdirun";
maintainers = with lib.maintainers; [ GaetanLepage ];
badPlatforms = [
# fatal error: 'link.h' file not found
lib.systems.inspect.patterns.isDarwin
];
};
})

View File

@@ -0,0 +1,13 @@
--- a/cmdline.c 2021-10-05 22:29:41.000000000 -0700
+++ a/cmdline.c 2024-05-30 12:05:29.146787602 -0700
@@ -22,10 +22,8 @@
* @APPLE_LICENSE_HEADER_END@
*/
#include <stdio.h>
-#ifndef __linux__
#include <stdlib.h>
#include <unistd.h>
-#endif
#include <string.h>
#include <errno.h>
#include <fcntl.h>

View File

@@ -0,0 +1,94 @@
{
stdenv,
lib,
fetchFromGitHub,
fetchpatch,
installShellFiles,
libbsd,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pdisk";
version = "0.10";
src = fetchFromGitHub {
owner = "apple-oss-distributions";
repo = "pdisk";
tag = "pdisk-${lib.versions.minor finalAttrs.version}";
hash = "sha256-+gBgnk/1juEHE0nXaz7laUaH7sxrX5SzsLGr0PHsdHs=";
};
patches = [
# Fix makefile for Unix
(fetchpatch {
url = "https://aur.archlinux.org/cgit/aur.git/plain/makefile.patch?h=pdisk&id=39dc371712d2f7dbd38f6e8ddc6ba661faa1a7a9";
sha256 = "sha256-mLFclu8IlDN/gxNTI7Kei6ARketlAhJRu8ForFUzFU0=";
})
# Fix lseek usage in file_media.c
(fetchpatch {
url = "https://aur.archlinux.org/cgit/aur.git/plain/file_media.c.patch?h=pdisk&id=39dc371712d2f7dbd38f6e8ddc6ba661faa1a7a9";
sha256 = "sha256-CCq5fApwx6w1GKDrgP+0nUdQy/5z5ON7/fdp4M63nko=";
})
# Fix open_partition_map call in cvt_pt.c
(fetchpatch {
url = "https://aur.archlinux.org/cgit/aur.git/plain/cvt_pt.c.patch?h=pdisk&id=39dc371712d2f7dbd38f6e8ddc6ba661faa1a7a9";
sha256 = "sha256-jScPfzt9/fQHkf2MfHLvYsh/Rw2NZZXkzZiiVo8F5Mc=";
})
# Replace removed sys_nerr and sys_errlist with strerror
(fetchpatch {
url = "https://aur.archlinux.org/cgit/aur.git/plain/linux_strerror.patch?h=pdisk&id=d0c930ea8bcac008bbd0ade1811133a625caea54";
sha256 = "sha256-HGJIS+vTn6456KtaETutIgTPPBm2C9OHf1anG8yaJPo=";
})
# Fix missing includes on Linux
./cmdline.patch
];
postPatch = ''
substituteInPlace makefile \
--replace-fail 'cc' '${stdenv.cc.targetPrefix}cc'
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace makefile \
--replace-fail '-lbsd' '-framework CoreFoundation -framework IOKit'
'';
strictDeps = true;
nativeBuildInputs = [
installShellFiles
];
buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [
libbsd
];
env.NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE";
enableParallelBuilding = true;
installPhase = ''
runHook preInstall
for exe in pdisk cvt_pt; do
install -Dm755 -t $out/bin $exe
done
installManPage pdisk.8
install -Dm644 pdisk.html $out/share/doc/pdisk/pdisk.html
runHook postInstall
'';
meta = {
description = "Low-level Apple partition table editor for Linux, OSS Apple version";
homepage = "https://github.com/apple-oss-distributions/pdisk";
license = with lib.licenses; [
hpnd # original license statements seems to match this (in files that are shared with mac-fdisk)
apple-psl10 # new files
];
mainProgram = "pdisk";
maintainers = with lib.maintainers; [ OPNA2608 ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'pdk', '3.3.0'

View File

@@ -0,0 +1,63 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
childprocess (5.1.0)
logger (~> 1.5)
cri (2.15.12)
deep_merge (1.2.2)
diff-lcs (1.5.1)
ffi (1.17.0)
hitimes (2.0.0)
json-schema (4.3.1)
addressable (>= 2.8)
json_pure (2.6.3)
logger (1.6.1)
minitar (0.12.1)
pastel (0.8.0)
tty-color (~> 0.5)
pathspec (1.1.3)
pdk (3.3.0)
bundler (>= 2.1.0, < 3.0.0)
childprocess (~> 5.0)
cri (~> 2.15.11)
deep_merge (~> 1.2.2)
diff-lcs (>= 1.5.0)
ffi (>= 1.15.5, < 2.0.0)
hitimes (= 2.0.0)
json-schema (~> 4.0)
json_pure (~> 2.6.3)
minitar (~> 0.8)
pathspec (~> 1.1)
puppet-modulebuilder (~> 1.0)
tty-prompt (~> 0.23)
tty-spinner (~> 0.9)
tty-which (~> 0.5)
public_suffix (6.0.1)
puppet-modulebuilder (1.1.0)
minitar (~> 0.9)
pathspec (>= 0.2.1, < 3.0.0)
tty-color (0.6.0)
tty-cursor (0.7.1)
tty-prompt (0.23.1)
pastel (~> 0.8)
tty-reader (~> 0.8)
tty-reader (0.9.0)
tty-cursor (~> 0.7)
tty-screen (~> 0.8)
wisper (~> 2.0)
tty-screen (0.8.2)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
tty-which (0.5.0)
wisper (2.0.1)
PLATFORMS
ruby
DEPENDENCIES
pdk (= 3.3.0)
BUNDLED WITH
2.5.16

View File

@@ -0,0 +1,276 @@
{
addressable = {
dependencies = [ "public_suffix" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0cl2qpvwiffym62z991ynks7imsm87qmgxf0yfsmlwzkgi9qcaa6";
type = "gem";
};
version = "2.8.7";
};
childprocess = {
dependencies = [ "logger" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1v5nalaarxnfdm6rxb7q6fmc6nx097jd630ax6h9ch7xw95li3cs";
type = "gem";
};
version = "5.1.0";
};
cri = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1rank6i9p2drwdcmhan6ifkzrz1v3mwpx47fwjl75rskxwjfkgwa";
type = "gem";
};
version = "2.15.12";
};
deep_merge = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0fjn4civid68a3zxnbgyjj6krs3l30dy8b4djpg6fpzrsyix7kl3";
type = "gem";
};
version = "1.2.2";
};
diff-lcs = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1znxccz83m4xgpd239nyqxlifdb7m8rlfayk6s259186nkgj6ci7";
type = "gem";
};
version = "1.5.1";
};
ffi = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "07139870npj59jnl8vmk39ja3gdk3fb5z9vc0lf32y2h891hwqsi";
type = "gem";
};
version = "1.17.0";
};
hitimes = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0ix9rp9rsrwin38z2aqiwpxc8p2dzl6m3ra47az47fsija1cb2qf";
type = "gem";
};
version = "2.0.0";
};
json-schema = {
dependencies = [ "addressable" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "09bq393nrxa7hmphc3li8idgxdnb5hwgj15d0q5qsh4l5g1qvrnm";
type = "gem";
};
version = "4.3.1";
};
json_pure = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0kn736pb52j8b9xxq6l8wqp2chs74aa14vfnp0rijjn086m8b4f3";
type = "gem";
};
version = "2.6.3";
};
logger = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0lwncq2rf8gm79g2rcnnyzs26ma1f4wnfjm6gs4zf2wlsdz5in9s";
type = "gem";
};
version = "1.6.1";
};
minitar = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0f307mpj4j0gp7iq77xj4p149f4krcvbll9rismng3jcijpbn79s";
type = "gem";
};
version = "0.12.1";
};
pastel = {
dependencies = [ "tty-color" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0xash2gj08dfjvq4hy6l1z22s5v30fhizwgs10d6nviggpxsj7a8";
type = "gem";
};
version = "0.8.0";
};
pathspec = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "08sxih7jrx07rczg3rpw7h9dawr43rxc68afhy498j8r816gzry4";
type = "gem";
};
version = "1.1.3";
};
pdk = {
dependencies = [
"childprocess"
"cri"
"deep_merge"
"diff-lcs"
"ffi"
"hitimes"
"json-schema"
"json_pure"
"minitar"
"pathspec"
"puppet-modulebuilder"
"tty-prompt"
"tty-spinner"
"tty-which"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1gildcnii3ayw585as8d8bqhnfb9diqg7n3vmgaz8c5b9wb8c106";
type = "gem";
};
version = "3.3.0";
};
public_suffix = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0vqcw3iwby3yc6avs1vb3gfd0vcp2v7q310665dvxfswmcf4xm31";
type = "gem";
};
version = "6.0.1";
};
puppet-modulebuilder = {
dependencies = [
"minitar"
"pathspec"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0rh31hq24nkddd83cx7n9ln5bsib3a052hrmn120sq0937337173";
type = "gem";
};
version = "1.1.0";
};
tty-color = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0aik4kmhwwrmkysha7qibi2nyzb4c8kp42bd5vxnf8sf7b53g73g";
type = "gem";
};
version = "0.6.0";
};
tty-cursor = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0j5zw041jgkmn605ya1zc151bxgxl6v192v2i26qhxx7ws2l2lvr";
type = "gem";
};
version = "0.7.1";
};
tty-prompt = {
dependencies = [
"pastel"
"tty-reader"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1j4y8ik82azjxshgd4i1v4wwhsv3g9cngpygxqkkz69qaa8cxnzw";
type = "gem";
};
version = "0.23.1";
};
tty-reader = {
dependencies = [
"tty-cursor"
"tty-screen"
"wisper"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1cf2k7w7d84hshg4kzrjvk9pkyc2g1m3nx2n1rpmdcf0hp4p4af6";
type = "gem";
};
version = "0.9.0";
};
tty-screen = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0l4vh6g333jxm9lakilkva2gn17j6gb052626r1pdbmy2lhnb460";
type = "gem";
};
version = "0.8.2";
};
tty-spinner = {
dependencies = [ "tty-cursor" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0hh5awmijnzw9flmh5ak610x1d00xiqagxa5mbr63ysggc26y0qf";
type = "gem";
};
version = "0.9.3";
};
tty-which = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0rpljdwlfm4qgps2xvq6306w86fm057m89j4gizcji371mgha92q";
type = "gem";
};
version = "0.5.0";
};
wisper = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1rpsi0ziy78cj82sbyyywby4d0aw0a5q84v65qd28vqn79fbq5yf";
type = "gem";
};
version = "2.0.1";
};
}

View File

@@ -0,0 +1,41 @@
{
bundlerApp,
bundlerUpdateScript,
gnumake,
lib,
makeWrapper,
pdk,
testers,
}:
bundlerApp {
pname = "pdk";
gemdir = ./.;
exes = [ "pdk" ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/pdk --prefix PATH : ${lib.makeBinPath [ gnumake ]}
'';
passthru = {
tests.version = testers.testVersion {
package = pdk;
version = (import ./gemset.nix).pdk.version;
};
updateScript = bundlerUpdateScript "pdk";
};
meta = {
changelog = "https://github.com/puppetlabs/pdk/blob/main/CHANGELOG.md";
description = "Puppet Development Kit";
homepage = "https://github.com/puppetlabs/pdk";
license = lib.licenses.asl20;
mainProgram = "pdk";
maintainers = with lib.maintainers; [
netali
anthonyroussel
];
};
}

View File

@@ -0,0 +1,152 @@
{
lib,
python3,
fetchFromGitHub,
runtimeShell,
installShellFiles,
testers,
pdm,
}:
let
python = python3.override {
self = python;
packageOverrides = _: super: {
resolvelib = super.resolvelib.overridePythonAttrs (old: rec {
version = "1.1.0";
src = old.src.override {
tag = version;
hash = "sha256-UBdgFN+fvbjz+rp8+rog8FW2jwO/jCfUPV7UehJKiV8=";
};
});
# pdm requires ...... -> ghostscript-with-X which is AGPL only
matplotlib = super.matplotlib.override { enableTk = false; };
# pdm requires ...... -> jbig2dec which is AGPL only
moto = super.moto.overridePythonAttrs (old: {
doCheck = false;
});
};
};
in
python.pkgs.buildPythonApplication rec {
pname = "pdm";
version = "2.25.9";
pyproject = true;
disabled = python.pkgs.pythonOlder "3.8";
src = fetchFromGitHub {
owner = "pdm-project";
repo = "pdm";
tag = version;
hash = "sha256-Oq3xOxP6huK9sppum9SFoKUsEZNmXdTuuhhy1UqAk/Q=";
};
pythonRelaxDeps = [ "hishel" ];
nativeBuildInputs = [ installShellFiles ];
build-system = with python.pkgs; [
pdm-backend
pdm-build-locked
];
dependencies =
with python.pkgs;
[
blinker
dep-logic
filelock
findpython
hishel
httpx
installer
msgpack
packaging
pbs-installer
platformdirs
pyproject-hooks
python-dotenv
resolvelib
rich
shellingham
tomlkit
truststore
unearth
id
virtualenv
]
++ httpx.optional-dependencies.socks;
makeWrapperArgs = [ "--set PDM_CHECK_UPDATE 0" ];
# Silence network warning during pypaInstallPhase
# by disabling latest version check
preInstall = ''
export PDM_CHECK_UPDATE=0
'';
postInstall = ''
export PDM_LOG_DIR=/tmp/pdm/log
$out/bin/pdm completion bash >pdm.bash
$out/bin/pdm completion fish >pdm.fish
$out/bin/pdm completion zsh >pdm.zsh
installShellCompletion pdm.{bash,fish,zsh}
unset PDM_LOG_DIR
'';
nativeCheckInputs = with python.pkgs; [
first
pytestCheckHook
pytest-mock
pytest-xdist
pytest-httpserver
];
disabledTestMarks = [ "network" ];
preCheck = ''
export HOME=$TMPDIR
substituteInPlace tests/cli/test_run.py \
--replace-fail "/bin/bash" "${runtimeShell}"
'';
disabledTests = [
# fails to locate setuptools (maybe upstream bug)
"test_convert_setup_py_project"
# pythonfinder isn't aware of nix's python infrastructure
"test_use_wrapper_python"
"test_build_with_no_isolation"
"test_run_script_with_inline_metadata"
# touches the network
"test_find_candidates_from_find_links"
"test_lock_all_with_excluded_groups"
"test_find_interpreters_with_PDM_IGNORE_ACTIVE_VENV"
"test_build_distributions"
"test_init_project_respect"
"test_use_python_write_file_multiple_versions"
"test_repository_get_token_from_oidc"
"test_repository_get_token_misconfigured_github"
# https://github.com/pdm-project/pdm/issues/3590
"test_install_from_lock_with_higher_version"
];
__darwinAllowLocalNetworking = true;
passthru.tests.version = testers.testVersion { package = pdm; };
meta = {
homepage = "https://pdm-project.org";
changelog = "https://github.com/pdm-project/pdm/releases/tag/${version}";
description = "Modern Python package and dependency manager supporting the latest PEP standards";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
cpcloud
natsukium
misilelab
];
mainProgram = "pdm";
};
}

View File

@@ -0,0 +1,82 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
boost,
nixosTests,
openssl,
systemd,
lua,
luajit,
protobuf,
libsodium,
curl,
rustPlatform,
cargo,
rustc,
enableProtoBuf ? false,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pdns-recursor";
version = "5.2.5";
src = fetchurl {
url = "https://downloads.powerdns.com/releases/pdns-recursor-${finalAttrs.version}.tar.bz2";
hash = "sha256-qKZXp6vW6dI3zdJnU/fc9czVuMSKyBILCNK41XodhWo=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) src;
sourceRoot = "pdns-recursor-${finalAttrs.version}/settings/rust";
hash = "sha256-A3NX1zj9+9qCLTkfca3v8Rr8oc/zL/Ruknjl3g1aMG4=";
};
cargoRoot = "settings/rust";
nativeBuildInputs = [
cargo
rustc
rustPlatform.cargoSetupHook
pkg-config
];
buildInputs = [
boost
openssl
systemd
lua
luajit
libsodium
curl
]
++ lib.optional enableProtoBuf protobuf;
configureFlags = [
"--enable-reproducible"
"--enable-systemd"
"--enable-dns-over-tls"
"--with-boost=${boost.dev}"
"sysconfdir=/etc/pdns-recursor"
];
installFlags = [ "sysconfdir=$(out)/etc/pdns-recursor" ];
enableParallelBuilding = true;
passthru.tests = {
inherit (nixosTests) pdns-recursor ncdns;
};
meta = {
description = "Recursive DNS server";
homepage = "https://www.powerdns.com/";
platforms = lib.platforms.linux;
badPlatforms = [
"i686-linux" # a 64-bit time_t is needed
];
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ rnhmjoj ];
};
})

View File

@@ -0,0 +1,115 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
nixosTests,
boost,
yaml-cpp,
libsodium,
sqlite,
protobuf,
openssl,
systemd,
mariadb-connector-c,
libpq,
lua,
openldap,
geoip,
curl,
unixODBC,
lmdb,
tinycdb,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pdns";
version = "4.9.8";
src = fetchurl {
url = "https://downloads.powerdns.com/releases/pdns-${finalAttrs.version}.tar.bz2";
hash = "sha256-GAtmrjMtMWaWjgE7/3y/bwxyhp1r5pfbdKAt86xuipE=";
};
# redact configure flags from version output to reduce closure size
patches = [ ./version.patch ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [
boost
mariadb-connector-c
libpq
lua
openldap
sqlite
protobuf
geoip
yaml-cpp
libsodium
curl
unixODBC
openssl
systemd
lmdb
tinycdb
];
configureFlags = [
(lib.enableFeature stdenv.hostPlatform.is32bit "experimental-64bit-time_t-support-on-glibc")
(lib.enableFeature false "silent-rules")
(lib.enableFeature true "dns-over-tls")
(lib.enableFeature true "unit-tests")
(lib.enableFeature true "reproducible")
(lib.enableFeature true "tools")
(lib.enableFeature true "ixfrdist")
(lib.enableFeature true "systemd")
(lib.withFeature true "libsodium")
(lib.withFeature true "sqlite3")
(lib.withFeatureAs true "libcrypto" (lib.getDev openssl))
(lib.withFeatureAs true "modules" "")
(lib.withFeatureAs true "dynmodules" (
lib.concatStringsSep " " [
"bind"
"geoip"
"gmysql"
"godbc"
"gpgsql"
"gsqlite3"
"ldap"
"lmdb"
"lua2"
"pipe"
"remote"
"tinydns"
]
))
"--with-boost=${boost.dev}"
"sysconfdir=/etc/pdns"
];
# We want the various utilities to look for the powerdns config in
# /etc/pdns, but to actually install the sample config file in
# $out
installFlags = [ "sysconfdir=$(out)/etc/pdns" ];
enableParallelBuilding = true;
doCheck = true;
passthru.tests = {
nixos = nixosTests.powerdns;
};
__structuredAttrs = true;
meta = with lib; {
description = "Authoritative DNS server";
homepage = "https://www.powerdns.com";
platforms = platforms.unix;
broken = stdenv.hostPlatform.isDarwin;
license = licenses.gpl2Only;
maintainers = with maintainers; [
mic92
disassembler
nickcao
];
};
})

View File

@@ -0,0 +1,13 @@
diff --git a/pdns/version.cc b/pdns/version.cc
index d8f5d40..1368481 100644
--- a/pdns/version.cc
+++ b/pdns/version.cc
@@ -155,7 +155,7 @@ void showBuildConfiguration()
#ifdef PDNS_CONFIG_ARGS
#define double_escape(s) #s
#define escape_quotes(s) double_escape(s)
- g_log<<Logger::Warning<<"Configured with: "<<escape_quotes(PDNS_CONFIG_ARGS)<<endl;
+ g_log<<Logger::Warning<<"Configured with: "<<"redacted"<<endl;
#undef escape_quotes
#undef double_escape
#endif

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
}:
stdenv.mkDerivation rec {
pname = "pdnsd";
version = "1.2.9a-par";
src = fetchurl {
url = "http://members.home.nl/p.a.rombouts/pdnsd/releases/pdnsd-${version}.tar.gz";
sha256 = "0yragv5zk77a1hfkpnsh17vvsw8b14d6mzfng4bb7i58rb83an5v";
};
patches =
# fix build with linux headers >= 5.13
lib.optional stdenv.hostPlatform.isLinux (fetchpatch {
name = "fix-build-linux-headers-gte-5.13.patch";
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/net-dns/pdnsd/files/pdnsd-1.2.9a-linux-5.13_build_fix.patch?id=7ce35657f269c3b7016e8940ad36e59cf06e12a4";
hash = "sha256-Sh/0ZyiQpDvFZOWE9OCQ9+ocXurjzJvrE4WNWaGwAwk=";
});
postPatch = ''
sed -i 's/.*(cachedir).*/:/' Makefile.in
'';
configureFlags = [ "--enable-ipv6" ];
# fix ipv6 on darwin
CPPFLAGS = "-D__APPLE_USE_RFC_3542";
meta = with lib; {
description = "Permanent DNS caching";
homepage = "http://members.home.nl/p.a.rombouts/pdnsd";
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "pdpmake";
version = "2.0.3";
src = fetchFromGitHub {
owner = "rmyorston";
repo = "pdpmake";
rev = version;
hash = "sha256-6lLYtBKZTmi+fBkCyDysJS1O37/Z6ir9hU3pX4X1VHQ=";
};
makeFlags = [ "PREFIX=$(out)" ];
doCheck = true;
checkTarget = "test";
enableParallelBuilding = true;
meta = with lib; {
homepage = "https://github.com/rmyorston/pdpmake";
description = "Public domain POSIX make";
license = licenses.unlicense;
maintainers = with maintainers; [ eownerdead ];
mainProgram = "pdpmake";
platforms = platforms.all;
badPlatforms = platforms.darwin; # Requires `uimensat`
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
stdenvNoCC,
stdenv, # for tests
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "pdqsort";
version = "0-unstable-2021-03-14";
src = fetchFromGitHub {
owner = "orlp";
repo = "pdqsort";
rev = "b1ef26a55cdb60d236a5cb199c4234c704f46726";
hash = "sha256-xn3Jjn/jxJBckpg1Tx3HHVAWYPVTFMiDFiYgB2WX7Sc=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/include
cp -r *.h $out/include/
runHook postInstall
'';
# The benchmark takes too long to run as a regular checkPhase here.
passthru.tests.bench = stdenv.mkDerivation {
pname = "pdqsort-bench";
inherit (finalAttrs) version src;
doCheck = true;
checkPhase = ''
c++ bench/bench.cpp -o bench/bench
./bench/bench > $out
'';
meta.platforms = lib.platforms.x86_64;
};
meta = {
description = "Novel sorting algorithm that combines the fast average case of randomized quicksort with the fast worst case of heapsort";
homepage = "https://github.com/orlp/pdqsort";
license = lib.licenses.zlib;
maintainers = with lib.maintainers; [ jherland ];
};
})