@@ -152,267 +152,6 @@ chain for " target " development."))
152
152
(home-page (package-home-page pthreads-xgcc))
153
153
(license (package-license pthreads-xgcc)))))
154
154
155
- ; ; While LIEF is packaged in Guix, we maintain our own package,
156
- ; ; to simplify building, and more easily apply updates.
157
- ; ; Moreover, the Guix's package uses cmake, which caused build
158
- ; ; failure; see https://github.com/bitcoin/bitcoin/pull/27296.
159
- (define-public python-lief
160
- (package
161
- (name " python-lief" )
162
- (version " 0.13.2" )
163
- (source (origin
164
- (method git-fetch)
165
- (uri (git-reference
166
- (url " https://github.com/lief-project/LIEF" )
167
- (commit version)))
168
- (file-name (git-file-name name version))
169
- (modules ' ((guix build utils)))
170
- (snippet
171
- ' (begin
172
- ; ; Configure build for Python bindings.
173
- (substitute* " api/python/config-default.toml"
174
- ((" (ninja = )true" all m)
175
- (string-append m " false" ))
176
- ((" (parallel-jobs = )0" all m)
177
- (string-append m (number->string (parallel-job-count)))))))
178
- (sha256
179
- (base32
180
- " 0y48x358ppig5xp97ahcphfipx7cg9chldj2q5zrmn610fmi4zll" ))))
181
- (build-system python-build-system)
182
- (native-inputs (list cmake-minimal python-tomli))
183
- (arguments
184
- (list
185
- #:tests? #f ; needs network
186
- #:phases #~(modify-phases %standard-phases
187
- (add-before 'build 'change-directory
188
- (lambda _
189
- (chdir " api/python" )))
190
- (replace 'build
191
- (lambda _
192
- (invoke " python" " setup.py" " build" ))))))
193
- (home-page " https://github.com/lief-project/LIEF" )
194
- (synopsis " Library to instrument executable formats" )
195
- (description
196
- " @code{python-lief} is a cross platform library which can parse, modify
197
- and abstract ELF, PE and MachO formats." )
198
- (license license:asl2.0)))
199
-
200
- (define osslsigncode
201
- (package
202
- (name " osslsigncode" )
203
- (version " 2.5" )
204
- (source (origin
205
- (method git-fetch)
206
- (uri (git-reference
207
- (url " https://github.com/mtrojnar/osslsigncode" )
208
- (commit version)))
209
- (sha256
210
- (base32
211
- " 1j47vwq4caxfv0xw68kw5yh00qcpbd56d7rq6c483ma3y7s96yyz" ))))
212
- (build-system cmake-build-system)
213
- (inputs (list openssl))
214
- (home-page " https://github.com/mtrojnar/osslsigncode" )
215
- (synopsis " Authenticode signing and timestamping tool" )
216
- (description " osslsigncode is a small tool that implements part of the
217
- functionality of the Microsoft tool signtool.exe - more exactly the Authenticode
218
- signing and timestamping. But osslsigncode is based on OpenSSL and cURL, and
219
- thus should be able to compile on most platforms where these exist." )
220
- (license license:gpl3+))) ; license is with openssl exception
221
-
222
- (define-public python-elfesteem
223
- (let ((commit " 2eb1e5384ff7a220fd1afacd4a0170acff54fe56" ))
224
- (package
225
- (name " python-elfesteem" )
226
- (version (git-version " 0.1" " 1" commit))
227
- (source
228
- (origin
229
- (method git-fetch)
230
- (uri (git-reference
231
- (url " https://github.com/LRGH/elfesteem" )
232
- (commit commit)))
233
- (file-name (git-file-name name commit))
234
- (sha256
235
- (base32
236
- " 07x6p8clh11z8s1n2kdxrqwqm2almgc5qpkcr9ckb6y5ivjdr5r6" ))))
237
- (build-system python-build-system)
238
- ; ; There are no tests, but attempting to run python setup.py test leads to
239
- ; ; PYTHONPATH problems, just disable the test
240
- (arguments ' (#:tests? #f ))
241
- (home-page " https://github.com/LRGH/elfesteem" )
242
- (synopsis " ELF/PE/Mach-O parsing library" )
243
- (description " elfesteem parses ELF, PE and Mach-O files." )
244
- (license license:lgpl2.1))))
245
-
246
- (define-public python-oscrypto
247
- (package
248
- (name " python-oscrypto" )
249
- (version " 1.3.0" )
250
- (source
251
- (origin
252
- (method git-fetch)
253
- (uri (git-reference
254
- (url " https://github.com/wbond/oscrypto" )
255
- (commit version)))
256
- (file-name (git-file-name name version))
257
- (sha256
258
- (base32
259
- " 1v5wkmzcyiqy39db8j2dvkdrv2nlsc48556h73x4dzjwd6kg4q0a" ))
260
- (patches (search-our-patches " oscrypto-hard-code-openssl.patch" ))))
261
- (build-system python-build-system)
262
- (native-search-paths
263
- (list (search-path-specification
264
- (variable " SSL_CERT_FILE" )
265
- (file-type 'regular )
266
- (separator #f ) ; single entry
267
- (files ' (" etc/ssl/certs/ca-certificates.crt" )))))
268
-
269
- (propagated-inputs
270
- (list python-asn1crypto openssl))
271
- (arguments
272
- `(#:phases
273
- (modify-phases %standard-phases
274
- (add-after 'unpack 'hard-code-path-to-libscrypt
275
- (lambda* (#:key inputs #:allow-other-keys)
276
- (let ((openssl (assoc-ref inputs " openssl" )))
277
- (substitute* " oscrypto/__init__.py"
278
- ((" @GUIX_OSCRYPTO_USE_OPENSSL@" )
279
- (string-append openssl " /lib/libcrypto.so" " ," openssl " /lib/libssl.so" )))
280
- #t )))
281
- (add-after 'unpack 'disable-broken-tests
282
- (lambda _
283
- ; ; This test is broken as there is no keyboard interrupt.
284
- (substitute* " tests/test_trust_list.py"
285
- ((" ^(.*)class TrustListTests" line indent)
286
- (string-append indent
287
- " @unittest.skip(\" Disabled by Guix\" )\n "
288
- line)))
289
- (substitute* " tests/test_tls.py"
290
- ((" ^(.*)class TLSTests" line indent)
291
- (string-append indent
292
- " @unittest.skip(\" Disabled by Guix\" )\n "
293
- line)))
294
- #t ))
295
- (replace 'check
296
- (lambda _
297
- (invoke " python" " run.py" " tests" )
298
- #t )))))
299
- (home-page " https://github.com/wbond/oscrypto" )
300
- (synopsis " Compiler-free Python crypto library backed by the OS" )
301
- (description " oscrypto is a compilation-free, always up-to-date encryption library for Python." )
302
- (license license:expat)))
303
-
304
- (define-public python-oscryptotests
305
- (package (inherit python-oscrypto)
306
- (name " python-oscryptotests" )
307
- (propagated-inputs
308
- (list python-oscrypto))
309
- (arguments
310
- `(#:tests? #f
311
- #:phases
312
- (modify-phases %standard-phases
313
- (add-after 'unpack 'hard-code-path-to-libscrypt
314
- (lambda* (#:key inputs #:allow-other-keys)
315
- (chdir " tests" )
316
- #t )))))))
317
-
318
- (define-public python-certvalidator
319
- (let ((commit " a145bf25eb75a9f014b3e7678826132efbba6213" ))
320
- (package
321
- (name " python-certvalidator" )
322
- (version (git-version " 0.1" " 1" commit))
323
- (source
324
- (origin
325
- (method git-fetch)
326
- (uri (git-reference
327
- (url " https://github.com/achow101/certvalidator" )
328
- (commit commit)))
329
- (file-name (git-file-name name commit))
330
- (sha256
331
- (base32
332
- " 1qw2k7xis53179lpqdqyylbcmp76lj7sagp883wmxg5i7chhc96k" ))))
333
- (build-system python-build-system)
334
- (propagated-inputs
335
- (list python-asn1crypto
336
- python-oscrypto
337
- python-oscryptotests)) ; ; certvalidator tests import oscryptotests
338
- (arguments
339
- `(#:phases
340
- (modify-phases %standard-phases
341
- (add-after 'unpack 'disable-broken-tests
342
- (lambda _
343
- (substitute* " tests/test_certificate_validator.py"
344
- ((" ^(.*)class CertificateValidatorTests" line indent)
345
- (string-append indent
346
- " @unittest.skip(\" Disabled by Guix\" )\n "
347
- line)))
348
- (substitute* " tests/test_crl_client.py"
349
- ((" ^(.*)def test_fetch_crl" line indent)
350
- (string-append indent
351
- " @unittest.skip(\" Disabled by Guix\" )\n "
352
- line)))
353
- (substitute* " tests/test_ocsp_client.py"
354
- ((" ^(.*)def test_fetch_ocsp" line indent)
355
- (string-append indent
356
- " @unittest.skip(\" Disabled by Guix\" )\n "
357
- line)))
358
- (substitute* " tests/test_registry.py"
359
- ((" ^(.*)def test_build_paths" line indent)
360
- (string-append indent
361
- " @unittest.skip(\" Disabled by Guix\" )\n "
362
- line)))
363
- (substitute* " tests/test_validate.py"
364
- ((" ^(.*)def test_revocation_mode_hard" line indent)
365
- (string-append indent
366
- " @unittest.skip(\" Disabled by Guix\" )\n "
367
- line)))
368
- (substitute* " tests/test_validate.py"
369
- ((" ^(.*)def test_revocation_mode_soft" line indent)
370
- (string-append indent
371
- " @unittest.skip(\" Disabled by Guix\" )\n "
372
- line)))
373
- #t ))
374
- (replace 'check
375
- (lambda _
376
- (invoke " python" " run.py" " tests" )
377
- #t )))))
378
- (home-page " https://github.com/wbond/certvalidator" )
379
- (synopsis " Python library for validating X.509 certificates and paths" )
380
- (description " certvalidator is a Python library for validating X.509
381
- certificates or paths. Supports various options, including: validation at a
382
- specific moment in time, whitelisting and revocation checks." )
383
- (license license:expat))))
384
-
385
- (define-public python-signapple
386
- (let ((commit " 85bfcecc33d2773bc09bc318cec0614af2c8e287" ))
387
- (package
388
- (name " python-signapple" )
389
- (version (git-version " 0.2.0" " 1" commit))
390
- (source
391
- (origin
392
- (method git-fetch)
393
- (uri (git-reference
394
- (url " https://github.com/achow101/signapple" )
395
- (commit commit)))
396
- (file-name (git-file-name name commit))
397
- (sha256
398
- (base32
399
- " 17yqjll8nw83q6dhgqhkl7w502z5vy9sln8m6mlx0f1c10isg8yg" ))))
400
- (build-system pyproject-build-system)
401
- (propagated-inputs
402
- (list python-asn1crypto
403
- python-oscrypto
404
- python-certvalidator
405
- python-elfesteem))
406
- (native-inputs (list python-poetry-core))
407
- ; ; There are no tests, but attempting to run python setup.py test leads to
408
- ; ; problems, just disable the test
409
- (arguments ' (#:tests? #f ))
410
- (home-page " https://github.com/achow101/signapple" )
411
- (synopsis " Mach-O binary signature tool" )
412
- (description " signapple is a Python tool for creating, verifying, and
413
- inspecting signatures in Mach-O binaries." )
414
- (license license:expat))))
415
-
416
155
(define-public mingw-w64-base-gcc
417
156
(package
418
157
(inherit base-gcc)
@@ -552,16 +291,13 @@ inspecting signatures in Mach-O binaries.")
552
291
; ; Scripting
553
292
python-minimal ; ; (3.10)
554
293
; ; Git
555
- git-minimal
556
- ; ; Tests
557
- python-lief)
294
+ git-minimal)
558
295
(let ((target (getenv " HOST" )))
559
296
(cond ((string-suffix? " -mingw32" target)
560
297
(list zip
561
298
(make-mingw-pthreads-cross-toolchain " x86_64-w64-mingw32" )
562
299
nsis-x86_64
563
- nss-certs
564
- osslsigncode))
300
+ nss-certs))
565
301
((string-contains target " -linux-" )
566
302
(list bison
567
303
pkg-config
@@ -571,6 +307,5 @@ inspecting signatures in Mach-O binaries.")
571
307
(list clang-toolchain-18
572
308
lld-18
573
309
(make-lld-wrapper lld-18 #:lld-as-ld? #t )
574
- python-signapple
575
310
zip))
576
311
(else '() )))))
0 commit comments