;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge ;;; Copyright © 2014, 2015, 2016 David Thompson ;;; Copyright © 2014, 2015, 2016, 2018, 2020 Mark H Weaver ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer ;;; Copyright © 2015-2024 Efraim Flashner ;;; Copyright © 2015, 2016 Andy Patterson ;;; Copyright © 2015, 2018, 2019, 2020, 2021, 2023 Ricardo Wurmus ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Alex Vong ;;; Copyright © 2016, 2017 Alex Griffin ;;; Copyright © 2016 Kei Kebreau ;;; Copyright © 2016 Dmitry Nikolaev ;;; Copyright © 2016, 2017 Nikita ;;; Copyright © 2016, 2018, 2019, 2020, 2021 Eric Bavier ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2017 Feng Shu ;;;
aboutsummaryrefslogtreecommitdiff
blob: ab2174a27316ca86fcb92e9bdf3ea34b05a63fc5 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016, 2017 Theodoros Foradis <theodoros@foradis.org>
;;; Copyright © 2016 David Craven <david@craven.ch>
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages embedded)
  #:use-module (guix utils)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix svn-download)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix build-system cmake)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system trivial)
  #:use-module (guix build utils)
  #:use-module (gnu packages)
  #:use-module (gnu packages autotools)
  #:use-module ((gnu packages base) #:prefix base:)
  #:use-module (gnu packages bison)
  #:use-module (gnu packages cross-base)
  #:use-module (gnu packages dejagnu)
  #:use-module (gnu packages flex)
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages gdb)
  #:use-module (gnu packages guile)
  #:use-module (gnu packages libftdi)
  #:use-module (gnu packages libusb)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages python)
  #:use-module (gnu packages swig)
  #:use-module (gnu packages texinfo)
  #:use-module (gnu packages xorg)
  #:use-module (srfi srfi-1))

;; We must not use the released GCC sources here, because the cross-compiler
;; does not produce working binaries.  Instead we take the very same SVN
;; revision from the branch that is used for a release of the "GCC ARM
;; embedded" project on launchpad.
;; See https://launchpadlibrarian.net/218827644/release.txt
(define-public gcc-arm-none-eabi-4.9
  (let ((xgcc (cross-gcc "arm-none-eabi"
                         #:xgcc gcc-4.9
                         #:xbinutils (cross-binutils "arm-none-eabi")))
        (revision "1")
        (svn-revision 227977))
    (package (inherit xgcc)
      (version (string-append (package-version xgcc) "-"
                              revision "." (number->string svn-revision)))
      (source
       (origin
         (method svn-fetch)
         (uri (svn-reference
               (url "svn://gcc.gnu.org/svn/gcc/branches/ARM/embedded-4_9-branch/")
               (revision svn-revision)))
         (file-name (string-append "gcc-arm-embedded-" version "-checkout"))
         (sha256
          (base32
           "113r98kygy8rrjfv2pd3z6zlfzbj543pq7xyq8bgh72c608mmsbr"))

         ;; Remove the one patch that doesn't apply to this 4.9 snapshot (the
         ;; patch is for 4.9.4 and later but this svn snapshot is older).
         (patches (remove (lambda (patch)
                            (string=? (basename patch)
                                      "gcc-arm-bug-71399.patch"))
                          (origin-patches (package-source xgcc))))))
      (native-inputs
       `(("flex" ,flex)
         ,@(package-native-inputs xgcc)))
      (arguments
       (substitute-keyword-arguments (package-arguments xgcc)
         ((#:phases phases)
          `(modify-phases ,phases
             (add-after 'unpack 'fix-genmultilib
               (lambda _
                 (substitute* "gcc/genmultilib"
                   (("#!/bin/sh") (string-append "#!" (which "sh"))))
                 #t))))
         ((#:configure-flags flags)
          ;; The configure flags are largely identical to the flags used by the
          ;; "GCC ARM embedded" project.
          `(append (list "--enable-multilib"
                         "--with-newlib"
                         "--with-multilib-list=armv6-m,armv7-m,armv7e-m"
                         "--with-host-libstdcxx=-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm"
                         "--enable-plugins"
                         "--disable-decimal-float"
                         "--disable-libffi"
                         "--disable-libgomp"
                         "--disable-libmudflap"
                         "--disable-libquadmath"
                         "--disable-libssp"
                         "--disable-libstdcxx-pch"
                         "--disable-nls"
                         "--disable-shared"
                         "--disable-threads"
                         "--disable-tls")
                   (delete "--disable-multilib" ,flags)))))
      (native-search-paths
       (list (search-path-specification
              (variable "CROSS_C_INCLUDE_PATH")
              (files '("arm-none-eabi/include")))
             (search-path-specification
              (variable "CROSS_CPLUS_INCLUDE_PATH")
              (files '("arm-none-eabi/include")))
             (search-path-specification
              (variable "CROSS_LIBRARY_PATH")
              (files '("arm-none-eabi/lib"))))))))

(define-public gcc-arm-none-eabi-6
  (package
    (inherit gcc-arm-none-eabi-4.9)
    (version (package-version gcc-6))
    (source (origin (inherit (package-source gcc-6))
                    (patches
                     (append
                      (origin-patches (package-source gcc-6))
                      (search-patches "gcc-6-cross-environment-variables.patch"
                                      "gcc-6-arm-none-eabi-multilib.patch")))))))

(define-public newlib-arm-none-eabi
  (package
    (name "newlib")
    (version "2.4.0")
    (source (origin
              (method url-fetch)
              (uri (string-append "ftp://sourceware.org/pub/newlib/newlib-"
                                  version ".tar.gz"))
              (sha256
               (base32
                "01i7qllwicf05vsvh39qj7qp5fdifpvvky0x95hjq39mbqiksnsl"))))
    (build-system gnu-build-system)
    (arguments
     `(#:out-of-source? #t
       ;; The configure flags are identical to the flags used by the "GCC ARM
       ;; embedded" project.
       #:configure-flags '("--target=arm-none-eabi"
                           "--enable-newlib-io-long-long"
                           "--enable-newlib-register-fini"
                           "--disable-newlib-supplied-syscalls"
                           "--disable-nls")
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'fix-references-to-/bin/sh
           (lambda _
             (substitute* '("libgloss/arm/cpu-init/Makefile.in"
                            "libgloss/arm/Makefile.in"
                            "libgloss/libnosys/Makefile.in"
                            "libgloss/Makefile.in")
               (("/bin/sh") (which "sh")))
             #t)))))
    (native-inputs
     `(("xbinutils" ,(cross-binutils "arm-none-eabi"))
       ("xgcc" ,gcc-arm-none-eabi-4.9)
       ("texinfo" ,texinfo)))
    (home-page "http://www.sourceware.org/newlib/")
    (synopsis "C library for use on embedded systems")
    (description "Newlib is a C library intended for use on embedded
systems.  It is a conglomeration of several library parts that are easily
usable on embedded products.")
    (license (license:non-copyleft
              "https://www.sourceware.org/newlib/COPYING.NEWLIB"))))

(define-public newlib-nano-arm-none-eabi
  (package (inherit newlib-arm-none-eabi)
    (name "newlib-nano")
    (arguments
     (substitute-keyword-arguments (package-arguments newlib-arm-none-eabi)
       ;; The configure flags are identical to the flags used by the "GCC ARM
       ;; embedded" project.  They optimize newlib for use on small embedded
       ;; systems with limited memory.
       ((#:configure-flags flags)
        ''("--target=arm-none-eabi"
           "--enable-multilib"
           "--disable-newlib-supplied-syscalls"
           "--enable-newlib-reent-small"
           "--disable-newlib-fvwrite-in-streamio"
           "--disable-newlib-fseek-optimization"
           "--disable-newlib-wide-orient"
           "--enable-newlib-nano-malloc"
           "--disable-newlib-unbuf-stream-opt"
           "--enable-lite-exit"
           "--enable-newlib-global-atexit"
           "--enable-newlib-nano-formatted-io"
           "--disable-nls"))))
    (synopsis "Newlib variant for small systems with limited memory")))

(define (make-libstdc++-arm-none-eabi xgcc newlib)
  (let ((libstdc++ (make-libstdc++ xgcc)))
    (package (inherit libstdc++)
      (name "libstdc++-arm-none-eabi")
      (arguments
       (substitute-keyword-arguments (package-arguments libstdc++)
         ((#:configure-flags flags)
          ``("--target=arm-none-eabi"
             "--host=arm-none-eabi"
             "--disable-libstdcxx-pch"
             "--enable-multilib"
             "--with-multilib-list=armv6-m,armv7-m,armv7e-m"
             "--disable-shared"
             "--disable-tls"
             "--disable-plugin"
             "--with-newlib"
             ,(string-append "--with-gxx-include-dir="
                             (assoc-ref %outputs "out")
                             "/arm-none-eabi/include")))))
      (native-inputs
       `(("newlib" ,newlib)
         ("xgcc" ,xgcc)
         ,@(package-native-inputs libstdc++))))))

(define (arm-none-eabi-toolchain xgcc newlib)
  "Produce a cross-compiler toolchain package with the compiler XGCC and the C
library variant NEWLIB."
  (let ((newlib-with-xgcc (package (inherit newlib)
                            (native-inputs
                             (alist-replace "xgcc" (list xgcc)
                                            (package-native-inputs newlib))))))
    (package
      (name (string-append "arm-none-eabi"
                           (if (string=? (package-name newlib-with-xgcc)
                                         "newlib-nano")
                               "-nano" "")
                           "-toolchain"))
      (version (package-version xgcc))
      (source #f)
      (build-system trivial-build-system)
      (arguments
       '(#:modules ((guix build union))
         #:builder
         (begin
           (use-modules (ice-9 match)
                        (guix build union))
           (match %build-inputs
             (((names . directories) ...)
              (union-build (assoc-ref %outputs "out")
                           directories)
              #t)))))
      (propagated-inputs
       `(("binutils" ,(cross-binutils "arm-none-eabi"))
         ("libstdc++" ,(make-libstdc++-arm-none-eabi xgcc newlib-with-xgcc))
         ("gcc" ,xgcc)
         ("newlib" ,newlib-with-xgcc)))
      (synopsis "Complete GCC tool chain for ARM bare metal development")
      (description "This package provides a complete GCC tool chain for ARM
bare metal development.  This includes the GCC arm-none-eabi cross compiler
and newlib (or newlib-nano) as the C library.  The supported programming
languages are C and C++.")
      (home-page (package-home-page xgcc))
      (license (package-license xgcc)))))

(define-public arm-none-eabi-toolchain-4.9
  (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9
                           newlib-arm-none-eabi))

(define-public arm-none-eabi-nano-toolchain-4.9
  (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9
                           newlib-nano-arm-none-eabi))

(define-public arm-none-eabi-toolchain-6
  (arm-none-eabi-toolchain gcc-arm-none-eabi-6
                           newlib-arm-none-eabi))

(define-public arm-none-eabi-nano-toolchain-6
  (arm-none-eabi-toolchain gcc-arm-none-eabi-6
                           newlib-nano-arm-none-eabi))

(define-public gdb-arm-none-eabi
  (package
    (inherit gdb)
    (name "gdb-arm-none-eabi")
    (arguments
     `(#:configure-flags '("--target=arm-none-eabi"
                           "--enable-multilib"
                           "--enable-interwork"
                           "--enable-languages=c,c++"
                           "--disable-nls")
     ,@(package-arguments gdb)))))

(define-public libjaylink
  ;; No release tarballs available.
  (let ((commit "699b7001d34a79c8e7064503dde1bede786fd7f0")
        (revision "2"))
    (package
      (name "libjaylink")
      (version (string-append "0.1.0-" revision "."
                              (string-take commit 7)))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://git.zapb.de/libjaylink.git")
                      (commit commit)))
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
                  "034872d44myycnzn67v5b8ixrgmg8sk32aqalvm5x7108w2byww1"))))
      (build-system gnu-build-system)
      (native-inputs
       `(("autoconf" ,autoconf)
         ("automake" ,automake)
         ("libtool" ,libtool)
         ("pkg-config" ,pkg-config)))
      (inputs
       `(("libusb" ,libusb)))
      (home-page "http://repo.or.cz/w/libjaylink.git")
      (synopsis "Library to interface Segger J-Link devices")
      (description "libjaylink is a shared library written in C to access
SEGGER J-Link and compatible devices.")
      (license license:gpl2+))))

(define-public jimtcl
  (package
    (name "jimtcl")
    (version "0.77")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "https://github.com/msteveb/jimtcl"
                    "/archive/" version ".tar.gz"))
              (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
                "1cmk3qscqckg70chjyimzxa2qcka4qac0j4wq908kiijp45cax08"))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         ;; Doesn't use autoconf.
         (replace 'configure
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out")))
               (invoke "./configure"
                       (string-append "--prefix=" out))))))))
    (home-page "http://jim.tcl.tk")
    (synopsis "Small footprint Tcl implementation")
    (description "Jim is a small footprint implementation of the Tcl programming
language.")
    (license license:bsd-2)))

(define-public openocd
  (package
    (name "openocd")
    (version "0.10.0")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://sourceforge/openocd/openocd/"
                                  version "/openocd-" version ".tar.gz"))
              (sha256
               (base32
                "09p57y3c2spqx4vjjlz1ljm1lcd0j9q8g76ywxqgn3yc34wv18zd"))
              ;; FIXME: Remove after nrf52 patch is merged.
              (patches
               (search-patches "openocd-nrf52.patch"))))
    (build-system gnu-build-system)
    (native-inputs
     `(("autoconf" ,autoconf)
       ("automake" ,automake)
       ("libtool" ,libtool)
       ("pkg-config" ,pkg-config)))
    (inputs
     `(("hidapi" ,hidapi)
       ("jimtcl" ,jimtcl)
       ("libftdi" ,libftdi)
       ("libjaylink" ,libjaylink)
       ("libusb-compat" ,libusb-compat)))
    (arguments
     '(#:configure-flags
       (append (list "--disable-werror"
                     "--enable-sysfsgpio"
                     "--disable-internal-jimtcl"
                     "--disable-internal-libjaylink")
               (map (lambda (programmer)
                      (string-append "--enable-" programmer))
                    '("amtjtagaccel" "armjtagew" "buspirate" "ftdi"
                      "gw16012" "jlink" "opendous" "osbdm"
                      "parport" "aice" "cmsis-dap" "dummy" "jtag_vpi"
                      "remote-bitbang" "rlink" "stlink" "ti-icdi" "ulink"
                      "usbprog" "vsllink" "usb-blaster-2" "usb_blaster"
                      "presto" "openjtag")))
       #:phases
       (modify-phases %standard-phases
         ;; Required because of patched sources.
         (add-before 'configure 'autoreconf
           (lambda _ (invoke "autoreconf" "-vfi") #t))
         (add-after 'autoreconf 'change-udev-group
           (lambda _
             (substitute* "contrib/60-openocd.rules"
               (("plugdev") "dialout"))
             #t))
         (add-after 'install 'install-udev-rules
           (lambda* (#:key outputs #:allow-other-keys)
             (install-file "contrib/60-openocd.rules"
                           (string-append
                            (assoc-ref outputs "out")
                            "/lib/udev/rules.d/"))
             #t)))))
    (home-page "http://openocd.org")
    (synopsis "On-Chip Debugger")
    (description "OpenOCD provides on-chip programming and debugging support
with a layered architecture of JTAG interface and TAP support.")
    (license license:gpl2+)))

;; The commits for all propeller tools are the stable versions published at
;; https://github.com/propellerinc/propgcc in the release_1_0.  According to
;; personal correspondence with the developers in July 2017, more recent
;; versions are currently incompatible with the "Simple Libraries".

(define propeller-binutils
  (let ((xbinutils (cross-binutils "propeller-elf"))
        (commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3")
        (revision "2"))
    (package
      (inherit xbinutils)
      (name "propeller-binutils")
      (version (string-append "0.0.0-" revision "." (string-take commit 9)))
      (source (origin (inherit (package-source xbinutils))
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/parallaxinc/propgcc.git")
                      (commit commit)))
                (file-name (string-append name "-" commit "-checkout"))
                (sha256
                 (base32
                  "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck"))
                (patch-flags (list "-p1" "--directory=binutils"))))
      (arguments
       `(;; FIXME: For some reason there are many test failures.  It's not
         ;; obvious how to fix the failures.
         #:tests? #f
         #:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'chdir
             (lambda _ (chdir "binutils") #t)))
         ,@(substitute-keyword-arguments (package-arguments xbinutils)
            ((#:configure-flags flags)
             `(cons "--disable-werror" ,flags)))))
      (native-inputs
       `(("bison" ,bison)
         ("flex" ,flex)
         ("texinfo" ,texinfo)
         ("dejagnu" ,dejagnu)
         ,@(package-native-inputs xbinutils))))))

(define-public propeller-gcc-6
  (let ((xgcc (cross-gcc "propeller-elf"
                         #:xbinutils propeller-binutils))
        (commit "b4f45a4725e0b6d0af59e594c4e3e35ca4105867")
        (revision "1"))
    (package (inherit xgcc)
      (name "propeller-gcc")
      (version (string-append "6.0.0-" revision "." (string-take commit 9)))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/totalspectrum/gcc-propeller.git")
                      (commit commit)))
                (file-name (string-append name "-" commit "-checkout"))
                (sha256
                 (base32
                  "0d9kdxm2fzanjqa7q5850kzbsfl0fqyaahxn74h6nkxxacwa11zb"))
                (patches
                 (append
                  (origin-patches (package-source gcc-6))
                  (search-patches "gcc-cross-environment-variables.patch")))))
      (native-inputs
       `(("flex" ,flex)
         ,@(package-native-inputs xgcc)))
      ;; All headers and cross libraries of the propeller toolchain are
      ;; installed under the "propeller-elf" prefix.
      (native-search-paths
       (list (search-path-specification
              (variable "CROSS_C_INCLUDE_PATH")
              (files '("propeller-elf/include")))
             (search-path-specification
              (variable "CROSS_LIBRARY_PATH")
              (files '("propeller-elf/lib")))))
      (home-page "https://github.com/totalspectrum/gcc-propeller")
      (synopsis "GCC for the Parallax Propeller"))))

(define-public propeller-gcc-4
  (let ((xgcc propeller-gcc-6)
        (commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3")
        (revision "2"))
    (package (inherit xgcc)
      (name "propeller-gcc")
      (version (string-append "4.6.1-" revision "." (string-take commit 9)))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/parallaxinc/propgcc.git")
                      (commit commit)))
                (file-name (string-append name "-" commit "-checkout"))
                (sha256
                 (base32
                  "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck"))
                (patch-flags (list "-p1" "--directory=gcc"))
                (patches
                 (append
                  (origin-patches (package-source gcc-4.7))
                  (search-patches "gcc-4.6-gnu-inline.patch"
                                  "gcc-cross-environment-variables.patch")))))
      (arguments
       (substitute-keyword-arguments (package-arguments propeller-gcc-6)
         ((#:phases phases)
          `(modify-phases ,phases
             (add-after 'unpack 'chdir
               (lambda _ (chdir "gcc") #t))))))
      (native-inputs
       `(("gcc-4" ,gcc-4.9)
         ,@(package-native-inputs propeller-gcc-6)))
      (home-page "https://github.com/parallaxinc/propgcc")
      (supported-systems (delete "aarch64-linux" %supported-systems)))))

;; Version 6 is experimental and may not work correctly.  This is why we
;; default to version 4, which is also used in the binary toolchain bundle
;; provided by Parallax Inc.
(define-public propeller-gcc propeller-gcc-4)


;; FIXME: We do not build the tiny library because that would require C++
;; headers, which are not available.  This may require adding a propeller-elf
;; variant of the libstdc++ package.
(define-public proplib
  (let ((commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3")
        (revision "2"))
    (package
      (name "proplib")
      (version (string-append "0.0.0-" revision "." (string-take commit 9)))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/parallaxinc/propgcc.git")
                      (commit commit)))
                (file-name (string-append name "-" commit "-checkout"))
                (sha256
                 (base32
                  "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck"))))
      (build-system gnu-build-system)
      (arguments
       `(#:tests? #f ; no tests
         #:make-flags
         (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
               (string-append "BUILD="  (getcwd) "/build"))
         #:phases
         (modify-phases %standard-phases
           (delete 'configure)
           (add-after 'unpack 'chdir
             (lambda _ (chdir "lib") #t))
           (add-after 'chdir 'fix-Makefile
             (lambda _
               (substitute* "Makefile"
                 ;; Control the installation time of the headers.
                 ((" install-includes") ""))
               #t))
           ;; The Makefile does not separate building from installation, so we
           ;; have to create the target directories at build time.
           (add-before 'build 'create-target-directories
             (lambda* (#:key make-flags #:allow-other-keys)
               (apply invoke "make" "install-dirs" make-flags)))
           (add-before 'build 'set-cross-environment-variables
             (lambda* (#:key outputs #:allow-other-keys)
               (setenv "CROSS_LIBRARY_PATH"
                       (string-append (assoc-ref outputs "out")
                                      "/propeller-elf/lib:"
                                      (or (getenv "CROSS_LIBRARY_PATH") "")))
               (setenv "CROSS_C_INCLUDE_PATH"
                       (string-append (assoc-ref outputs "out")
                                      "/propeller-elf/include:"
                                      (or (getenv "CROSS_C_INCLUDE_PATH") "")))
               #t))
           (add-before 'install 'install-includes
             (lambda* (#:key make-flags #:allow-other-keys)
               (apply invoke "make" "install-includes" make-flags))))))
      (native-inputs
       `(("propeller-gcc" ,propeller-gcc)
         ("propeller-binutils" ,propeller-binutils)
         ("perl" ,perl)))
      (home-page "https://github.com/parallaxinc/propgcc")
      (synopsis "C library for the Parallax Propeller")
      (description "This is a C library for the Parallax Propeller
micro-controller.")
      ;; Most of the code is released under the Expat license.  Some of the
      ;; included code is public domain and some changes are BSD licensed.
      (license license:expat))))

(define-public propeller-toolchain
  (package
    (name "propeller-toolchain")
    (version (package-version propeller-gcc))
    (source #f)
    (build-system trivial-build-system)
    (arguments '(#:builder (begin (mkdir %output) #t)))
    (propagated-inputs
     `(("binutils" ,propeller-binutils)
       ("libc" ,proplib)
       ("gcc" ,propeller-gcc)))
    (synopsis "Complete GCC tool chain for Propeller micro-controllers")
    (description "This package provides a complete GCC tool chain for
Propeller micro-controller development.")
    (home-page (package-home-page propeller-gcc))
    (license (package-license propeller-gcc))))

(define-public openspin
  (package
    (name "openspin")
    (version "1.00.78")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/parallaxinc/"
                                  "OpenSpin/archive/" version ".tar.gz"))
              (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
                "1k2dbz1v604g4r2d9qhckg2m8dnhiya760mbsqfsg4waxal87yb7"))))
    (build-system gnu-build-system)
    (arguments
     `(#:tests? #f ; no tests
       #:phases
       (modify-phases %standard-phases
         (delete 'configure)
         (add-after 'unpack 'remove-timestamp
           (lambda _
             (substitute* "SpinSource/openspin.cpp"
               ((" Compiled on.*$") "\\n\");"))
             #t))
         ;; Makefile does not include "install" target
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((bin (string-append (assoc-ref outputs "out")
                                       "/bin")))
               (mkdir-p bin)
               (install-file "build/openspin" bin)
               #t))))))
    (home-page "https://github.com/parallaxinc/OpenSpin")
    (synopsis "Spin/PASM compiler for the Parallax Propeller")
    (description "OpenSpin is a compiler for the Spin/PASM language of the
Parallax Propeller.  It was ported from Chip Gracey's original x86 assembler
code.")
    (license license:expat)))

(define-public propeller-load
  (let ((commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3")
        (revision "2"))
    (package
      (name "propeller-load")
      (version "3.4.0")
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/parallaxinc/propgcc.git")
                      (commit commit)))
                (file-name (string-append name "-" commit "-checkout"))
                (sha256
                 (base32
                  "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck"))))
      (build-system gnu-build-system)
      (arguments
       `(#:tests? #f ; no tests
         #:make-flags
         (list "OS=linux"
               (string-append "TARGET=" (assoc-ref %outputs "out")))
         #:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'chdir
             (lambda _ (chdir "loader") #t))
           (delete 'configure))))
      (native-inputs
       `(("openspin" ,openspin)
         ("propeller-toolchain" ,propeller-toolchain)))
      (home-page "https://github.com/parallaxinc/propgcc")
      (synopsis "Loader for Parallax Propeller micro-controllers")
      (description "This package provides the tool @code{propeller-load} to
upload binaries to a Parallax Propeller micro-controller.")
      (license license:expat))))

(define-public spin2cpp
  (package
    (name "spin2cpp")
    (version "3.6.4")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/totalspectrum/spin2cpp/"
                                  "archive/v" version ".tar.gz"))
              (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
                "05qak187sn0xg7vhrxw27b19xhmid1b8ab8kax3gv0faavzablfw"))))
    (build-system gnu-build-system)
    (arguments
     `(#:tests? #f ;; The tests assume that a micro-controller is connected.
       #:phases
       (modify-phases %standard-phases
         (delete 'configure)
         (add-before 'build 'set-cross-environment-variables
           (lambda* (#:key inputs #:allow-other-keys)
             (setenv "CROSS_LIBRARY_PATH"
                     (string-append (assoc-ref inputs "propeller-toolchain")
                                    "/propeller-elf/lib"))
             (setenv "CROSS_C_INCLUDE_PATH"
                     (string-append (assoc-ref inputs "propeller-toolchain")
                                    "/propeller-elf/include"))
             #t))
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((bin (string-append (assoc-ref outputs "out")
                                       "/bin")))
               (for-each (lambda (file)
                           (install-file (string-append "build/" file)
                                         bin))
                         '("testlex" "spin2cpp" "fastspin")))
             #t)))))
    (native-inputs
     `(("bison" ,bison)
       ("propeller-load" ,propeller-load)
       ("propeller-toolchain" ,propeller-toolchain)))
    (home-page "https://github.com/totalspectrum/spin2cpp")
    (synopsis "Convert Spin code to C, C++, or PASM code")
    (description "This is a set of tools for converting the Spin language for
the Parallax Propeller micro-controller into C or C++ code, into PASM, or even
directly into an executable binary.  The binaries produced use LMM PASM, so
they are much faster than regular Spin bytecodes (but also quite a bit
larger).")
    (license license:expat)))

(define-public spinsim
  (let ((commit "66915a7ad1a3a2cf990a725bb341fab8d11eb620")
        (revision "1"))
    (package
      (name "spinsim")
      (version (string-append "0.75-" revision "." (string-take commit 9)))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/parallaxinc/spinsim.git")
                      (commit commit)))
                (file-name (string-append name "-" commit "-checkout"))
                (sha256
                 (base32
                  "1n9kdhlxsdx7bz6c80w8dhi96zp633gd6qs0x9i4ii8qv4i7sj5k"))))
      (build-system gnu-build-system)
      (arguments
       `(#:tests? #f ; no tests
         #:phases
         (modify-phases %standard-phases
           (delete 'configure)
           (replace 'install
             (lambda* (#:key outputs #:allow-other-keys)
               (let ((bin (string-append (assoc-ref outputs "out")
                                         "/bin")))
                 (install-file "build/spinsim" bin))
               #t)))))
      (home-page "https://github.com/parallaxinc/spinsim")
      (synopsis "Spin simulator")
      (description "This package provides the tool @code{spinsim}, a simulator
and simple debugger for Spin programs written for a Parallax Propeller
micro-controller.  Spinsim supports execution from cog memory and hub
execution, but it does not support multi-tasking.  It supports about
two-thirds of the opcodes in the P2 instruction set.")
      (license license:expat))))

(define-public propeller-development-suite
  (package
    (name "propeller-development-suite")
    (version (package-version propeller-gcc))
    (source #f)
    (build-system trivial-build-system)
    (arguments '(#:builder (begin (mkdir %output) #t)))
    (propagated-inputs
     `(("toolchain" ,propeller-toolchain)
       ("openspin" ,openspin)
       ("propeller-load" ,propeller-load)
       ("spin2cpp" ,spin2cpp)
       ("spinsim" ,spinsim)))
    (synopsis "Complete development suite for Propeller micro-controllers")
    (description "This meta-package provides a complete environment for the
development with Parallax Propeller micro-controllers.  It includes the GCC
toolchain, the loader, the Openspin compiler, the Spin2cpp tool, and the Spin
simulator.")
    (home-page (package-home-page propeller-gcc))
    (license (package-license propeller-gcc))))

(define-public binutils-vc4
  (let ((commit "708acc851880dbeda1dd18aca4fd0a95b2573b36"))
    (package
      (name "binutils-vc4")
      (version (string-append "2.23.51-0." (string-take commit 7)))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                       (url "https://github.com/puppeh/binutils-vc4.git")
                       (commit commit)))
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
                  "1kdrz6fki55lm15rwwamn74fnqpy0zlafsida2zymk76n3656c63"))))
      (build-system gnu-build-system)
      (arguments
       `(#:configure-flags '("--target=vc4-elf"
                             "--disable-werror"
                             "--enable-cgen-maint")
         #:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'unpack-cgen
             (lambda* (#:key inputs #:allow-other-keys)
               (copy-recursively (string-append (assoc-ref inputs "cgen")
                                                "/cgen") "cgen")
               #t))
           (add-after 'unpack-cgen 'fix-cgen-guile
             (lambda _
               (substitute* "opcodes/Makefile.in"
                 (("guile\\{,-\\}1.8") "guile"))
               (invoke "which" "guile"))))))
      (native-inputs
       `(("cgen"
          ,(origin
                (method git-fetch)
                (uri (git-reference
                       (url "https://github.com/puppeh/cgen.git")
                       (commit "d8e2a9eb70425f180fdd5bfd032884b0855f2032")))
                (sha256
                 (base32
                  "14b3h2ji740s8zq5vwm4qdcxs4aa4wxi6wb9di3bv1h39x14nyr9"))))
         ("texinfo" ,texinfo)
         ("flex" ,flex)
         ("bison" ,bison)
         ("guile-1.8" ,guile-1.8)
         ("which" ,base:which)))
      (synopsis "Binutils for VC4")
      (description "This package provides @code{binutils} for VideoCore IV,
the Raspberry Pi chip.")
      (license license:gpl3+)
      (home-page "https://github.com/puppeh/vc4-toolchain/"))))

(define-public gcc-vc4
  (let ((commit "165f6d0e11d2e76ee799533bb45bd5c92bf60dc2")
        (xgcc (cross-gcc "vc4-elf" #:xbinutils binutils-vc4)))
    (package (inherit xgcc)
      (name "gcc-vc4")
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/puppeh/gcc-vc4.git")
                      (commit commit)))
                (file-name (string-append name
                                          "-"
                                          (package-version xgcc)
                                          "-checkout"))
                (sha256
                 (base32
                  "13h30qjcwnlz6lfma1d82nnvfmjnhh7abkagip4vly6vm5fpnvf2"))))
      (native-inputs
        `(("flex" ,flex)
          ,@(package-native-inputs xgcc)))
      (synopsis "GCC for VC4")
      (description "This package provides @code{gcc} for VideoCore IV,
the Raspberry Pi chip."))))

(define-public python-libmpsse
  (package
    (name "python-libmpsse")
    (version "1.4")
    (source
      (origin
        (method git-fetch)
        (uri (git-reference
              (url "https://github.com/daym/libmpsse.git")
              (commit (string-append "v" version))))
        (file-name "libmpsse-checkout")
        (sha256
          (base32
            "14f1kiiia4kfd9mzwx4h63aa8bpz9aknbrrr7mychnsp3arw0z25"))))
    (build-system gnu-build-system)
    (inputs
     `(("libftdi" ,libftdi)
       ("python" ,python)))
    (native-inputs
     `(("pkg-config" ,pkg-config)
       ("swig" ,swig)
       ("which" ,base:which)))
    (arguments
     `(#:tests? #f ; No tests exist.
       #:parallel-build? #f  ; Would be buggy.
       #:make-flags
       (list (string-append "CFLAGS=-Wall -fPIC -fno-strict-aliasing -g -O2 "
                            "$(shell pkg-config --cflags libftdi1)"))
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'set-environment-up
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let ((python (assoc-ref inputs "python")))
               (chdir "src")
               (setenv "PYDEV" (string-append python
                               "/include/python"
                               ,(version-major+minor (package-version python))
                               "m"))
               #t)))
         (replace 'install
           (lambda* (#:key inputs outputs make-flags #:allow-other-keys #:rest args)
             (let* ((out (assoc-ref outputs "out"))
                    (out-python (string-append out
                                               "/lib/python"
                                               ,(version-major+minor (package-version python))
                                               "/site-packages"))
                    (install (assoc-ref %standard-phases 'install)))
               (install #:make-flags (cons (string-append "PYLIB=" out-python)
                                           make-flags))))))))
    (home-page "https://code.google.com/archive/p/libmpsse/")
    (synopsis "Python library for MPSSE SPI I2C JTAG adapter by FTDI")
    (description "This package provides a library in order to support the
MPSSE (Multi-Protocol Synchronous Serial Engine) adapter by FTDI that can do
SPI, I2C, JTAG.")
    (license license:gpl2+)))

(define-public python2-libmpsse
  (package
    (inherit python-libmpsse)
    (name "python2-libmpsse")
    (arguments
     (substitute-keyword-arguments (package-arguments python-libmpsse)
      ((#:phases phases)
       `(modify-phases ,phases
         (replace 'set-environment-up
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let ((python (assoc-ref inputs "python")))
               (chdir "src")
               (setenv "PYDEV" (string-append python
                               "/include/python"
                               ,(version-major+minor (package-version python-2))))
               #t)))
         (replace 'install
           (lambda* (#:key inputs outputs make-flags #:allow-other-keys #:rest args)
             (let* ((out (assoc-ref outputs "out"))
                    (out-python (string-append out
                                               "/lib/python"
                                               ,(version-major+minor (package-version python-2))
                                               "/site-packages"))
                    (install (assoc-ref %standard-phases 'install)))
               (install #:make-flags (cons (string-append "PYLIB=" out-python)
                                           make-flags)))))))))
    (inputs
     (alist-replace "python" (list python-2)
                    (package-inputs python-libmpsse)))))

(define-public picprog
  (package
    (name "picprog")
    (version "1.9.1")
    (source (origin
              (method url-fetch)
              (uri (string-append "http://www.iki.fi/hyvatti/pic/picprog-"
                                  version ".tar.gz"))
              (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
                "1r04hg1n3v2jf915qr05la3q9cxy7a5jnh9cc98j04lh6c9p4x85"))
              (patches (search-patches "picprog-non-intel-support.patch"))))
    (build-system gnu-build-system)
    (arguments
     `(#:tests? #f                      ; No tests exist.
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch-paths
           (lambda* (#:key outputs #:allow-other-keys)
             (substitute* "Makefile"
               (("/usr/local") (assoc-ref outputs "out"))
               ((" -o 0 -g 0 ") " ")
               (("testport") ""))
             #t))
         (add-before 'install 'mkdir
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out")))
               (mkdir-p (string-append out "/bin"))
               (mkdir-p (string-append out "/man/man1"))
               #t)))
         (delete 'configure))))
    (synopsis "Programs Microchip's PIC microcontrollers")
    (description "This program programs Microchip's PIC microcontrollers.")
    (home-page "http://hyvatti.iki.fi/~jaakko/pic/picprog.html")
    (license license:gpl3+)))

(define-public fc-host-tools
  (package
    (name "fc-host-tools")
    (version "11")
    (source (origin
              (method url-fetch)
              (uri (string-append "ftp://ftp.freecalypso.org/pub/GSM/"
                                  "FreeCalypso/fc-host-tools-r" version ".tar.bz2"))
              (sha256
               (base32
                "0s87lp6gd8i8ivrdd7mnnalysr65035nambcm992rgla7sk76sj1"))))
    (build-system gnu-build-system)
    (arguments
     `(#:tests? #f                      ; No tests exist.
       #:make-flags
       (list (string-append "INSTALL_PREFIX=" %output)
             (string-append "INCLUDE_INSTALL_DIR=" %output "include/rvinterf"))
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch-installation-paths
           (lambda* (#:key outputs #:allow-other-keys)
             (substitute* '("Makefile"
                            "rvinterf/etmsync/fsiomain.c"
                            "rvinterf/etmsync/fsnew.c"
                            "rvinterf/asyncshell/help.c"
                            "rvinterf/libinterf/launchrvif.c"
                            "loadtools/defpath.c"
                            "loadtools/Makefile"
                            "miscutil/c139explore"
                            "miscutil/pirexplore"
                            "ffstools/tiffs-wrappers/installpath.c"
                            "uptools/atcmd/atinterf.c")
               (("/opt/freecalypso/loadtools")
                (string-append (assoc-ref outputs "out") "/lib/freecalypso/loadtools"))
               (("\\$\\{INSTALL_PREFIX\\}/loadtools")
                (string-append (assoc-ref outputs "out") "/lib/freecalypso/loadtools"))
               (("\\$\\{INSTALL_PREFIX\\}/target-bin")
                (string-append (assoc-ref outputs "out") "/lib/freecalypso/target-bin"))
               (("/opt/freecalypso")
                (assoc-ref outputs "out")))
             #t))
         (delete 'configure))))
    (inputs
     `(("libx11" ,libx11)))
    (synopsis "Freecalypso host tools")
    (description "This package provides some tools for debugging FreeCalypso phones and the FreeCalypso FCDEV3B dev board.

@enumerate
@item fc-e1decode: Decodes a binary Melody E1 file into an ASCII source file.
@item fc-e1gen: Encodes an ASCII Melody E1 file into a binary Melody E1 file.
@item fc-fr2tch: Converts a GSM 06.10 speech recording from libgsm to hex
strings of TCH bits to be fed to the GSM 05.03 channel encoder of a TI
Calypso GSM device.
@item fc-tch2fr: Converts hex strings of TCH bits to libgsm.
@item fc-gsm2vm: utility converts a GSM 06.10 speech sample from the libgsm
source format into a voice memo file that can be uploaded into the FFS of a
FreeCalypso device and played with the audio_vm_play_start() API or the
AT@@VMP command that invokes the latter.
@item fc-rgbconv: Convers RGB 5:6:5 to RGB 8:8:8 and vice versa.
@item rvinterf: Communicates with a TI Calypso GSM device via RVTMUX.
@item rvtdump: produces a human-readable dump of all output emitted by a
TI-based GSM fw on the RVTMUX binary packet interface.
@item fc-shell: FreeCalypso firmwares have a feature of our own invention
(not present in any pre-existing ones) to accept AT commands over the RVTMUX
interface.  It is useful when no second UART is available for a dedicated
standard AT command interface.  fc-shell is the tool that allows you to send
AT commands to the firmware in this manner.
@item fc-memdump: Captures a memory dump from a GSM device.
@item fc-serterm: Trivial serial terminal.  Escapes binary chars.
@item fc-fsio: Going through rvinterf, this tool connects to GSM devices and
allows you to manipulate the device's flash file system.
@item tiaud-compile: Compiles an audio mode configuration table for TI's
Audio Service from our own ASCII source format into the binary format for
uploading into FreeCalypso GSM device FFS with fc-fsio.
@item tiaud-decomp: Decodes TI's audio mode configuration files read out of
FFS into our own ASCII format.
@item tiaud-mkvol: Generates the *.vol binary files which need to accompany
the main *.cfg ones.
@item fc-compalram: Allows running programs on the device without writing
them to flash storage.
@item fc-xram: Allows running programs on the device without writing them
to flash storage.
@item fc-iram: Allows running programs on the device without writing them
to flash storage.
@item fc-loadtool: Writes programs to the device's flash storage.
@item pirffs: Allows listing and extracting FFS content captured as a raw
flash image from Pirelli phones.
@item mokoffs: Allows listing and extracting FFS content captured as a raw
flash image from OpenMoko phones.
@item tiffs: Allows listing and extracting FFS content captured as a raw
flash image from TI phones.
@item c139explore: Run-from-RAM program for C139 phones that
exercises their peripheral hardware: LCD, keypad backlight, buzzer, vibrator.
@item pirexplore: Run-from-RAM program for Pirelli DP-L10 phones that
exercises their peripheral hardware, primarily their LCD.
@item tfc139: Breaks into Mot C1xx phones via shellcode injection, allowing
you to reflash locked phones with new firmware with fc-loadtool.
@item ctracedec: GSM firmwares built in TI's Windows environment have a
compressed trace misfeature whereby many of the ASCII strings
in debug trace messages get replaced with numeric indices at
build time, and these numeric indices are all that gets emitted
on the RVTMUX serial channel.  This tools decodes these numeric indices
back to strings in trace output.
@item fc-cal2text: This utility takes a dump of TI's /gsm/rf flash file system
directory subtree as input (either extracted in vitro with tiffs
or read out in vivo with fc-fsio) and converts all RF tables
found therein into a readable ASCII format.
@item imei-luhn: Computes or verifies the Luhn check digit of an IMEI number.
@item fc-dspapidump: Reads and dumps the contents of the DSP API RAM in a
target Calypso GSM device.
@item fc-vm2hex: Converts the old-fashioned (non-AMR) voice memo files read
out of FFS into hex strings.
@item fc-buzplay: Plays piezoelectic buzzer melodies on an actual
Calypso device equipped with such a buzzer (Mot C1xx, TI's D-Sample board,
our planned future HSMBP) by loading a buzplayer agent onto the target and
feeding melodies to be played to it.
@item fc-tmsh: TI-based GSM firmwares provide a rich set of Test Mode commands
that can be issued through the RVTMUX (debug trace) serial channel.
This program is our test mode shell for sending Test Mode commands to targets
and displaying decoded target responses.
@item fcup-smsend: Send a short message via SMS
@item fcup-smsendmult: Send multiple short messages via SMS in one go
@item fcup-smsendpdu: Send multiple short messages given in PDU format via SMS
@item sms-pdu-decode: Decode PDU format messages
@end enumerate")
    (home-page "https://www.freecalypso.org/")
    (license license:public-domain)))

(define-public stlink
  (package
    (name "stlink")
    (version "1.5.1")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://github.com/texane/stlink/archive/v"
                           version ".tar.gz"))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32
         "01z1cz1a5xbbhd163qrqcgp4bi1k145pb80jmwdz50g7sfzmy570"))))
    (build-system cmake-build-system)
    (arguments
     `(#:tests? #f                      ;no tests
       #:configure-flags
       (let* ((out (assoc-ref %outputs "out"))
              (etc (in-vicinity out "etc"))
              (modprobe (in-vicinity etc "modprobe.d"))
              (udev-rules (in-vicinity etc "udev/rules.d")))
         (list (string-append "-DSTLINK_UDEV_RULES_DIR=" udev-rules)
               (string-append "-DSTLINK_MODPROBED_DIR=" modprobe)))))
    (inputs
     `(("libusb" ,libusb)))
    (synopsis "Programmer for STM32 Discovery boards")
    (description "This package provides a firmware programmer for the STM32
Discovery boards.  It supports two versions of the chip: ST-LINK/V1 (on
STM32VL discovery kits) and ST-LINK/V2 (on STM32L discovery and later kits).
Two different transport layers are used: ST-LINK/V1 uses SCSI passthru
commands over USB, and ST-LINK/V2 and ST-LINK/V2-1 (seen on Nucleo boards) use
raw USB commands.")
    (home-page "https://github.com/texane/stlink")
    ;; The flashloaders/stm32l0x.s and flashloaders/stm32lx.s source files are
    ;; licensed under the GPLv2+.
    (license (list license:bsd-3 license:gpl2+))))
on the executable. (lambda* (#:key inputs outputs #:allow-other-keys) (let ((fpy "bin/ffmpeg-progress-yield") (ffm "bin/ffmpeg")) (wrap-program (search-input-file outputs fpy) `("PATH" ":" prefix (,(search-input-file inputs ffm)))))))))) (inputs (list bash-minimal ffmpeg)) (home-page "https://github.com/slhck/ffmpeg-progress-yield") (synopsis "Run an ffmpeg command with progress") (description "This package allows an ffmpeg command to run with progress. It is usually a complement to @code{ffmpeg-normalize}.") (license license:expat))) (define-public ffmpeg-normalize (package (name "ffmpeg-normalize") (version "1.28.3") (source (origin (method url-fetch) (uri (pypi-uri "ffmpeg-normalize" version)) (sha256 (base32 "19j1pi0gcm9yzllszaji06c1i0r9kl586ada5d2hliahajwly0zk")))) (build-system pyproject-build-system) (arguments (list #:phases #~(modify-phases %standard-phases (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? (invoke "python" "-m" "pytest" "test/test.py")))) (add-after 'wrap 'wrap-ffmpeg ;; Wrap ffmpeg on the executable. (lambda* (#:key inputs outputs #:allow-other-keys) (let ((ffn (search-input-file outputs "bin/ffmpeg-normalize")) (ffm (search-input-file inputs "bin/ffmpeg"))) (wrap-program ffn `("FFMPEG_PATH" = (,ffm))))))))) (native-inputs (list python-pytest)) (inputs (list bash-minimal ffmpeg)) (propagated-inputs (list ffmpeg-progress-yield python-colorama python-colorlog python-tqdm)) (home-page "https://github.com/slhck/ffmpeg-normalize") (synopsis "Normalize audio via ffmpeg") (description "This program normalizes media files to a certain loudness level using the EBU R128 loudness normalization procedure. It can also perform RMS-based normalization (where the mean is lifted or attenuated), or peak normalization to a certain target level. Batch processing of several input files is possible, including video files.") (license license:expat))) (define-public vlc (package (name "vlc") (version "3.0.21") (source (origin (method url-fetch) (uri (string-append "https://download.videolan.org/pub/videolan/vlc/" (car (string-split version #\-)) "/vlc-" version ".tar.xz")) (sha256 (base32 "1c7vbbicx95nymrybgvd2d3p65q0wayhpvsx9ncs1vpsglfvxnr4")))) (build-system gnu-build-system) (native-inputs (list flex bison gettext-minimal pkg-config)) ;; FIXME: Add optional inputs once available. (inputs (list alsa-lib avahi bash-minimal dav1d dbus eudev ffmpeg flac fontconfig freetype fribidi gnutls liba52 libarchive libass libavc1394 libbluray libcaca libcddb libdca libdvbpsi libdvdnav libdvdread libebml libgcrypt libidn libkate libmad libmatroska libmicrodns libmodplug libmpeg2 libogg libpng libraw1394 (librsvg-for-system) libsamplerate libsecret libssh2 libtheora libupnp libva libvdpau libvorbis libvpx libx264 libxext libxi libxinerama libxml2 libxpm livemedia-utils lua-5.2 mesa opus perl protobuf pulseaudio python-wrapper qtbase-5 qtsvg-5 qtx11extras samba sdl sdl-image speex speexdsp srt taglib twolame unzip wayland wayland-protocols x265 xcb-util-keysyms)) (arguments `(#:configure-flags `("BUILDCC=gcc" ,(string-append "LDFLAGS=-Wl,-rpath -Wl," (assoc-ref %build-inputs "ffmpeg") "/lib")) ;needed for the tests #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-source (lambda* (#:key inputs #:allow-other-keys) (let ((livemedia-utils (assoc-ref inputs "livemedia-utils"))) (substitute* "configure" (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}") (string-append "LIVE555_PREFIX=" livemedia-utils))) ;; Some of the tests require using the display to test out VLC, ;; which fails in our sandboxed build system (substitute* "test/run_vlc.sh" (("./vlc --ignore-config") "echo"))))) (add-after 'strip 'regenerate-plugin-cache (lambda* (#:key outputs #:allow-other-keys) ;; The 'install-exec-hook' rule in the top-level Makefile.am ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using ;; 'vlc-cache-gen'. This file includes the mtime of the plugins ;; it references. Thus, we first reset the timestamps of all ;; these files, and then regenerate the cache such that the ;; mtimes it includes are always zero instead of being dependent ;; on the build time. (let* ((out (assoc-ref outputs "out")) (pkglibdir (string-append out "/lib/vlc")) (plugindir (string-append pkglibdir "/plugins")) (cachegen (string-append pkglibdir "/vlc-cache-gen"))) ;; TODO: Factorize 'reset-timestamps'. (for-each (lambda (file) (let ((s (lstat file))) (unless (eq? (stat:type s) 'symlink) (utime file 1 1)))) (find-files plugindir)) (invoke cachegen plugindir)))) (add-after 'install 'wrap-executable (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) (plugin-path (getenv "QT_PLUGIN_PATH"))) (wrap-program (string-append out "/bin/vlc") `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))))))) (home-page "https://www.videolan.org/") (synopsis "Audio and video framework") (description "VLC is a cross-platform multimedia player and framework that plays most multimedia files as well as DVD, Audio CD, VCD, and various streaming protocols.") (properties '((release-monitoring-url . "https://download.videolan.org/pub/videolan/vlc/last"))) (license license:gpl2+))) (define-public mplayer (package (name "mplayer") (version "1.5") (source (origin (method url-fetch) (uri (string-append "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-" version ".tar.xz")) (sha256 (base32 "11dzrdb74ayvivcid3giqncrfm98hi4aqvg3kjrwji6bnddxa335")))) (build-system gnu-build-system) (arguments (list #:tests? #f ; no test target #:configure-flags #~(list (string-append "--prefix=" #$output) "--disable-ffmpeg_a" ; disables bundled ffmpeg "--disable-iwmmxt" (string-append "--extra-cflags=-I" #$(this-package-input "libx11") "/include") ; to detect libx11 ;; Enable runtime cpu detection where supported, ;; and choose a suitable target. #$@(match (or (%current-target-system) (%current-system)) ("x86_64-linux" '("--enable-runtime-cpudetection" "--target=x86_64-linux")) ("i686-linux" '("--enable-runtime-cpudetection" "--target=i686-linux")) ("mips64el-linux" '("--target=mips3-linux")) (_ (list (string-append "--target=" (or (%current-target-system) (nix-system->gnu-triplet (%current-system)))))))) #:phases #~(modify-phases %standard-phases (replace 'configure ;; configure does not work followed by "SHELL=..." and ;; "CONFIG_SHELL=..."; set environment variables instead (lambda* (#:key (configure-flags '()) #:allow-other-keys) (substitute* "configure" (("#! /bin/sh") (string-append "#!" (which "sh")))) (setenv "SHELL" (which "bash")) (setenv "CONFIG_SHELL" (which "bash")) (apply invoke "./configure" configure-flags)))))) ;; FIXME: Add additional inputs once available. (native-inputs (list pkg-config yasm)) (inputs (list alsa-lib cdparanoia ffmpeg-5 fontconfig freetype giflib lame libass libdvdcss libdvdnav ; ignored without libdvdread libdvdread ; ignored without libdvdnav libjpeg-turbo libmpeg2 mpg123 ; audio codec for MP3 libpng libtheora libvdpau libvorbis libx11 libx264 libxinerama libxv libxxf86dga mesa opus perl pulseaudio python-wrapper sdl speex zlib)) (home-page "https://www.mplayerhq.hu") (synopsis "Audio and video player") (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI, Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT, NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD, SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.") (license license:gpl2))) (define-public mpv (package (name "mpv") (version "0.39.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/mpv-player/mpv") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "18v9hpnf3r3gii7m13gw04fiwps8lcdgjqc83rmvhfsk03ws3q84")))) (build-system meson-build-system) (arguments (list #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch-file-names (lambda* (#:key inputs #:allow-other-keys) (substitute* "player/lua/ytdl_hook.lua" (("\"yt-dlp\",") (string-append "\"" (search-input-file inputs "bin/yt-dlp") "\","))))) (add-before 'configure 'build-reproducibly (lambda _ ;; Somewhere in the build system library dependencies are enumerated ;; and passed as linker flags, but the order in which they are added ;; varies. See . ;; Set PYTHONHASHSEED as a workaround for deterministic results. (setenv "PYTHONHASHSEED" "1")))) #:configure-flags #~(list "-Dlibmpv=true" "-Dcdda=enabled" "-Ddvdnav=enabled" "-Dbuild-date=false"))) (native-inputs (list perl ;for zsh completion file pkg-config python-docutils python-wrapper)) ;; Missing features: libguess, V4L2. (inputs (list enca ladspa lcms libbs2b mpg123 rsound vulkan-headers vulkan-loader yt-dlp)) ;; XXX: These are propagated for the mpv pkg-config package, as they are ;; listed in Requires.private and would break 'pkg-config --exists mpv' if ;; unavailable. (propagated-inputs (list alsa-lib ffmpeg jack-1 libass libbluray libcaca libcdio-paranoia libdrm libdvdnav libdvdread libjpeg-turbo libplacebo libsixel libva libvdpau libx11 libxext libxinerama libxkbcommon libxpresent libxrandr libxscrnsaver libxv ;; XXX: lua > 5.2 is not currently supported; see meson.build lua-5.2 mesa pulseaudio shaderc wayland wayland-protocols zimg zlib)) (home-page "https://mpv.io/") (synopsis "Audio and video player") (description "mpv is a general-purpose audio and video player. It is a fork of mplayer2 and MPlayer. It shares some features with the former projects while introducing many more.") (license license:gpl2+))) (define-public smplayer (package (name "smplayer") (version "23.12.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/smplayer-dev/smplayer") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0yrm57rib910h9m4avhg6mkmkzy9xjb3f185c5zr6jls100az8h1")))) (build-system qt-build-system) (native-inputs (list qttools-5)) (inputs (list bash-minimal qtbase-5 qtdeclarative-5 zlib mpv)) (arguments (list #:tests? #false ; no tests #:make-flags #~(list (string-append "PREFIX=" #$output) (string-append "CC=" #+(cc-for-target))) #:phases #~(modify-phases %standard-phases (delete 'configure) (add-after 'install 'wrap-executable (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (mpv (assoc-ref inputs "mpv"))) (wrap-program (string-append out "/bin/smplayer") `("PATH" ":" prefix ,(list (string-append mpv "/bin")))))))))) (home-page "https://www.smplayer.info") (synopsis "Complete front-end for MPlayer, a media player") (description "SMPlayer is a graphical user interface (GUI) for MPlayer, which is capable of playing almost all known video and audio formats. Apart from providing access for the most common and useful options of MPlayer, SMPlayer adds other interesting features like the possibility to play Youtube videos, download subtitles, remember the last played position, etc.") (license license:gpl2+))) (define-public jellyfin-mpv-shim (package (name "jellyfin-mpv-shim") (version "2.8.0") (source (origin (method url-fetch) (uri (pypi-uri "jellyfin-mpv-shim" version)) (sha256 (base32 "0lgs3d6qxxf338mg4mmm4jrkvw1alrks16hx30figwn3dcv5l0qh")))) (build-system python-build-system) (arguments (list ;; There is no test suite, but the code is ill-behaved and tries ;; to open network connections at module import time, which makes ;; `python setup.py test' fail. #:tests? #f #:phases #~(modify-phases %standard-phases ;; sanity-check loads console_scripts endpoints, which launches ;; the program, which makes the build hang. Disable it. (delete 'sanity-check) (add-after 'unpack 'disable-updates (lambda _ (substitute* "jellyfin_mpv_shim/conf.py" (("check_updates: bool = True") "check_updates: bool = False") (("notify_updates: bool = True") "notify_updates: bool = False")))) (add-after 'install 'install-desktop-file (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (apps (string-append out "/share/applications")) (metainfo (string-append out "/share/metainfo")) (icons (string-append out "/share/icons")) (desktop-base "jellyfin_mpv_shim/integration/") (package-id "com.github.iwalton3.jellyfin-mpv-shim")) (for-each (lambda (size) (let ((dir (format #f "~a/hicolor/~ax~a/apps/" icons size size package-id))) (mkdir-p dir) (copy-file (format #f "~ajellyfin-~a.png" desktop-base size) (string-append dir package-id ".png")))) '(256 128 64 48 32 16)) (install-file (string-append desktop-base package-id ".appdata.xml") metainfo) (install-file (string-append desktop-base package-id ".desktop") apps))))))) (inputs (list `(,python "tk") python-jellyfin-apiclient python-jinja2 python-mpv python-mpv-jsonipc python-pypresence python-pystray python-requests)) (home-page "https://github.com/jellyfin/jellyfin-mpv-shim") (synopsis "Cast media from Jellyfin Mobile and Web apps to MPV") (description "Jellyfin MPV Shim is a cross-platform cast client for Jellyfin. It has support for various media files without transcoding.") (license (list ;; jellyfin-mpv-shim license:gpl3 ;; jellyfin-mpv-shim, and Anime4K, FSRCNNX, NVIDIA Image ;; Scaling, AMD FidelityFX Super Resolution, AMD ;; FidelityFX Contrast Adaptive Sharpening shaders. license:expat ;; Static Grain shader. license:public-domain ;; KrigBilatera, SSimDownscaler, and NNEDI3 shaders. license:lgpl3+)))) (define-public gallery-dl (package (name "gallery-dl") (version "1.27.4") (source (origin (method url-fetch) (uri (string-append "https://github.com/mikf/gallery-dl" "/releases/download/v" version "/gallery_dl-" version ".tar.gz")) (sha256 (base32 "13qq16fi6zq356qbnwb8a898m7gq20r67j2lmb4g37389yqvkk6v")))) (build-system python-build-system) (inputs (list python-requests ffmpeg)) (home-page "https://github.com/mikf/gallery-dl") (synopsis "Command-line program to download images from several sites") (description "Gallery-dl is a command-line program that downloads image galleries and collections from several image hosting sites. While this package can use youtube-dl or yt-dlp packages to download videos, the focus is more on images and image hosting sites.") (license license:gpl2))) (define-public mpv-mpris (package (name "mpv-mpris") (version "1.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/hoyon/mpv-mpris") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1384y8n3l0xk8hbad1nsj9ljzb1h02g3ln3jysd8bd6shbl0x4mx")))) (build-system gnu-build-system) (arguments (list #:make-flags #~(list (string-append "SCRIPTS_DIR=" #$output "/lib") (string-append "CC=" #$(cc-for-target))) #:phases #~(modify-phases %standard-phases (delete 'configure) (replace 'check (lambda* (#:key inputs native-inputs tests? #:allow-other-keys) (if tests? (begin (setenv "MPV_MPRIS_TEST_PLAY" (search-input-file (or native-inputs inputs) "share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga")) (invoke "make" "test")) (format #t "test suite not run~%"))))))) (native-inputs (list dbus jq pkg-config playerctl socat sound-theme-freedesktop xorg-server-for-tests xvfb-run)) (inputs (list ffmpeg glib mpv)) (home-page "https://github.com/hoyon/mpv-mpris") (synopsis "MPRIS plugin for mpv") (description "This package provides an @dfn{MPRIS} (Media Player Remote Interfacing Specification) plugin for the @code{mpv} media player. It implements @code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus interfaces. To load this plugin, specify the following option when starting mpv: @code{--script $GUIX_PROFILE/lib/mpris.so} or link it into @file{$HOME/.config/mpv/scripts}.") (license license:expat))) (define-public libvpx (package (name "libvpx") (version "1.15.0") (source (origin (method git-fetch) (uri (git-reference (url "https://chromium.googlesource.com/webm/libvpx") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1q2scpfiifhpilw6qqpqihk98plj57gwh0vyiqwsv991i7b322bv")) (patches (search-patches "libvpx-CVE-2016-2818.patch")))) (build-system gnu-build-system) (arguments `(#:configure-flags (list "--enable-shared" "--disable-static" "--as=yasm" ;; Limit size to avoid CVE-2015-1258 "--size-limit=16384x16384" (string-append "--prefix=" (assoc-ref %outputs "out"))) #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib")) #:phases (modify-phases %standard-phases (replace 'configure (lambda* (#:key configure-flags #:allow-other-keys) ;; The configure script does not understand some of the GNU ;; options, so we only add the flags specified above. (apply invoke "./configure" configure-flags)))) ;; XXX: The test suite wants to download 871 files from a cloud storage ;; service (see test/test-data.sha1). It is possible to specify a ;; custom directory, but there seems to be no tarball with all files. #:tests? #f)) (native-inputs (list perl yasm)) (synopsis "VP8/VP9 video codec") (description "libvpx is a codec for the VP8/VP9 video compression format.") (license license:bsd-3) (home-page "https://www.webmproject.org/"))) (define-public orfondl (package (name "orfondl") (version "1.0.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/badlogic/orfondl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0h1zcxxhvshbc3gkmr33npki6sdjh79haack1cci9k40a0gk144v")) (modules '((guix build utils))) (snippet '(begin ;; Delete prebuilt binary file. (delete-file "orfondl"))))) (build-system go-build-system) (arguments (list #:install-source? #f #:import-path "github.com/badlogic/orfondl" #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch-source (lambda* (#:key inputs import-path #:allow-other-keys) (substitute* (string-append "src/" import-path "/main.go") (("\"ffmpeg\"") (string-append "\"" (search-input-file inputs "bin/ffmpeg") "\"")))))))) (inputs (list ffmpeg)) (home-page "https://github.com/tpoechtrager/orf_dl") (synopsis "Download videos from ORF ON") (description "This package provides a Go-based command line application to download videos from Austria's national television broadcaster.") (license license:bsd-3))) (define-public orf-dl (deprecated-package "orf-dl" orfondl)) (define-public yle-dl (package (name "yle-dl") (version "20230611") (source (origin ;; PyPI release doesn't include tests. (method git-fetch) (uri (git-reference (url "https://github.com/aajanki/yle-dl") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "04smlq6cswfp08sjif0cxnall0xbxl3bgly849nm5kg1m33ybmqk")))) (build-system pyproject-build-system) (arguments (list #:phases #~(modify-phases %standard-phases (add-after 'wrap 'wrap-path (lambda _ (wrap-program (string-append #$output "/bin/yle-dl") `("PATH" = (,(string-append #$(this-package-input "ffmpeg") "/bin") ,(string-append #$(this-package-input "wget") "/bin")))))) ;; Integration tests require internet access. (add-before 'check 'remove-integration-tests (lambda _ (delete-file-recursively "tests/integration")))))) (native-inputs (list python-flit-core python-pytest python-pytest-runner)) (inputs (list bash-minimal ffmpeg-5 wget)) (propagated-inputs (list python-attrs python-configargparse python-lxml python-requests python-xattr)) (home-page "https://aajanki.github.io/yle-dl/") (synopsis "Download videos from Yle servers") (description "Yle-dl is a command line program for downloading media files from the video streaming services of the Finnish national broadcasting company Yle.") (license license:gpl3+))) (define-public youtube-dl (package (name "youtube-dl") (version "2021.12.17") (source (origin (method url-fetch) (uri (string-append "https://youtube-dl.org/downloads/latest/" "youtube-dl-" version ".tar.gz")) (sha256 (base32 "1prm84ci1n1kjzhikhrsbxbgziw6br822psjnijm2ibqnz49jfwz")) (snippet '(begin ;; Delete the pre-generated files, except for the man page ;; which requires 'pandoc' to build. (for-each delete-file '("youtube-dl" ;;pandoc is needed to generate ;;"youtube-dl.1" "youtube-dl.bash-completion" "youtube-dl.fish" "youtube-dl.zsh")))))) (build-system python-build-system) (arguments ;; The problem here is that the directory for the man page and completion ;; files is relative, and for some reason, setup.py uses the ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO". ;; So, we need pass the prefix directly. In addition, make sure the Bash ;; completion file is called 'youtube-dl' rather than ;; 'youtube-dl.bash-completion'. `(#:tests? #f ; Many tests fail. The test suite can be run with pytest. #:phases (modify-phases %standard-phases (add-after 'unpack 'default-to-the-ffmpeg-input (lambda _ ;; See . ;; ffmpeg is big but required to request free formats ;; from, e.g., YouTube so pull it in unconditionally. ;; Continue respecting the --ffmpeg-location argument. (substitute* "youtube_dl/postprocessor/ffmpeg.py" (("\\.get\\('ffmpeg_location'\\)" match) (format #f "~a or '~a'" match (which "ffmpeg")))))) (add-before 'build 'build-generated-files (lambda _ ;; Avoid the make targets that require pandoc. (invoke "make" "PYTHON=python" "youtube-dl" ;;"youtube-dl.1" ; needs pandoc "youtube-dl.bash-completion" "youtube-dl.zsh" "youtube-dl.fish"))) (add-before 'install 'fix-the-data-directories (lambda* (#:key outputs #:allow-other-keys) (let ((prefix (assoc-ref outputs "out"))) (mkdir "bash-completion") (rename-file "youtube-dl.bash-completion" "bash-completion/youtube-dl") (substitute* "setup.py" (("youtube-dl\\.bash-completion") "bash-completion/youtube-dl") (("'etc/") (string-append "'" prefix "/etc/")) (("'share/") (string-append "'" prefix "/share/")))))) (add-after 'install 'install-completion (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (zsh (string-append out "/share/zsh/site-functions"))) (mkdir-p zsh) (copy-file "youtube-dl.zsh" (string-append zsh "/_youtube-dl")))))))) (native-inputs (list zip)) (inputs (list ffmpeg)) (synopsis "Download videos from YouTube.com and other sites") (description "Youtube-dl is a small command-line program to download videos from YouTube.com and many more sites.") (home-page "https://yt-dl.org") (properties '((release-monitoring-url . "https://yt-dl.org/downloads/"))) (license license:public-domain))) (define-public yt-dlp (package (name "yt-dlp") (version "2024.11.18") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/yt-dlp/yt-dlp/") (commit version))) (file-name (git-file-name name version)) (modules '((guix build utils))) (snippet '(substitute* "pyproject.toml" (("^.*Programming Language :: Python :: 3\\.13.*$") ""))) (sha256 (base32 "019wkjbjcdsf56sk5ihnkprp02a80vkja448iwps1illzb5jp52f")))) (build-system pyproject-build-system) (arguments `(#:tests? ,(not (%current-target-system)) #:phases (modify-phases %standard-phases ;; See . ;; ffmpeg is big but required to request free formats from, e.g., ;; YouTube so pull it in unconditionally. Continue respecting the ;; --ffmpeg-location argument. (add-after 'unpack 'default-to-the-ffmpeg-input (lambda* (#:key inputs #:allow-other-keys) (substitute* "yt_dlp/postprocessor/ffmpeg.py" (("location = self.get_param(.*)$") (string-append "location = '" (dirname (search-input-file inputs "bin/ffmpeg")) "'\n"))))) (add-before 'build 'build-generated-files (lambda* (#:key inputs #:allow-other-keys) (if (assoc-ref inputs "pandoc") (invoke "make" "PYTHON=python" "yt-dlp" "yt-dlp.1" "completions") (invoke "make" "PYTHON=python" "yt-dlp" "completions")))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? (invoke "pytest" "-k" "not download"))))))) (inputs (list ffmpeg python-brotli python-certifi python-mutagen python-pycryptodomex python-requests-next ; TODO Remove this special package python-urllib3-next ; TODO Remove this one too python-websockets)) (native-inputs (append ;; To generate the manpage. (if (supported-package? pandoc) (list pandoc) '()) (list nss-certs-for-test python-hatchling python-pytest zip))) (synopsis "Download videos from YouTube.com and other sites") (description "yt-dlp is a small command-line program to download videos from YouTube.com and many more sites. It is a fork of youtube-dl with a focus on adding new features while keeping up-to-date with the original project.") (properties '((release-monitoring-url . "https://pypi.org/project/yt-dlp/"))) (home-page "https://github.com/yt-dlp/yt-dlp") (license license:public-domain))) (define-public you-get (package (name "you-get") (version "0.4.1555") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/soimort/you-get") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0gn86i6nfsw395r9a3i88nv2g08s5bgjps7w4qawb9gvk4h7zqap")))) (build-system python-build-system) (inputs (list ffmpeg)) ; for multi-part and >=1080p videos (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'qualify-input-references ;; Explicitly invoke the input ffmpeg, instead of whichever one ;; happens to be in the user's $PATH at run time. (lambda* (#:key inputs #:allow-other-keys) (let ((ffmpeg (search-input-file inputs "/bin/ffmpeg"))) (substitute* "src/you_get/processor/ffmpeg.py" ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the ;; same string is also used when sniffing ffmpeg's output. (("(FFMPEG == |\\()'ffmpeg'" _ prefix) (string-append prefix "'" ffmpeg "'"))))))) #:tests? #f)) ; XXX some tests need Internet access (synopsis "Download videos, audio, or images from Web sites") (description "You-Get is a command-line utility to download media contents (videos, audio, images) from the Web. It can use either mpv or vlc for playback.") (home-page "https://you-get.org/") (license license:expat))) (define-public youtube-viewer (package (name "youtube-viewer") (version "3.8.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/trizen/youtube-viewer") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "0xdybiihd66b79rbsawjhxs9snm78gld5ziz3gnp8vdcw0bshwz7")))) (build-system perl-build-system) (native-inputs (list perl-module-build)) (inputs (list bash-minimal perl-data-dump perl-file-sharedir perl-gtk2 perl-json perl-json-xs perl-libwww perl-lwp-protocol-https perl-lwp-useragent-cached perl-memoize perl-mozilla-ca perl-term-readline-gnu perl-unicode-linebreak xdg-utils ;; Some videos play without youtube-dl, but others silently fail to. youtube-dl)) (arguments `(#:modules ((guix build perl-build-system) (guix build utils) (srfi srfi-26)) ;; gtk-2/3 variants are both installed by default but the gtk3 variant ;; is broken without perl-gtk3. #:module-build-flags '("--gtk2") #:phases (modify-phases %standard-phases (add-after 'unpack 'refer-to-inputs (lambda* (#:key inputs #:allow-other-keys) (substitute* "lib/WWW/YoutubeViewer.pm" (("'youtube-dl'") (format #f "'~a/bin/youtube-dl'" (assoc-ref inputs "youtube-dl")))) (substitute* '("bin/gtk2-youtube-viewer" "bin/gtk3-youtube-viewer") (("'xdg-open'") (format #f "'~a/bin/xdg-open'" (assoc-ref inputs "xdg-utils")))))) (add-after 'install 'install-desktop (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (sharedir (string-append out "/share"))) (install-file "share/gtk-youtube-viewer.desktop" (string-append sharedir "/applications")) (install-file "share/icons/gtk-youtube-viewer.png" (string-append sharedir "/pixmaps"))))) (add-after 'install 'wrap-program (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin-dir (string-append out "/bin/")) (site-dir (string-append out "/lib/perl5/site_perl/")) (lib-path (getenv "PERL5LIB"))) (for-each (cut wrap-program <> `("PERL5LIB" ":" prefix (,lib-path ,site-dir))) (find-files bin-dir)))))))) (synopsis "Lightweight application for searching and streaming videos from YouTube") (description "Youtube-viewer searches and plays YouTube videos in a native player. It comes with various search options; it can search for videos, playlists and/or channels. The videos are streamed directly in a selected video player at the best resolution (customizable) and with closed-captions (if available). Both command-line and GTK2 interface are available.") (home-page "https://github.com/trizen/youtube-viewer") (license license:perl-license))) (define-public ytcc (package (name "ytcc") (version "2.6.1") (source (origin (method url-fetch) (uri (pypi-uri "ytcc" version)) (sha256 (base32 "0laaj7m9mkn421hsljaqyhj2az641lg4y7ym6l8jl1xgs1vl9b4b")))) (build-system pyproject-build-system) (inputs (list python-click python-wcwidth python-websockets python-urllib3-next python-requests-next python-pycryptodomex python-mutagen python-brotli yt-dlp)) (home-page "https://github.com/woefe/ytcc") (synopsis "Command line tool to keep track of your favorite playlists") (description "ytcc is a command line tool to keep track of your favorite playlists.") (license license:gpl3+))) (define-public libbluray (package (name "libbluray") (version "1.0.2") (source (origin (method url-fetch) (uri (string-append "https://download.videolan.org/videolan/" name "/" version "/" name "-" version ".tar.bz2")) (sha256 (base32 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--disable-bdjava-jar" "--disable-static") #:phases (modify-phases %standard-phases (add-after 'unpack 'refer-to-libxml2-in-.pc-file ;; Avoid the need to propagate libxml2 by referring to it ;; directly, as is already done for fontconfig & freetype. (lambda* (#:key inputs #:allow-other-keys) (let ((libxml2 (assoc-ref inputs "libxml2"))) (substitute* "configure" ((" libxml-2.0") "")) (substitute* "src/libbluray.pc.in" (("^Libs.private:" field) (string-append field " -L" libxml2 "/lib -lxml2"))) #t))) (add-before 'build 'fix-dlopen-paths (lambda* (#:key inputs #:allow-other-keys) (let ((libaacs (assoc-ref inputs "libaacs")) (libbdplus (assoc-ref inputs "libbdplus"))) (substitute* "src/libbluray/disc/aacs.c" (("\"libaacs\"") (string-append "\"" libaacs "/lib/libaacs\""))) (substitute* "src/libbluray/disc/bdplus.c" (("\"libbdplus\"") (string-append "\"" libbdplus "/lib/libbdplus\""))) #t)))))) (native-inputs (list pkg-config)) (inputs `(("fontconfig" ,fontconfig) ("freetype" ,freetype) ("libaacs" ,libaacs) ("libbdplus" ,libbdplus) ("libxml2" ,libxml2))) (home-page "https://www.videolan.org/developers/libbluray.html") (synopsis "Blu-Ray Disc playback library") (description "libbluray is a library designed for Blu-Ray Disc playback for media players, like VLC or MPlayer.") (license license:lgpl2.1+))) (define-public libdvdread (package (name "libdvdread") (version "6.0.2") (source (origin (method url-fetch) (uri (string-append "https://download.videolan.org/videolan/" "libdvdread/" version "/" "libdvdread-" version ".tar.bz2")) (sha256 (base32 "1c7yqqn67m3y3n7nfrgrnzz034zjaw5caijbwbfrq89v46ph257r")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--with-libdvdcss=yes"))) (native-inputs (list pkg-config)) (propagated-inputs (list libdvdcss)) (home-page "http://dvdnav.mplayerhq.hu/") (synopsis "Library for reading video DVDs") (description "Libdvdread provides a simple foundation for reading DVD video disks. It provides the functionality that is required to access many DVDs. It parses IFO files, reads NAV-blocks, and performs CSS authentication and descrambling (if an external libdvdcss library is installed).") (license license:gpl2+))) (define-public dvdauthor (package (name "dvdauthor") (version "0.7.2") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-" version ".tar.gz")) (sha256 (base32 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h")))) (build-system gnu-build-system) (inputs (list libdvdread libpng imagemagick libxml2 freetype)) (native-inputs (list pkg-config)) (synopsis "Generates a DVD-Video movie from a MPEG-2 stream") (description "@command{dvdauthor} will generate a DVD-Video movie from a MPEG-2 stream containing VOB packets.") (home-page "https://dvdauthor.sourceforge.net") (license license:gpl3+))) (define-public libdvdnav (package (name "libdvdnav") (version "6.0.1") (source (origin (method url-fetch) (uri (string-append "https://download.videolan.org/videolan/" "libdvdnav/" version "/" "libdvdnav-" version ".tar.bz2")) (sha256 (base32 "0cv7j8irsv1n2dadlnhr6i1b8pann2ah6xpxic41f04my6ba6rp5")))) (build-system gnu-build-system) (native-inputs (list pkg-config)) (propagated-inputs (list libdvdread)) ;in 'Requires.private' of dvdnav.pc (home-page "http://dvdnav.mplayerhq.hu/") (synopsis "Library for video DVD navigation features") (description "Libdvdnav is a library for developers of multimedia applications. It allows easy use of sophisticated DVD navigation features such as DVD menus, multiangle playback and even interactive DVD games. All this functionality is provided through a simple API which provides the DVD playback as a single logical stream of blocks, intermitted by special dvdnav events to report certain conditions. The main usage of libdvdnav is a loop regularly calling a function to get the next block, surrounded by additional calls to tell the library of user interaction. The whole DVD virtual machine and internal playback states are completely encapsulated.") (license license:gpl2+))) (define-public libdvdcss (package (name "libdvdcss") (version "1.4.3") (source (origin (method url-fetch) (uri (string-append "https://download.videolan.org/pub/" name "/" version "/" name "-" version ".tar.bz2")) (sha256 (base32 "0y800y33spblb20s1lsjbaiybknmwwmmiczmjqx5s760blpwjg13")))) (build-system gnu-build-system) (home-page "https://www.videolan.org/developers/libdvdcss.html") (synopsis "Library for accessing DVDs as block devices") (description "libdvdcss is a simple library designed for accessing DVDs like a block device without having to bother about the decryption.") (license license:gpl2+))) (define-public srt2vtt (package (name "srt2vtt") (version "0.2") (source (origin (method url-fetch) (uri (string-append "https://files.dthompson.us/srt2vtt/srt2vtt-" version ".tar.gz")) (sha256 (base32 "1ravl635x81fcai4h2xnsn926i69pafgr6zkghq6319iprkw8ffv")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-after 'install 'wrap-srt2vtt (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin")) (version ,(let ((v (package-version guile-3.0))) (string-append (car (string-split v #\.)) ".0"))) (site (string-append out "/share/guile/site/" version)) (compiled (string-append out "/lib/guile/" version "/site-ccache"))) (wrap-program (string-append bin "/srt2vtt") `("GUILE_LOAD_PATH" ":" prefix (,site)) `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,compiled))))))))) (native-inputs (list pkg-config)) (inputs (list guile-3.0)) (synopsis "SubRip to WebVTT subtitle converter") (description "srt2vtt converts SubRip formatted subtitles to WebVTT format for use with HTML5 video.") (home-page "https://dthompson.us/projects/srt2vtt.html") (license license:gpl3+))) (define-public avidemux (package (name "avidemux") (version "2.7.8") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/avidemux/avidemux/" version "/" "avidemux_" version ".tar.gz")) (sha256 (base32 "00blv5455ry3bb86zyzk1xmq3rbqmbif62khc0kq3whza97l12k2")) (patches (search-patches "avidemux-install-to-lib.patch")))) (build-system cmake-build-system) (native-inputs `(("perl" ,perl) ("pkg-config" ,pkg-config) ("python" ,python-wrapper) ("qttools-5" ,qttools-5) ("yasm" ,yasm))) ;; FIXME: Once packaged, add libraries not found during the build. (inputs `(("alsa-lib" ,alsa-lib) ("fontconfig" ,fontconfig) ("freetype" ,freetype) ("fribidi" ,fribidi) ("glu" ,glu) ("jack" ,jack-1) ("lame" ,lame) ("libaom" ,libaom) ("libva" ,libva) ("libvdpau" ,libvdpau) ("libvorbis" ,libvorbis) ("libvpx" ,libvpx) ("libxv" ,libxv) ("pulseaudio" ,pulseaudio) ("qtbase" ,qtbase-5) ("sqlite" ,sqlite) ("zlib" ,zlib))) (arguments `(#:tests? #f ; no check target #:phases ;; Make sure files inside the included ffmpeg tarball are ;; patch-shebanged. (let ((ffmpeg "ffmpeg-4.2.4")) (modify-phases %standard-phases (add-before 'patch-source-shebangs 'unpack-ffmpeg (lambda _ (with-directory-excursion "avidemux_core/ffmpeg_package" (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2")) (delete-file (string-append ffmpeg ".tar.bz2"))) #t)) (add-after 'patch-source-shebangs 'repack-ffmpeg (lambda _ (with-directory-excursion "avidemux_core/ffmpeg_package" (substitute* (string-append ffmpeg "/configure") (("#! /bin/sh") (string-append "#!" (which "sh")))) (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg ;; avoid non-determinism in the archive "--sort=name" "--mtime=@0" "--owner=root:0" "--group=root:0") (delete-file-recursively ffmpeg)) #t)) (replace 'configure (lambda _ ;; Copy-paste settings from the cmake build system. (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH")) (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH")) #t)) (replace 'build (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (lib (string-append out "/lib")) (top (getcwd)) (build_component (lambda* (component srcdir #:optional (args '())) (let ((builddir (string-append "build_" component))) (mkdir builddir) (with-directory-excursion builddir (apply invoke "cmake" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" (string-append "-DCMAKE_INSTALL_PREFIX=" out) (string-append "-DCMAKE_INSTALL_RPATH=" lib) (string-append "-DCMAKE_SHARED_LINKER_FLAGS=" "\"-Wl,-rpath=" lib "\"") (string-append "-DAVIDEMUX_SOURCE_DIR=" top) (string-append "../" srcdir) "-DENABLE_QT5=True" args) (invoke "make" "-j" (number->string (parallel-job-count))) (invoke "make" "install")))))) (mkdir out) (build_component "core" "avidemux_core") (build_component "cli" "avidemux/cli") (build_component "qt4" "avidemux/qt4") (build_component "plugins_common" "avidemux_plugins" '("-DPLUGIN_UI=COMMON")) (build_component "plugins_cli" "avidemux_plugins" '("-DPLUGIN_UI=CLI")) (build_component "plugins_qt4" "avidemux_plugins" '("-DPLUGIN_UI=QT4")) (build_component "plugins_settings" "avidemux_plugins" '("-DPLUGIN_UI=SETTINGS")) ;; Remove .exe and .dll file. (delete-file-recursively (string-append out "/share/ADM6_addons")) #t))) (delete 'install))))) (home-page "http://fixounet.free.fr/avidemux/") (synopsis "Video editor") (description "Avidemux is a video editor designed for simple cutting, filtering and encoding tasks. It supports many file types, including AVI, DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks can be automated using projects, job queue and powerful scripting capabilities.") (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux")) ;; Software with various licenses is included, see License.txt. (license license:gpl2+))) (define-public vapoursynth (package (name "vapoursynth") (version "61") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/vapoursynth/vapoursynth") (commit (string-append "R" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0v0dp3hydqzam0dp2d9zbrccrsvhy6n61s4v7ca2qbw69vpsm594")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-after 'install 'wrap (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (site (string-append out "/lib/python" ,(version-major+minor (package-version python)) "/site-packages"))) (wrap-program (string-append out "/bin/vspipe") `("PYTHONPATH" ":" = (,site))))))))) (native-inputs (list autoconf automake python-cython libtool pkg-config yasm)) (inputs (list ffmpeg libass python tesseract-ocr zimg)) (home-page "http://www.vapoursynth.com/") (synopsis "Video processing framework") (description "VapourSynth is a C++ library and Python module for video manipulation. It aims to be a modern rewrite of Avisynth, supporting multithreading, generalized colorspaces, per frame properties, and videos with format changes.") ;; src/core/cpufeatures only allows x86, ARM or PPC (supported-systems (fold delete %supported-systems '("mips64el-linux" "aarch64-linux"))) ;; As seen from the source files. (license license:lgpl2.1+))) (define-public xvid (package (name "xvid") (version "1.3.7") (source (origin (method url-fetch) (uri (string-append "http://downloads.xvid.com/downloads/xvidcore-" version ".tar.bz2")) (sha256 (base32 "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf")))) (build-system gnu-build-system) (native-inputs (list yasm)) (arguments '(#:phases (modify-phases %standard-phases (add-before 'configure 'pre-configure (lambda _ (chdir "build/generic") (substitute* "configure" (("#! /bin/sh") (string-append "#!" (which "sh")))) #t))) #:tests? #f)) ; no test suite (home-page "https://www.xvid.com/") (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec") (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video codec library. It uses ASP features such as b-frames, global and quarter pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG and custom quantization matrices.") (license license:gpl2+))) (define-public streamlink (package (name "streamlink") (version "6.3.1") (source (origin (method url-fetch) (uri (pypi-uri "streamlink" version)) (sha256 (base32 "0i2qym2plm4gpcq50vl67j69m8a4zz9mb8gi2xryx28pbnpdzh4k")) (snippet #~(begin (use-modules (guix build utils)) (substitute* "pyproject.toml" (("trio >=0\\.22") "trio >=0.21")))))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? (invoke "python" "-m" "pytest"))))))) (native-inputs (list python-freezegun python-requests-mock python-pytest python-pytest-asyncio python-pytest-trio)) (propagated-inputs (list python-certifi python-isodate python-lxml python-pycountry python-pycryptodome python-pysocks python-requests python-trio python-trio-websocket python-typing-extensions python-urllib3 python-websocket-client)) (home-page "https://github.com/streamlink/streamlink") (synopsis "Extract streams from various services") (description "Streamlink is command-line utility that extracts streams from sites like Twitch.tv and pipes them into a video player of choice.") (license license:bsd-2))) (define-public twitchy (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag (package (name "twitchy") (version (git-version "3.4" "1" commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/BasioMeusPuga/twitchy") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7")))) (build-system python-build-system) (arguments '(#:phases (modify-phases %standard-phases (add-after 'unpack 'patch-paths (lambda* (#:key inputs #:allow-other-keys) (substitute* "twitchy/twitchy_play.py" (("\"streamlink ") (string-append "\"" (assoc-ref inputs "streamlink") "/bin/streamlink "))) #t)) (add-before 'check 'check-setup (lambda _ (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’. #t)) (add-after 'install 'install-rofi-plugin (lambda* (#:key outputs #:allow-other-keys) (install-file "plugins/rofi-twitchy" (string-append (assoc-ref outputs "out") "/bin")) #t))))) (inputs (list python-requests streamlink)) (home-page "https://github.com/BasioMeusPuga/twitchy") (synopsis "Command-line interface for Twitch.tv") (description "This package provides a command-line interface for Twitch.tv") (license license:gpl3+)))) (define-public mlt (package (name "mlt") (version "7.24.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/mltframework/mlt") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "08fgcf20v4q52lfdwzvscbbppa6m582f551q6fzxz2vs5936w3wx")))) (build-system cmake-build-system) (arguments (list #:tests? #f ;requires "Kwalify" #:phases #~(modify-phases %standard-phases (add-before 'configure 'override-LDFLAGS (lambda _ (setenv "LDFLAGS" (string-append "-Wl,-rpath=" #$output "/lib")))) (add-after 'install 'wrap-executable (lambda _ (let* ((frei0r #$(this-package-input "frei0r-plugins")) (ladspa #$(this-package-input "ladspa")) ;; In MLT 7, 'melt' symlinks to 'melt-7'. Try to keep ;; compatibility with MLT 6 where it's only 'melt'. (major #$(version-major version)) (exec (if (file-exists? (string-append #$output "/bin/melt-" major)) (string-append "melt-" major) "melt"))) (wrap-program (string-append #$output "/bin/" exec) `("FREI0R_PATH" ":" = (,(string-append frei0r "/lib/frei0r-1"))) `("LADSPA_PATH" ":" = (,(string-append ladspa "/lib/ladspa")))))))))) (inputs (list alsa-lib `(,alsa-plugins "pulseaudio") bash-minimal ffmpeg fftw frei0r-plugins gdk-pixbuf gtk+ libxml2 jack-1 ladspa libebur128 libexif libvorbis rubberband libsamplerate pulseaudio qtbase-5 qtsvg-5 rtaudio sdl2 sdl2-image sox vidstab)) (native-inputs (list pkg-config)) (home-page "https://www.mltframework.org/") (synopsis "Author, manage, and run multitrack audio/video compositions") (description "MLT is a multimedia framework, designed and developed for television broadcasting. It provides a toolkit for broadcasters, video editors, media players, transcoders, web streamers and many more types of applications. The functionality of the system is provided via an assortment of ready to use tools, XML authoring components, and an extensible plug-in based API.") (license license:lgpl2.1+))) (define-public mlt-6 (package (inherit mlt) (name "mlt") (version "6.26.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/mltframework/mlt") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1gz79xvs5jrzqhwhfk0dqdd3xiavnjp4q957h7nb02rij32byb39")))) (arguments `(#:configure-flags (list (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR=" (assoc-ref %build-inputs "gtk+") "/lib/gtk-2.0/include") (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR=" (assoc-ref %build-inputs "glib") "/lib/glib-2.0/include")) ,@(package-arguments mlt))) (inputs (modify-inputs (package-inputs mlt) (replace "ffmpeg" ffmpeg-4) (replace "gtk+" gtk+-2))))) (define-public v4l-utils (package (name "v4l-utils") (version "1.22.1") (source (origin (method url-fetch) (uri (string-append "https://linuxtv.org/downloads/v4l-utils" "/v4l-utils-" version ".tar.bz2")) (sha256 (base32 "0cafp64b7ylxhjnp47hxm59r0b0v5hc2gc23qh2s2k5463lgpik5")))) (build-system gnu-build-system) ;; Separate graphical tools in order to save almost 1 GiB on the closure ;; for the common case. (outputs '("out" "gui")) (arguments '(#:configure-flags (list "--disable-static" (string-append "--with-udevdir=" (assoc-ref %outputs "out") "/lib/udev")) #:phases (modify-phases %standard-phases (add-after 'install 'split (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) (gui (assoc-ref outputs "gui"))) (mkdir-p (string-append gui "/bin")) (mkdir-p (string-append gui "/share/man/man1")) (mkdir-p (string-append gui "/share/applications")) (for-each (lambda (prog) (for-each (lambda (file) (rename-file (string-append out file) (string-append gui file))) (list (string-append "/bin/" prog) (string-append "/share/man/man1/" prog ".1") (string-append "/share/applications/" prog ".desktop")))) '("qv4l2" "qvidcap")) (copy-recursively (string-append out "/share/icons") (string-append gui "/share/icons")) (delete-file-recursively (string-append out "/share/icons")) (rmdir (string-append out "/share/applications")) #t)))))) (native-inputs (list perl pkg-config)) (inputs (list alsa-lib glu libjpeg-turbo libx11 qtbase-5 eudev)) (synopsis "Realtime video capture utilities for Linux") (description "The v4l-utils provide a series of libraries and utilities to be used for realtime video capture via Linux-specific APIs.") (home-page "https://linuxtv.org/wiki/index.php/V4l-utils") ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only. (license (list license:lgpl2.1+ license:gpl2)))) (define-public obs (package (name "obs") (version "30.1.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/obsproject/obs-studio") (commit version) (recursive? #t))) (file-name (git-file-name name version)) (sha256 (base32 "02pm6397h7l0xhdpscbh1kq8y98zx236z95wvw60kbhq38s0i0ik")) (patches (search-patches "obs-modules-location.patch")))) (build-system cmake-build-system) (arguments (list #:configure-flags #~(list (string-append "-DOBS_VERSION_OVERRIDE=" #$version) "-DENABLE_UNIT_TESTS=ON" "-DENABLE_NEW_MPEGTS_OUTPUT=OFF" "-DENABLE_AJA=OFF" "-DENABLE_QSV11=OFF" ;; Browser plugin requires cef, but it is not packaged yet. ;; "-DBUILD_BROWSER=OFF") #:phases #~(modify-phases %standard-phases (add-after 'install 'wrap-executable (lambda* _ (let ((plugin-path (getenv "QT_PLUGIN_PATH"))) (wrap-program (string-append #$output "/bin/obs") `("QT_PLUGIN_PATH" ":" prefix (,plugin-path)) `("LD_LIBRARY_PATH" ":" prefix (,(string-append #$(this-package-input "vlc") "/lib") ;; TODO: Remove this once our mesa has glvnd support. ,(string-append #$(this-package-input "mesa") "/lib")))))))))) (native-search-paths (list (search-path-specification (variable "OBS_PLUGINS_DIRECTORY") (separator #f) ;single entry (files '("lib/obs-plugins"))) (search-path-specification (variable "OBS_PLUGINS_DATA_DIRECTORY") (separator #f) ;single entry (files '("share/obs/obs-plugins"))))) (native-inputs (list cmocka pkg-config swig)) (inputs (list alsa-lib asio bash-minimal curl eudev ffmpeg fontconfig freetype glib jack-1 jansson libdatachannel libglvnd libva libx264 libxcomposite libxkbcommon luajit mbedtls-lts mesa nlohmann-json pciutils pipewire pulseaudio python qrcodegen-cpp qtbase qtsvg qtwayland speexdsp v4l-utils vulkan-headers vlc wayland wayland-protocols websocketpp zlib)) (synopsis "Live streaming software") (description "Open Broadcaster Software provides a graphical interface for video recording and live streaming. OBS supports capturing audio and video from many input sources such as webcams, X11 (for screencasting), PulseAudio, and JACK.") (home-page "https://obsproject.com") (license license:gpl2+))) (define-public obs-advanced-masks (package (name "obs-advanced-masks") (version "1.1.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/FiniteSingularity/obs-advanced-masks") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0vhilhzdfv0wa8hqz8ffavr272w3d5b75vvldf8rfy9pm5c8xn9n")))) (build-system cmake-build-system) (arguments (list #:modules '((guix build cmake-build-system) (guix build utils)) #:tests? #f ;no tests #:configure-flags #~(list (string-append "-DLIBOBS_INCLUDE_DIR=" #$(this-package-input "obs") "/lib") "-DBUILD_OUT_OF_TREE=On" "-Wno-dev") #:phases #~(modify-phases %standard-phases (add-after 'install 'move-shaders (lambda _ (mkdir-p (string-append #$output "/share/obs/obs-plugins/obs-advanced-masks")) (rename-file (string-append #$output "/data/obs-plugins/obs-advanced-masks/shaders") (string-append #$output "/share/obs/obs-plugins/obs-advanced-masks/shaders"))))))) (inputs (list obs qtbase-5)) (home-page "https://github.com/FiniteSingularity/obs-advanced-masks") (synopsis "Advanced masking plugin for OBS") (description "OBS Advanced Masks is a project designed to expand the masking functionalities within OBS Studio. This plug-in provides filters for users to create intricate and customized masks for their OBS Scenes and Sources. @itemize @item Advanced Masks provides both Alpha Masking and Adjustment Masking. @item Shape masks allow for dynamically generated Rectangle, Circle, Elliptical, Regular Polygon, Star, and Heart shaped masks, with many adjustable parameters. @item Source Masks allow an existing OBS source to be used as a mask, using any combination of the red, green, blue, or alpha channels from said source. @item Image Masks include all of the same functionality as Source Masks, but applied via a static image (.png, .jpeg, etc). @item Gradient Masks allow a fading mask using a user-specified gradient. @end itemize\n") (license license:gpl2))) (define-public obs-composite-blur (package (name "obs-composite-blur") (version "1.1.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/FiniteSingularity/obs-composite-blur") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1mlbc1zi4bp8xwiq0ynjciysqvlbrxa0v5an9hkzsl9vwxgz9jc9")))) (build-system cmake-build-system) (arguments (list #:modules '((guix build cmake-build-system) (guix build utils)) #:tests? #f ;no tests #:configure-flags #~(list (string-append "-DLIBOBS_INCLUDE_DIR=" #$(this-package-input "obs") "/lib") "-DBUILD_OUT_OF_TREE=On" "-Wno-dev") #:phases #~(modify-phases %standard-phases (add-after 'install 'move-shaders (lambda _ (mkdir-p (string-append #$output "/share/obs/obs-plugins/obs-composite-blur")) (rename-file (string-append #$output "/data/obs-plugins/obs-composite-blur/shaders") (string-append #$output "/share/obs/obs-plugins/obs-composite-blur/shaders"))))))) (inputs (list obs qtbase-5)) (home-page "https://github.com/FiniteSingularity/obs-composite-blur") (synopsis "Different blur algorithms for OBS") (description "Composite Blur Plugin is a comprehensive blur plugin that provides blur algorithms and types for all levels of quality and computational need. @itemize @item Composite Blur provides several highly optimized blur algorithms including Gaussian, Multi-Pass Box, Dual Kawase, and Pixelate. @item Composite Blur provides multiple blur effects to give a different look and feel to the blur including Area, Directional, Zoom, Motion, and Tilt-Shift. @item Composite Blur also allows setting a Background Source so that it can properly composite blurred masks, allowing you to properly layer blurred sources. @item Finally, Composite Blur provides an option to mask where and how much blurring occurs on the source via Crop, Rectangle, Circle, Source, and Image masks. @end itemize\n") (license license:gpl2))) (define-public obs-gradient-source (package (name "obs-gradient-source") (version "0.3.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/exeldro/obs-gradient-source") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1s1frbax6md9bvlm4zynp9lab9fmh95xk7dq9b2f8q0rhprnb6g6")))) (build-system cmake-build-system) (arguments (list #:modules '((guix build cmake-build-system) (guix build utils)) #:tests? #f ;no tests #:configure-flags #~(list (string-append "-DLIBOBS_INCLUDE_DIR=" #$(this-package-input "obs") "/lib") "-DBUILD_OUT_OF_TREE=On" "-Wno-dev"))) (inputs (list obs qtbase-5)) (home-page "https://github.com/exeldro/obs-gradient-source") (synopsis "Plugin for adding a gradient Source to OBS Studio") (description "This package provides a plugin for adding a gradient Source to OBS Studio.") (license license:gpl2))) (define-public obs-looking-glass (package (name "obs-looking-glass") (version "B6") (source (origin (method url-fetch) (uri (string-append "https://looking-glass.io/artifact/" version "/source")) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "15d7wwbzfw28yqbz451b6n33ixy50vv8acyzi8gig1mq5a8gzdib")))) (build-system cmake-build-system) (arguments (list #:tests? #f ; no test target #:make-flags #~(list "CC=gcc") #:configure-flags #~(list "-DGLOBAL_INSTALLATION=ON" "-DUSE_CMAKE_LIBDIR=ON" (string-append "-DOBS_PLUGIN_PREFIX=" #$output "/lib/obs-plugins")) #:phases #~(modify-phases %standard-phases (add-before 'configure 'chdir-to-source (lambda* (#:key outputs #:allow-other-keys) (chdir "obs") #t)) (add-after 'chdir-to-source 'substitute-output (lambda* (#:key outputs #:allow-other-keys) (substitute* "CMakeLists.txt" (("\\$\\{OBS_PLUGIN_PREFIX\\}/\\$\\{CMAKE_PROJECT_NAME\\}/bin/\\$\\{OBS_PLUGIN_DIR\\}") (string-append (string-append #$output "/lib/obs-plugins")))) #t))))) (native-inputs (list libconfig nettle pkg-config)) (inputs (list bash-minimal fontconfig freetype glu gmp libglvnd libiberty libx11 libxcursor libxfixes libxi libxinerama libxkbcommon libxpresent libxrandr libxscrnsaver mesa obs openssl sdl2 sdl2-ttf spice-protocol wayland wayland-protocols `(,zlib "static"))) (home-page "https://looking-glass.io/") (synopsis "Looking Glass video feed to OBS as a video source") (description "This OBS plugin allows a Looking Glass video feed to OBS as a video source with the included OBS plugin. This provides a lower-latency alternative to capturing the Looking Glass client window with a Screen or Window Capture source. This may help improve your viewers watching experience, and allows you to use your host privately.") (license license:gpl2+))) (define-public kvmfr-linux-module (package (name "kvmfr-linux-module") (version "B6") (source (origin (method url-fetch) (uri (string-append "https://looking-glass.io/artifact/" version "/source")) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "15d7wwbzfw28yqbz451b6n33ixy50vv8acyzi8gig1mq5a8gzdib")) (patches (search-patches "kvmfr-linux-module-fix-build.patch")))) (build-system linux-module-build-system) (inputs (list bash-minimal)) (arguments (list #:tests? #f ;there are none. #:source-directory "module")) (home-page "https://looking-glass.io/") (synopsis "Linux Kernel module to interface with Looking Glass") (description "This kernel module implements a basic interface to the IVSHMEM device for Looking Glass.") (license license:gpl2+))) (define-public obs-move-transition (package (name "obs-move-transition") (version "3.0.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/exeldro/obs-move-transition") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "0kni1a8zqqbgx5mmaw4k4chswsy0i9qk89zcbg58mvspz9zzv4id")))) (build-system cmake-build-system) (arguments (list #:modules '((guix build cmake-build-system) (guix build utils)) #:tests? #f ;no tests #:configure-flags #~(list (string-append "-DLIBOBS_INCLUDE_DIR=" #$(this-package-input "obs") "/lib") "-DBUILD_OUT_OF_TREE=On" "-Wno-dev"))) (inputs (list obs qtbase-5)) (home-page "https://github.com/exeldro/obs-move-transition") (synopsis "Move transition for OBS Studio") (description "Plugin for OBS Studio to move source to a new position during scene transition.") (license license:gpl2))) (define-public obs-multi-rtmp (package (name "obs-multi-rtmp") (version "0.3.0.2-OBS29.1.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/sorayuki/obs-multi-rtmp") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "192zkihn3ahh93fn3mkpbx7apa04lmcxc637hpxwkivdjbq3nbk3")))) (build-system cmake-build-system) (arguments (list #:modules '((guix build cmake-build-system) (guix build utils)) #:tests? #f ;no tests #:configure-flags #~(list (string-append "-DLIBOBS_INCLUDE_DIR=" #$(this-package-input "obs") "/lib") "-DBUILD_OUT_OF_TREE=On" "-Wno-dev") #:phases #~(modify-phases %standard-phases (add-after 'install 'obs-plugins (lambda* (#:key outputs #:allow-other-keys) (mkdir-p (string-append #$output "/lib/obs-plugins")) (symlink (string-append #$output "/obs-plugins/64bit/obs-multi-rtmp.so") (string-append #$output "/lib/obs-plugins/obs-multi-rtmp.so"))))))) (inputs (list obs qtbase-5)) (home-page "https://github.com/sorayuki/obs-multi-rtmp") (synopsis "Multi-site simultaneous broadcast plugin for OBS Studio") (description "This is a plugin to streaming to multiple RTMP servers concurrently. It's able to share encoders with main output of OBS to save CPU power. It can also use standalone encoders with basic configuration (bitrate).") (license license:gpl2))) (define-public obs-pipewire-audio-capture (package (name "obs-pipewire-audio-capture") (version "1.1.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/dimtpap/obs-pipewire-audio-capture") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "0qjl8xlaf54zgz34f1dfybdg2inc2ir42659kh15ncihpgbx0wzl")))) (build-system cmake-build-system) (arguments (list #:tests? #f ; no test target #:configure-flags #~(list (string-append "-DLIBOBS_INCLUDE_DIR=" #$(this-package-input "obs") "/lib") "-Wno-dev"))) (native-inputs (list libconfig pkg-config)) (inputs (list obs pipewire)) (home-page "https://obsproject.com/forum/resources/pipewire-audio-capture.1458/") (synopsis "Audio device and application capture for OBS Studio using PipeWire") (description "This plugin adds 3 sources for capturing audio outputs, inputs and applications using PipeWire.") (license license:gpl2+))) (define-public obs-shaderfilter (package (name "obs-shaderfilter") (version "2.0.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/exeldro/obs-shaderfilter") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1kqa8323gcnyqjcya4ynhwvd38y0xsxvxndzndpmg18q88svyiq8")))) (build-system cmake-build-system) (arguments (list #:modules '((guix build cmake-build-system) (guix build utils)) #:tests? #f ;no tests #:configure-flags #~(list (string-append "-DLIBOBS_INCLUDE_DIR=" #$(this-package-input "obs") "/lib") "-DBUILD_OUT_OF_TREE=On" "-Wno-dev") #:phases #~(modify-phases %standard-phases (add-after 'install 'fix-effects (lambda _ (for-each (lambda (directory) (mkdir-p (string-append #$output "/share/obs/obs-plugins/obs-shaderfilter")) (rename-file (string-append #$output "/data/obs-plugins/obs-shaderfilter/" directory) (string-append #$output "/share/obs/obs-plugins/obs-shaderfilter/" directory))) '("examples" "textures"))))))) (inputs (list obs qtbase-5)) (home-page "https://github.com/exeldro/obs-shaderfilter") (synopsis "OBS filter for applying an arbitrary shader to a source") (description "Plugin for OBS Studio which is intended to allow users to apply their own shaders to OBS sources. This theoretically makes possible some simple effects like drop shadows that can be implemented strictly in shader code.") (license license:gpl2))) (define-public obs-source-clone (package (name "obs-source-clone") (version "0.1.5") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/exeldro/obs-source-clone") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1rw0qknlkljzn4rk41g2jjnf113vald5k7kpvxvz0mpaywa6vc6j")))) (build-system cmake-build-system) (arguments (list #:modules '((guix build cmake-build-system) (guix build utils)) #:tests? #f ;no tests #:configure-flags #~(list (string-append "-DLIBOBS_INCLUDE_DIR=" #$(this-package-input "obs") "/lib") "-DBUILD_OUT_OF_TREE=On" "-Wno-dev"))) (inputs (list obs qtbase-5)) (home-page "https://github.com/exeldro/obs-source-clone") (synopsis "Plugin for OBS Studio to clone sources") (description "Add source to OBS that lets you clone sources to allow different filters than the original.") (license license:gpl2))) (define-public obs-source-copy (package (name "obs-source-copy") (version "0.2.4") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/exeldro/obs-source-copy") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1l3ls3j57yh03vkwiah6yj1xnnmq7q2ngjjn1k4h1sqqk0dxn86j")))) (build-system cmake-build-system) (arguments (list #:tests? #f ;no tests #:configure-flags #~(list (string-append "-DLIBOBS_INCLUDE_DIR=" #$(this-package-input "obs") "/lib") "-DBUILD_OUT_OF_TREE=On" "-Wno-dev"))) (inputs (list obs qtbase-5)) (home-page "https://github.com/exeldro/obs-source-copy") (synopsis "OBS plugin for copy and paste scenes, sources and filters") (description "This package provides an OBS plugin for copy and paste scenes, sources and filters.") (license license:gpl2))) (define-public obs-source-record (package (name "obs-source-record") (version "0.3.4") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/exeldro/obs-source-record") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "07yglklrjn3nkyw8755nwchcfgvyw7d0n4qynvja8s7rgqbbs0an")))) (build-system cmake-build-system) (arguments (list #:tests? #f ;no tests #:configure-flags #~(list (string-append "-DLIBOBS_INCLUDE_DIR=" #$(this-package-input "obs") "/lib") "-DBUILD_OUT_OF_TREE=On" "-Wno-dev"))) (inputs (list obs)) (home-page "https://github.com/exeldro/obs-source-record") (synopsis "OBS plugin for recording sources via a filter") (description "This package provides an OBS plugin for recording sources via a filter.") (license license:gpl2))) (define-public obs-websocket ;; Functionality was merged into OBS. (deprecated-package "obs-websocket" obs)) (define-public obs-wlrobs (package (name "obs-wlrobs") (version "1.1") (source (origin (method hg-fetch) (uri (hg-reference (url "https://hg.sr.ht/~scoopta/wlrobs") (changeset (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1whdb2ykisz50qw19nv1djw5qp17rpnpkc8s8470ja8iz894mmwd")))) (build-system meson-build-system) (native-inputs (list pkg-config)) (propagated-inputs `() ) (inputs (list obs `(,libx11 "out") wayland wayland-protocols)) (home-page "https://hg.sr.ht/~scoopta/wlrobs") (synopsis "OBS plugin for Wayland (wlroots) screen capture") (description "This OBS plugin allows you to capture the screen on wlroots-based Wayland compositors.") (license license:gpl3+))) (define-public obs-vkcapture (package (name "obs-vkcapture") (version "1.5.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/nowrep/obs-vkcapture") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "00a69rg1inkssccqmwp1j85vrw17j2k6d5pidvzfdq94vvad10w5")))) (build-system cmake-build-system) (arguments '(#:tests? #f)) ;no tests (native-inputs (list pkg-config)) (inputs (list mesa obs libx11 libxcb vulkan-headers vulkan-loader wayland)) (home-page "https://github.com/nowrep/obs-vkcapture") (synopsis "OBS plugin for Vulkan/OpenGL game capture on Linux") (description "This OBS plugin lets you record an OpenGL or Vulkan game by adding the Game Capture source to your scene and starting an application with @code{obs-gamecapture}.") (license license:gpl2))) (define-public libvdpau (package (name "libvdpau") (version "1.5") (source (origin (method git-fetch) (uri (git-reference (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1zfbh5q9adzlydpgwq7hl5w1j2b29j7zns6dxf9fp9pvkj23fz5l")))) (build-system meson-build-system) (native-inputs (list pkg-config)) (inputs (list `(,libx11 "out") libxext xorgproto)) (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/") (synopsis "Video Decode and Presentation API") (description "VDPAU is the Video Decode and Presentation API for UNIX. It provides an interface to video decode acceleration and presentation hardware present in modern GPUs.") (license (license:x11-style "file://COPYING")))) (define-public vdpauinfo (package (name "vdpauinfo") (version "1.5") (source (origin (method git-fetch) (uri (git-reference (url "https://gitlab.freedesktop.org/vdpau/vdpauinfo") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "01nkk8rixzvicrg0cr90mbxyd4vdyd0739ipywn0mx56xddambmx")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases (replace 'bootstrap ;; ./autogen.sh runs ./configure too soon. (lambda _ (invoke "autoreconf" "-fiv")))))) (native-inputs (list autoconf automake libx11 pkg-config)) (propagated-inputs (list libvdpau)) (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/") (synopsis "Tool to query the capabilities of a VDPAU implementation") (description "Vdpauinfo is a tool to query the capabilities of a VDPAU implementation.") (license (license:x11-style "file://COPYING")))) (define-public libvdpau-va-gl (package (name "libvdpau-va-gl") (version "0.4.2") (source (origin (method url-fetch) (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/" "releases/download/v" version "/libvdpau-va-gl-" version ".tar.gz")) (sha256 (base32 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx")) (patches (search-patches "libvdpau-va-gl-unbundle.patch")) (modules '((guix build utils))) (snippet '(begin (delete-file-recursively "3rdparty") #t)))) (build-system cmake-build-system) (arguments '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support. (native-inputs (list libvdpau pkg-config)) (inputs (list libva mesa)) (home-page "https://github.com/i-rinat/libvdpau-va-gl") (synopsis "VDPAU driver with VA-API/OpenGL backend") (description "Many applications can use VDPAU to accelerate portions of the video decoding process and video post-processing to the GPU video hardware. Since there is no VDPAU available on Intel chips, they fall back to different drawing techniques. This driver uses OpenGL under the hood to accelerate drawing and scaling and VA-API (if available) to accelerate video decoding.") (license license:expat))) (define-public recordmydesktop (package (name "recordmydesktop") (version "0.4.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/Enselic/" name "/releases/download/v" version "/recordmydesktop-" version ".tar.gz")) (sha256 (base32 "17kjgmkl45zma64a5dg1hyvnjkzk4vl8milgi6ic7hlsbmywpig7")))) (build-system gnu-build-system) (inputs (list popt zlib libx11 libice libsm libxfixes libxdamage libxext alsa-lib libvorbis libtheora)) (home-page "https://enselic.github.io/recordmydesktop/") (synopsis "Desktop session video recorder") (description "recordMyDesktop is a command-line tool that captures the activity in your graphical desktop and encodes it as a video. This is a useful tool for making @dfn{screencasts}.") (license license:gpl2+))) (define-public simplescreenrecorder (package (name "simplescreenrecorder") (version "0.4.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/MaartenBaert/ssr") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1dzp5yzqlha65crzklx2qlan6ssw1diwzfpc4svd7gnr858q2292")))) (build-system cmake-build-system) ;; Although libx11, libxfixes, libxext are listed as build dependencies in ;; README.md, the program builds and functions properly without them. ;; As a result, they are omitted. Please add them back if problems appear. (inputs (list alsa-lib ffmpeg-4 glu jack-1 libxi libxinerama pulseaudio qtbase-5 qtx11extras)) (native-inputs (list pkg-config)) (arguments `(#:configure-flags (list "-DWITH_QT5=TRUE") #:tests? #f)) ; no test suite ;; Using HTTPS causes part of the page to be displayed improperly. (home-page "https://www.maartenbaert.be/simplescreenrecorder/") (synopsis "Screen recorder") (description "SimpleScreenRecorder is an easy to use screen recorder with a graphical user interface. It supports recording the entire screen, or a part of it, and allows encoding in many different codecs and file formats. Other features include a live preview and live streaming.") (license (list license:gpl3+ ; most files license:zlib ; glinject/elfhacks.* license:isc ; glinject/* license:x11)))) ; build-aux/install-sh (define-public libsmpeg (package (name "libsmpeg") (version "0.4.5-401") (source (origin (method svn-fetch) (uri (svn-reference (url "svn://svn.icculus.org/smpeg/trunk/") (revision 401))) ; last revision before smpeg2 (for SDL 2.0) (file-name (string-append name "-" version "-checkout")) (sha256 (base32 "1srzyjks9s0g4k7ms8vc0hjby2g6shndnr552hl63pn90sgmwxs9")))) (build-system gnu-build-system) (arguments ;; libsmpeg fails to build with -std=c++11, which is the default with ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack. '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03"))) (native-inputs (list autoconf automake)) (inputs `(("sdl" ,sdl2))) (home-page "https://icculus.org/smpeg/") (synopsis "SDL MPEG decoding library") (description "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library with sound support. Video playback is based on the ubiquitous Berkeley MPEG player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video, and MPEG system streams.") (license (list license:expat license:lgpl2.1 license:lgpl2.1+ license:gpl2)))) ;; for btanks (define-public libsmpeg-with-sdl1 (package (inherit libsmpeg) (name "libsmpeg") (version "0.4.5-399") (source (origin (method svn-fetch) (uri (svn-reference (url "svn://svn.icculus.org/smpeg/trunk/") (revision 399))) ; tagged release 0.4.5 (file-name (string-append name "-" version "-checkout")) (sha256 (base32 "1jy9xqykhwfg8in0fxjcqcvwazii1ckzs39wp749b926q7ny5bwy")))) (inputs (list sdl)))) (define-public libbdplus (package (name "libbdplus") (version "0.2.0") (source (origin (method url-fetch) (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/" version "/" name "-" version ".tar.bz2")) (sha256 (base32 "0n0ayjq2ld7lfhrfcdj9bam96m2hih34phyjan8nwggkmqzflgmr")))) (build-system gnu-build-system) (inputs (list libgcrypt)) (home-page "https://www.videolan.org/developers/libbdplus.html") (synopsis "Library for decrypting certain Blu-Ray discs") (description "libbdplus is a library which implements the BD+ System specifications.") (license license:lgpl2.1+))) (define-public libaacs (package (name "libaacs") (version "0.11.0") (source (origin (method url-fetch) (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/" version "/libaacs-" version ".tar.bz2")) (sha256 (base32 "11skjqjlldmbjkyxdcz4fmcn6y4p95r1xagbcnjy4ndnzf0l723d")))) (inputs (list libgcrypt)) (native-inputs (list bison flex)) (build-system gnu-build-system) (home-page "https://www.videolan.org/developers/libaacs.html") (synopsis "Library for decrypting certain Blu-Ray discs") (description "libaacs is a library which implements the Advanced Access Content System specification.") (license license:lgpl2.1+))) (define-public mps-youtube (package (name "mps-youtube") (version "0.2.8") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/mps-youtube/mps-youtube") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y")))) (build-system python-build-system) (arguments ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the ;; test suite results differ depending on the country and also introduce ;; non-determinism in the tests. ;; https://github.com/mps-youtube/mps-youtube/issues/556 '(#:tests? #f #:phases (modify-phases %standard-phases ;; Loading this as a library will create cache directories, ;; etc; which fails in the build container. (delete 'sanity-check)))) (propagated-inputs (list python-pafy python-pygobject)) ; For mpris2 support (home-page "https://github.com/mps-youtube/mps-youtube") (synopsis "Terminal based YouTube player and downloader") (description "@code{mps-youtube} is based on mps, a terminal based program to search, stream and download music. This implementation uses YouTube as a source of content and can play and download video as well as audio. It can use either mpv or mplayer for playback, and for conversion of formats ffmpeg or libav is used. Users should install one of the supported players in addition to this package.") (license license:gpl3+))) (define-public handbrake (package (name "handbrake") (version "1.5.1") (source (origin (method url-fetch) (uri (string-append "https://github.com/HandBrake/HandBrake/" "releases/download/" version "/" "HandBrake-" version "-source.tar.bz2")) (sha256 (base32 "1w1hjj6gvdydypw4mdn281w0x163is59cfm7k6bq371hsl3gx69r")) (modules '((guix build utils))) (snippet ;; Remove "contrib" and source not necessary for ;; building/running under a GNU environment. '(begin (for-each delete-file-recursively '("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp. (substitute* "make/include/main.defs" ;; Disable unconditional inclusion of "contrib" libraries ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray), ;; which would lead to fetching and building of these ;; libraries. Use our own instead. (("MODULES \\+= contrib") "# MODULES += contrib")))))) (build-system glib-or-gtk-build-system) (native-inputs `(("automake" ,automake) ; GUI subpackage must be bootstrapped ("autoconf" ,autoconf) ("intltool" ,intltool) ("libtool" ,libtool) ("pkg-config" ,pkg-config) ("python" ,python-2))) ; For configuration (inputs `(("bzip2" ,bzip2) ("dbus-glib" ,dbus-glib) ("ffmpeg" ,ffmpeg-4) ("fontconfig" ,fontconfig) ("freetype" ,freetype) ("glib" ,glib) ("gstreamer" ,gstreamer) ("gst-plugins-base" ,gst-plugins-base) ("gtk+" ,gtk+) ("jansson" ,jansson) ("lame" ,lame) ("libass" ,libass) ("libbluray" ,libbluray) ("libdav1d" ,dav1d) ("libdvdnav" ,libdvdnav) ("libdvdread" ,libdvdread) ("libgudev" ,libgudev) ("libjpeg-turbo" ,libjpeg-turbo) ("libmpeg2" ,libmpeg2) ("libnotify" ,libnotify) ("libnuma" ,numactl) ("libogg" ,libogg) ("libopus" ,opus) ("libsamplerate" ,libsamplerate) ("libtheora" ,libtheora) ("libvorbis" ,libvorbis) ("libvpx" ,libvpx) ("libxml2" ,libxml2) ("libx264" ,libx264) ("speex" ,speex) ("x265" ,x265) ("zimg" ,zimg) ("zlib" ,zlib))) (arguments `(#:tests? #f ;tests require Ruby and claim to be unsupported #:configure-flags (list "--disable-gtk-update-checks" "--disable-nvenc" (string-append "CPPFLAGS=-I" (assoc-ref %build-inputs "libxml2") "/include/libxml2") "LDFLAGS=-lx265") #:phases (modify-phases %standard-phases (replace 'bootstrap ;; Run bootstrap ahead of time so that shebangs get patched. (lambda _ (setenv "CONFIG_SHELL" (which "sh")) ;; Patch the Makefile so that it doesn't bootstrap again. (substitute* "gtk/module.rules" ((".*autoreconf.*") "")) (with-directory-excursion "gtk" (invoke "autoreconf" "-fiv")))) (add-before 'configure 'patch-SHELL (lambda _ (substitute* "gtk/po/Makefile.in.in" (("SHELL = /bin/sh") "SHELL = @SHELL@")))) (add-before 'configure 'relax-reqs (lambda _ (substitute* "make/configure.py" ;; cmake is checked for so that it can be used to build ;; contrib/harfbuzz and contrib/x265, but we get these as ;; inputs, so don't abort if it's not found. Similarly, meson ;; and ninja are only needed for contrib/libdav1d, and nasm ;; only for libvpx (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &) (string-append & "False"))))) (replace 'configure (lambda* (#:key outputs configure-flags #:allow-other-keys) ;; 'configure' is not an autoconf-generated script, and ;; errors on unrecognized arguments, ;; e.g. --enable-fast-install (let ((out (assoc-ref outputs "out"))) (apply invoke "./configure" (string-append "--prefix=" out) (or configure-flags '()))))) (add-after 'configure 'chdir-build (lambda _ (chdir "./build")))))) (home-page "https://handbrake.fr") (synopsis "Video transcoder") (description "HandBrake is a tool for converting video from any format to a selection of modern, widely supported codecs.") ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3. ;; Combination under GPLv2. See LICENSE. (license license:gpl2))) (define-public h264bitstream ;; Used as submodule in https://github.com/moonlight-stream/moonlight-qt (let ((commit "ae72f7395f328876199a7e928d3b4a6dc6a7ce14") (revision "1")) (package (name "h264bitstream") (version (git-version "0.2.0" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/aizvorski/h264bitstream") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "0pqzfzkgqk5zjh5ywc7l7mffs2vh6wlzssvq2jxildygvqxs3pjp")))) (build-system gnu-build-system) (arguments (list #:tests? #f ;no test suite #:phases #~(modify-phases %standard-phases (add-after 'install 'fix-include-bs-h (lambda _ (symlink (string-append #$output "/include/h264bitstream/bs.h") (string-append #$output "/include/bs.h"))))))) (native-inputs (list autoconf automake libtool pkg-config)) (inputs (list ffmpeg)) (synopsis "Library to read and write H.264 video bitstreams") (description "This package provides the GameStream code shared between Moonlight clients.") (home-page "https://github.com/aizvorski/h264bitstream") (license license:lgpl2.1+)))) (define-public intel-vaapi-driver (package (name "intel-vaapi-driver") (version "2.4.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/intel/intel-vaapi-driver") (commit version))) (sha256 (base32 "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (native-inputs (list autoconf automake libtool pkg-config)) (inputs (list libdrm libva libx11)) (arguments `(#:phases (modify-phases %standard-phases (add-before 'configure 'set-target-directory (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri")) #t)))))) ;; XXX Because of , we need to add ;; this to all VA-API back ends instead of once to libva. (native-search-paths (list (search-path-specification (variable "LIBVA_DRIVERS_PATH") (files '("lib/dri"))))) (supported-systems '("i686-linux" "x86_64-linux")) (home-page "https://01.org/linuxmedia/vaapi") (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices") (description "This is the @acronym{VA-API, Video Acceleration API} back end required for hardware-accelerated video processing on Intel GEN Graphics devices supported by the i915 driver, such as integrated Intel HD Graphics. It provides access to both hardware and shader functionality for faster encoding, decoding, and post-processing of video formats like MPEG2, H.264/AVC, and VC-1.") (license (list license:bsd-2 ; src/gen9_vp9_const_def.c license:expat)))) ; the rest, excluding the test suite (define-public openh264 (package (name "openh264") (version "2.3.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/cisco/openh264") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1yr6nsjpnazq4z6dvjfyanljwgwnyjh3ddxa0sq6hl9qc59yq91r")))) (build-system gnu-build-system) (native-inputs (list nasm python)) (arguments (list #:make-flags #~(list (string-append "PREFIX=" #$output) "CC=gcc") #:test-target "test" #:phases #~(modify-phases %standard-phases ;; no configure script (delete 'configure)))) (home-page "https://www.openh264.org/") (synopsis "H264 decoder library") (description "Openh264 is a library which can decode H264 video streams.") (license license:bsd-2))) (define-public libmp4v2 (package (name "libmp4v2") (version "2.0.0") (source (origin (method url-fetch) ;; XXX: The new location of upstream is uncertain and will become relevant the ;; moment when the googlecode archive shuts down. It is past the date it ;; should've been turned off. I tried to communicate with upstream, but this ;; wasn't very responsive and not very helpful. The short summary is, it is ;; chaos when it comes to the amount of forks and only time will tell where ;; the new upstream location is. (uri (string-append "https://storage.googleapis.com/google-" "code-archive-downloads/v2/" "code.google.com/mp4v2/mp4v2-" version ".tar.bz2")) (file-name (string-append name "-" version ".tar.bz2")) (patches (search-patches "libmp4v2-c++11.patch")) (sha256 (base32 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683")))) (build-system gnu-build-system) (outputs '("out" "static")) ; 3.7MiB .a file (arguments `(;; Build as C++2003 to avoid C++11 "narrowing conversion" errors. #:configure-flags '("CXXFLAGS=-O2 -g -std=c++03") #:phases (modify-phases %standard-phases (add-after 'unpack 'remove-dates (lambda _ ;; Make the build reproducible. (substitute* "configure" (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"") (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\"")) #t)) (add-after 'install 'move-static-libraries (lambda* (#:key outputs #:allow-other-keys) ;; Move static libraries to the "static" output. (let* ((out (assoc-ref outputs "out")) (lib (string-append out "/lib")) (static (assoc-ref outputs "static")) (slib (string-append static "/lib"))) (mkdir-p slib) (for-each (lambda (file) (install-file file slib) (delete-file file)) (find-files lib "\\.a$")) #t)))))) (native-inputs (list help2man dejagnu)) (home-page "https://code.google.com/archive/p/mp4v2/") (synopsis "API to create and modify mp4 files") (description "The MP4v2 library provides an API to create and modify mp4 files as defined by ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime file format that has been used as a multimedia file format in a variety of platforms and applications. It is a very powerful and extensible format that can accommodate practically any type of media.") (license license:mpl1.1))) (define-public libmediainfo (package (name "libmediainfo") (version "23.11") (source (origin (method url-fetch) (uri (string-append "https://mediaarea.net/download/source/" name "/" version "/" name "_" version ".tar.xz")) (sha256 (base32 "0gc5brnwagdgaknkpyhkbpwc52q19vf5i3sayifhsg4yqzy58zhr")))) ;; TODO add a Big Buck Bunny webm for tests. (native-inputs (list autoconf automake libtool pkg-config)) (propagated-inputs (list zlib tinyxml2 curl ; In Requires.private of libmediainfo.pc. libzen)) (build-system gnu-build-system) (arguments '(#:tests? #f ; see above TODO #:configure-flags (list "--with-libcurl" "--with-libtinyxml2") #:phases ;; build scripts not in root of archive (modify-phases %standard-phases (add-after 'unpack 'change-to-build-dir (lambda _ (chdir "Project/GNU/Library") ;; XXX Add a shebang to the script to avoid an error like: ;; "In execvp of ./autogen.sh: Exec format error" ;; The string replaced is just a code comment. ;; See the similar substitution made in mediainfo. (substitute* "autogen.sh" (("#libtoolize") "#!/bin/sh")) #t))))) (home-page "https://mediaarea.net/en/MediaInfo") (synopsis "Library for retrieving media metadata") (description "MediaInfo is a library used for retrieving technical information and other metadata about audio or video files. A non-exhaustive list of the information MediaInfo can retrieve from media files include: @itemize @item General: title, author, director, album, track number, date, duration... @item Video: codec, aspect, fps, bitrate... @item Audio: codec, sample rate, channels, language, bitrate... @item Text: language of subtitle @item Chapters: number of chapters, list of chapters @end itemize MediaInfo supports the following formats: @itemize @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1, MPEG-2, MPEG-4, DVD (VOB)... @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...) @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF... @item Subtitles: SRT, SSA, ASS, SAMI... @end itemize\n") (license license:bsd-2))) ;; TODO also have a GUI version available (define-public mediainfo (package (name "mediainfo") (version "23.11") (source (origin (method url-fetch) ;; Warning: This source has proved unreliable 1 time at least. ;; Consider an alternate source or report upstream if this ;; happens again. (uri (string-append "https://mediaarea.net/download/source/" name "/" version "/" name "_" version ".tar.xz")) (sha256 (base32 "1hy9m2l94ymhpcrhlqqjpgl24lz33qm239pcdlic3z5zs6qb2740")))) (native-inputs (list autoconf automake libtool pkg-config)) (inputs (list libmediainfo)) (build-system gnu-build-system) (arguments '(#:tests? #f ; lacks tests #:phases ;; build scripts not in root of archive (modify-phases %standard-phases (add-after 'unpack 'change-to-build-dir (lambda _ (chdir "Project/GNU/CLI") ;; XXX Add a shebang to the script to avoid an error like: ;; "In execvp of ./autogen.sh: Exec format error" ;; The string replaced is just a code comment. ;; See the similar substitution made in libmediainfo. (substitute* "autogen.sh" (("#libtoolize") "#!/bin/sh")) #t))))) (home-page "https://mediaarea.net/en/MediaInfo") (synopsis "Utility for reading media metadata") (description "MediaInfo is a utility used for retrieving technical information and other metadata about audio or video files. It supports the many codecs and formats supported by libmediainfo.") (license license:bsd-2))) (define-public atomicparsley (package (name "atomicparsley") (version "20200701.154658.b0d6223") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/wez/atomicparsley") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1kym2l5y34nmbrrlkfmxsf1cwrvch64kb34jp0hpa0b89idbhwqh")))) (build-system cmake-build-system) (arguments `(#:tests? #f ;; no tests included #:phases (modify-phases %standard-phases (add-before 'configure 'set-cmake-version (lambda* _ (substitute* "CMakeLists.txt" ;; At the time of writing, Guix has CMake at 3.16, but ;; AtomicParsley uses 3.17. This brings the required CMake ;; version down to what Guix can afford. (("VERSION 3.17") "VERSION 3.16")) #t)) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin"))) (install-file "AtomicParsley" bin)) #t))))) (inputs (list zlib)) (synopsis "Metadata editor for MPEG-4 files") (description "AtomicParsley is a lightweight command line program for reading, parsing and setting metadata into MPEG-4 files, in particular, iTunes-style metadata.") (home-page "https://github.com/wez/atomicparsley") (license license:gpl2+))) (define-public livemedia-utils (package (name "livemedia-utils") (version "2020.11.19") (source (origin (method url-fetch) (uri (string-append "https://download.videolan.org/contrib/live555/live." version ".tar.gz")) (sha256 (base32 "16w6yxdbmjdhvffnrb752dn4llf3l0wb00dgdkyia0vqsv2qqyn7")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests #:make-flags (list (string-append "CC=" ,(cc-for-target)) (string-append "CXX=" ,(cxx-for-target)) (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib") (string-append "PREFIX=" (assoc-ref %outputs "out"))) #:phases (modify-phases %standard-phases (add-before 'configure 'fix-makefiles-generation (lambda _ (substitute* "genMakefiles" (("/bin/rm") "rm")) #t)) (replace 'configure (lambda _ (invoke "./genMakefiles" "linux-with-shared-libraries")))))) (inputs (list openssl)) (home-page "http://www.live555.com/liveMedia/") (synopsis "Set of C++ libraries for multimedia streaming") (description "This code forms a set of C++ libraries for multimedia streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or JPEG video, and several audio codecs. They can easily be extended to support additional (audio and/or video) codecs, and can also be used to build basic RTSP or SIP clients and servers.") (license license:lgpl3+))) (define-public libdvbpsi (package (name "libdvbpsi") (version "1.3.3") (source (origin (method url-fetch) (uri (string-append "https://download.videolan.org/pub/libdvbpsi/" version "/libdvbpsi-" version ".tar.bz2")) (sha256 (base32 "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82")))) (build-system gnu-build-system) (home-page "https://www.videolan.org/developers/libdvbpsi.html") (synopsis "Library for decoding and generation of MPEG TS and DVB PSI tables") (description "libdvbpsi is a simple library designed for decoding and generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s and ITU-T H.222.0.") (license license:lgpl2.1))) (define-public ffms2 (package (name "ffms2") (version "2.23") (home-page "https://github.com/FFMS/ffms2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/FFMS/ffms2") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5")))) (build-system gnu-build-system) (arguments '(#:configure-flags (list "--enable-avresample"))) (inputs (list zlib)) (propagated-inputs (list ffmpeg-4)) (native-inputs (list pkg-config)) (synopsis "Cross-platform wrapper around ffmpeg/libav") (description "FFMpegSource is a wrapper library around ffmpeg/libav that allows programmers to access a standard API to open and decompress media files.") ;; sources are distributed under a different license that the binary. ;; see https://github.com/FFMS/ffms2/blob/master/COPYING (license license:gpl2+))); inherits from ffmpeg (define-public aegisub (package (name "aegisub") (version "3.2.2") (source (origin (method url-fetch) (uri (string-append "https://github.com/Aegisub/Aegisub/releases/download/v" version "/aegisub-" version ".tar.xz")) (sha256 (base32 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5")) (patches (search-patches "aegisub-icu59-include-unistr.patch" "aegisub-make43.patch" "aegisub-boost68.patch" "aegisub-boost81.patch")))) (build-system gnu-build-system) (arguments `(#:configure-flags (list "--disable-update-checker" "--without-portaudio" "--without-openal" "--without-oss" "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1") ;; tests require busted, a lua package we don't have yet #:tests? #f #:phases (modify-phases %standard-phases (add-before 'configure 'fix-ldflags (lambda _ (setenv "LDFLAGS" "-pthread") #t)) (add-after 'unpack 'fix-boost-headers (lambda _ (substitute* '("src/subtitles_provider_libass.cpp" "src/colour_button.cpp" "src/video_provider_dummy.cpp" "./src/video_frame.cpp") (("#include ") "#include ")) #t))))) (inputs (list boost ffms2 fftw hunspell mesa libass alsa-lib pulseaudio libx11 freetype wxwidgets-gtk2)) (native-inputs (list intltool desktop-file-utils pkg-config)) (home-page "https://www.aegisub.org/") (synopsis "Subtitle engine") (description "Aegisub is a tool for creating and modifying subtitles. Aegisub makes it quick and easy to time subtitles to audio, and features many powerful tools for styling them, including a built-in real-time video preview.") (license (list license:bsd-3 ; the package is licensed under the bsd-3, except license:mpl1.1 ; for vendor/universalchardet under the mpl1.1 license:expat)))) ; and src/gl that is under a license similar ; the the Expat license, with a rewording (Software -> Materials). (called MIT ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author (define-public pitivi (package (name "pitivi") (version "2022.06.0") (source (origin (method git-fetch) (uri (git-reference (url "https://gitlab.gnome.org/GNOME/pitivi.git") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1wgfi8srblqzd2y6528cyvn56rbdxpwlq0wmwqhabshdk28zyx8d")))) (build-system meson-build-system) (native-inputs (list gettext-minimal `(,glib "bin") itstool pkg-config)) (inputs (list bash-minimal glib gst-editing-services gstreamer gst-plugins-base gst-plugins-good ;; TODO: Add the 'cvtracker' plugin after our gstreamer packages ;; has been upgraded to version 1.20. (gst-plugins/selection gst-plugins-bad #:plugins '("debugutils" "transcode") #:configure-flags #~'("-Dintrospection=enabled")) gst-libav gsound gtk+ libpeas libnotify pango python python-gst python-librosa python-numpy python-matplotlib python-pycairo python-pygobject)) ;; Propagate librsvg so that is is registered in GDK_PIXBUF_MODULE_FILE, ;; otherwise pitivi fails to launch. (propagated-inputs (list (librsvg-for-system))) (arguments `(#:glib-or-gtk? #t #:phases (modify-phases %standard-phases (add-after 'glib-or-gtk-wrap 'wrap-other-dependencies (lambda* (#:key outputs #:allow-other-keys) (wrap-program (search-input-file outputs "bin/pitivi") `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH"))) `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))) ;; We've only added inputs for what Pitivi deems either ;; necessary or optional. Let the user's packages take ;; precedence in case they have e.g. the full gst-plugins-bad. `("GST_PLUGIN_SYSTEM_PATH" suffix (,(getenv "GST_PLUGIN_SYSTEM_PATH"))))))))) (home-page "https://www.pitivi.org") (synopsis "Video editor based on GStreamer Editing Services") (description "Pitivi is a video editor built upon the GStreamer Editing Services. It aims to be an intuitive and flexible application that can appeal to newbies and professionals alike.") (license license:lgpl2.1+))) (define-public gavl (package (name "gavl") (version "1.4.0") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/gmerlin/" name "/" version "/" name "-" version ".tar.gz")) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji")))) (build-system gnu-build-system) (arguments '(#:configure-flags '("LIBS=-lm"))) (native-inputs (list pkg-config doxygen)) (home-page "https://gmerlin.sourceforge.net") (synopsis "Low level library for multimedia API building") (description "Gavl is short for Gmerlin Audio Video Library. It is a low level library, upon which multimedia APIs can be built. Gavl handles all the details of audio and video formats like colorspaces, sample rates, multichannel configurations, etc. It provides standardized definitions for those formats as well as container structures for carrying audio samples or video images inside an application. In addition, it handles the sometimes ugly task of converting between all these formats and provides some elementary operations (copying, scaling, alpha blending etc).") (license license:gpl3))) (define-public frei0r-plugins (package (name "frei0r-plugins") (version "1.7.0") (source (origin (method url-fetch) (uri (string-append "https://files.dyne.org/frei0r/" "frei0r-plugins-" version ".tar.gz")) (sha256 (base32 "0fjji3060r4fwr7vn91lwfzl80lg3my9lkp94kbyw8xwz7qgh7qv")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'patch-Makefile (lambda _ ;; XXX: The 1.7.0 Makefile looks for files that have slightly different ;; names in the tarball. Try removing this for future versions. (substitute* "Makefile.in" (("README\\.md ChangeLog TODO AUTHORS") "README.txt ChangeLog.txt TODO.txt AUTHORS.txt")) #t))))) ;; TODO: opencv for additional face detection filters. (inputs (list gavl cairo)) (native-inputs (list pkg-config)) (home-page "https://www.dyne.org/software/frei0r/") (synopsis "Minimalistic plugin API for video effects") (description "Frei0r is a minimalistic plugin API for video effects. The main emphasis is on simplicity for an API that will round up the most common video effects into simple filters, sources and mixers that can be controlled by parameters. Frei0r wants to provide a way to share these simple effects between many applications, avoiding their reimplementation by different projects. It counts more than 100 plugins.") (license (list license:gpl2+ ;; The following files are licensed as LGPL2.1+: ;; src/generator/ising0r/ising0r.c ;; src/generator/onecol0r/onecol0r.cpp ;; src/generator/nois0r/nois0r.cpp ;; src/generator/lissajous0r/lissajous0r.cpp ;; src/filter/ndvi/gradientlut.hpp ;; src/filter/ndvi/ndvi.cpp ;; src/filter/facedetect/facedetect.cpp license:lgpl2.1+)))) (define-public motion (package (name "motion") (version "4.5.1") (home-page "https://motion-project.github.io/") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/Motion-Project/motion") (commit (string-append "release-" version)))) (sha256 (base32 "09j919bba75d05rkqpib5rcmn1ff5nvn4ss8yy4fi6iz0lnacffx")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (native-inputs (list autoconf automake gettext-minimal pkg-config)) (inputs (list libjpeg-turbo ffmpeg libmicrohttpd sqlite)) (arguments '(#:phases (modify-phases %standard-phases (replace 'bootstrap (lambda _ (patch-shebang "scripts/version.sh") (invoke "autoreconf" "-vfi")))) #:configure-flags '("--sysconfdir=/etc") #:make-flags (list (string-append "sysconfdir=" (assoc-ref %outputs "out") "/etc")) #:tests? #f)) ; no 'check' target (synopsis "Detect motion from video signals") (description "Motion is a program that monitors the video signal from one or more cameras and is able to detect if a significant part of the picture has changed. Or in other words, it can detect motion.") ;; Some files say "version 2" and others "version 2 or later". (license license:gpl2))) (define-public subdl (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471") (revision "1")) (package (name "subdl") (version (git-version "1.0.3" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/alexanderwink/subdl") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils)) (let* ((out (assoc-ref %outputs "out")) (bin (string-append out "/bin")) (source (assoc-ref %build-inputs "source")) (python (assoc-ref %build-inputs "python"))) (install-file (string-append source "/subdl") bin) (patch-shebang (string-append bin "/subdl") (list (string-append python "/bin"))))))) (inputs (list python)) (synopsis "Command-line tool for downloading subtitles from opensubtitles.org") (description "Subdl is a command-line tool for downloading subtitles from opensubtitles.org. By default, it will search for English subtitles, display the results, download the highest-rated result in the requested language and save it to the appropriate filename.") (license license:gpl3+) (home-page "https://github.com/alexanderwink/subdl")))) (define-public l-smash (package (name "l-smash") (version "2.14.5") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/l-smash/l-smash") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02")))) (build-system gnu-build-system) (arguments `(#:tests? #f ;no tests #:make-flags (list (string-append "LDFLAGS=-Wl,-L.,-rpath=" (assoc-ref %outputs "out") "/lib")) #:phases (modify-phases %standard-phases ;; configure fails if it is followed by CONFIG_SHELL (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (invoke "./configure" (string-append "--prefix=" out) "--disable-static"))))))) (native-inputs (list which)) (home-page "https://l-smash.github.io/l-smash/") (synopsis "MP4 multiplexer and demultiplexer library") (description "L-SMASH is a cross-platform library that handles the ISO base media file format and some of its derived file formats, including MP4. It operates as a multiplexer and demultiplexer, and can mux video and audio in several formats using standalone executable files.") (license license:isc))) (define-public qtfaststart (package (name "qtfaststart") (version "1.8") (source (origin (method url-fetch) (uri (pypi-uri "qtfaststart" version)) (sha256 (base32 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h")))) (build-system python-build-system) (arguments '(#:tests? #f)) ; no test suite (synopsis "Move QuickTime and MP4 metadata to the beginning of the file") (description "qtfaststart enables streaming and pseudo-streaming of QuickTime and MP4 files by moving metadata and offset information to the beginning of the file. It can also print some useful information about the structure of the file. This program is based on qt-faststart.c from the FFmpeg project, which is released into the public domain, as well as ISO 14496-12:2005 (the official spec for MP4), which can be obtained from the ISO or found online.") (home-page "https://github.com/danielgtaylor/qtfaststart") (license license:expat))) (define-public vidstab (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8") (revision "0")) (package (name "vidstab") (version (git-version "1.1.0" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/georgmartius/vid.stab") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn")))) (build-system cmake-build-system) (arguments '(#:tests? #f)) ; tests are not run as part of standard build process (home-page "http://public.hronopik.de/vid.stab/") (synopsis "Video stabilization library") (description "Vidstab is a video stabilization library which can be used with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a vehicle typically suffers from undesirable shakes and jitters. Activities such as surfing, skiing, riding and walking while shooting videos are especially prone to erratic camera shakes. Vidstab targets these video contents to help create smoother and stable videos.") (license license:gpl2+)))) (define-public libopenshot (package (name "libopenshot") (version "0.3.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/OpenShot/libopenshot") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0jfp0kdncwmw8gqk0z8frpc4xdv9rxwh4z5m5l6mkyy320hr8zgm")) (modules '((guix build utils))) (snippet '(begin ;; Allow overriding of the python installation dir (substitute* "bindings/python/CMakeLists.txt" (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set) (string-append set " CACHE PATH " "\"Python bindings directory\")"))) (delete-file-recursively "thirdparty"))))) (build-system cmake-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("python" ,python) ("swig" ,swig) ("unittest++" ,unittest-cpp))) (inputs (list alsa-lib zlib)) (propagated-inputs ;all referenced in installed headers (list cppzmq ffmpeg-4 imagemagick jsoncpp libopenshot-audio qtbase-5 qtmultimedia-5 qtsvg-5 zeromq)) (arguments `(#:configure-flags (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python" ,(version-major+minor (package-version python)) "/site-packages") "-DUSE_SYSTEM_JSONCPP:BOOL=ON") #:phases (modify-phases %standard-phases (add-before 'configure 'set-vars (lambda* (#:key inputs #:allow-other-keys) (setenv "LIBOPENSHOT_AUDIO_DIR" (assoc-ref inputs "libopenshot-audio")) (setenv "ZMQDIR" (assoc-ref inputs "zeromq")) (setenv "UNITTEST_DIR" (search-input-directory inputs "include/UnitTest++"))))))) (home-page "https://openshot.org") (synopsis "Video-editing, animation, and playback library") (description "OpenShot Library (libopenshot) is a powerful C++ video editing library with a multi-threaded and feature rich video editing API. It includes bindings for Python, Ruby, and other languages.") (license license:lgpl3+))) (define-public openshot (package (name "openshot") (version "3.2.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/OpenShot/openshot-qt") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1hh5sggvnfayzgj1h9h7wp9k0n44lj2z32am9g51whkyzl5pp5nd")) (modules '((guix build utils))) (snippet '(begin ;; TODO: Unbundle jquery and others from src/timeline/media (delete-file-recursively "src/images/fonts") #t)))) (build-system python-build-system) (inputs (list bash-minimal ffmpeg font-dejavu libopenshot python python-pyqt python-pyqtwebengine python-pyzmq python-requests qtsvg-5 qtwebengine-5)) (arguments `(#:modules ((guix build python-build-system) (guix build qt-utils) (guix build utils)) #:imported-modules (,@%python-build-system-modules (guix build qt-utils)) #:phases (modify-phases %standard-phases (delete 'build) ;install phase does all the work (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? (setenv "QT_QPA_PLATFORM" "offscreen") (invoke "python" "src/tests/query_tests.py")))) (add-after 'unpack 'patch-font-location (lambda* (#:key inputs #:allow-other-keys) (let ((font (assoc-ref inputs "font-dejavu"))) (substitute* "src/classes/app.py" (("info.IMAGES_PATH") (string-append "\"" font "\"")) (("fonts") "share/fonts/truetype") (("[A-Za-z_-]+.ttf") "DejaVuSans.ttf"))))) (add-before 'install 'set-tmp-home (lambda _ ;; src/classes/info.py "needs" to create several ;; directories in $HOME when loaded during build (setenv "HOME" "/tmp"))) (add-after 'install 'wrap-program (lambda* (#:key outputs inputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) (qtwebengine-process-path (search-input-file inputs "/lib/qt5/libexec/QtWebEngineProcess"))) (wrap-qt-program "openshot-qt" #:output out #:inputs inputs) ;; Help the program discover QtWebEngine at runtime. (wrap-program (string-append out "/bin/openshot-qt") `("QTWEBENGINEPROCESS_PATH" = (,qtwebengine-process-path))))))))) (home-page "https://www.openshot.org/") (synopsis "Video editor") (description "OpenShot takes your videos, photos, and music files and helps you create the film you have always dreamed of. Easily add sub-titles, transitions, and effects and then export your film to many common formats.") (license license:gpl3+))) (define-public shotcut (package (name "shotcut") (version "23.09.29") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/mltframework/shotcut") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1r380lpa79i6821r3v84dm47vqxk4smx2k1wvf9afylw95v3i8zv")))) (build-system qt-build-system) (arguments `(#:tests? #f ;there are no tests #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-executable-paths (lambda* (#:key inputs #:allow-other-keys) ;; Shotcut expects ffmpeg and melt executables in the shotcut ;; directory. Use full store paths. (let* ((ffmpeg (assoc-ref inputs "ffmpeg")) (mlt (assoc-ref inputs "mlt"))) (substitute* "src/jobs/ffmpegjob.cpp" (("\"ffmpeg\"") (string-append "\"" ffmpeg "/bin/ffmpeg\""))) (substitute* "src/jobs/meltjob.cpp" (("\"melt\"") (string-append "\"" mlt "/bin/melt\"")) (("\"melt-7\"") (string-append "\"" mlt "/bin/melt-7\"")))))) (add-after 'install 'wrap-executable (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (frei0r (assoc-ref inputs "frei0r-plugins")) (jack (assoc-ref inputs "jack")) (ladspa (assoc-ref inputs "ladspa")) (mlt (assoc-ref inputs "mlt")) (sdl2 (assoc-ref inputs "sdl2"))) (wrap-program (string-append out "/bin/shotcut") `("FREI0R_PATH" ":" = (,(string-append frei0r "/lib/frei0r-1"))) `("LADSPA_PATH" ":" = (,(string-append ladspa "/lib/ladspa"))) `("LD_LIBRARY_PATH" ":" prefix ,(list (string-append jack "/lib" ":" sdl2 "/lib"))) `("PATH" ":" prefix ,(list (string-append mlt "/bin")))))))))) (native-inputs (list pkg-config python-wrapper qttools)) (inputs (list bash-minimal ffmpeg fftw frei0r-plugins jack-1 ladspa mlt pulseaudio qtbase qtdeclarative qtmultimedia sdl2)) (home-page "https://www.shotcut.org/") (synopsis "Video editor built on the MLT framework") (description "Shotcut is a video editor built on the MLT framework. Features include a wide range of formats through @code{ffmpeg}, 4k resolution support, webcam and audio capture, network stream playback, and many more.") (license license:gpl3+))) (define-public dav1d (package (name "dav1d") (version "1.3.0") (source (origin (method git-fetch) (uri (git-reference (url "https://code.videolan.org/videolan/dav1d.git") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "17r6qdijdnqfciqa0ia2y4gyhaav6y5gc4d9xj4dg9h7xnpyxc3k")))) (build-system meson-build-system) (native-inputs (if (target-x86?) (list nasm) '())) (home-page "https://code.videolan.org/videolan/dav1d") (synopsis "AV1 decoder") (description "dav1d is a new AV1 cross-platform decoder, and focused on speed and correctness.") (license license:bsd-2))) (define-public wlstream (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838") (revision "1")) (package (name "wlstream") (version (git-version "0.0" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/atomnuker/wlstream") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp")))) (build-system meson-build-system) (native-inputs (list libdrm pkg-config)) (inputs (list ffmpeg-4 pulseaudio wayland wayland-protocols)) (home-page "https://github.com/atomnuker/wlstream") (synopsis "Screen capture tool for Wayland sessions") (description "Wlstream is a screen capture tool for recording audio and video from a Wayland session.") (license license:lgpl2.1+)))) (define-public gaupol (package (name "gaupol") (version "1.12") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/otsaloma/gaupol/") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1z9j3r9pm4rdynlmhgsgnwnnaqw5274yfy4kyillgd77msnpbhaw")))) (build-system pyproject-build-system) (native-inputs (list gettext-minimal pkg-config)) (inputs (list bash-minimal python-pygobject gtk+ python-pycairo ; Required or else clicking on a subtitle line fails. python-chardet ; Optional: Character encoding detection. gtkspell3 ; Optional: Inline spell-checking. iso-codes/pinned ; Optional: Translations. gstreamer gst-libav gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly)) (arguments `(#:tests? #f ; Tests seem to require networking. #:phases (modify-phases %standard-phases (add-after 'unpack 'disable-builtin-byte-compilation (lambda _ ;; The setup.py script attempts to compile bytecode and fails. ;; We compile bytecode in a separate phase, so just disable it. (substitute* "setup.py" (("distutils\\.util\\.byte_compile\\(.*") "")))) (add-after 'install 'wrap-gaupol (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")) (gi-typelib-path (getenv "GI_TYPELIB_PATH"))) (wrap-program (string-append out "/bin/gaupol") `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path)) `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))) ;; Can't create a GtkStyleContext without a display connection (delete 'sanity-check) (add-after 'unpack 'patch-data-dir ;; Fix some path variables that setup.py seems to garble. (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (substitute* "setup.py" (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)") (string-append "DATA_DIR = '" out "/share/gaupol'\"")) (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)") (string-append "LOCALE_DIR = '" out "/share/locale'\""))))))))) (synopsis "Editor for text-based subtitles") (description "Gaupol supports multiple subtitle file formats and provides means of creating subtitles, editing texts and timing subtitles to match video. The user interface features a builtin video player and is designed with attention to convenience of translating and batch processing of multiple documents.") (home-page "https://otsaloma.io/gaupol/") (license license:gpl3+))) (define-public theorafile (let ((commit "ea5fd6d34053ff72b0abe83fa4f2cd0771d92663")) (package (name "theorafile") (version (git-version "0.0.0" "2" commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/FNA-XNA/Theorafile") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "0affdbs7vhi7apj5sc5mg815vqy1913zgymx3m1rsz8fhrcg3bvn")))) (build-system gnu-build-system) (arguments `(#:make-flags '(,(string-append "CC=" (cc-for-target))) #:test-target "test" #:phases (modify-phases %standard-phases (delete 'configure) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (install-file "libtheorafile.so" (string-append out "/lib")) (install-file "theorafile.h" (string-append out "/include")))))))) (native-inputs ;; For tests. (list sdl2)) (home-page "https://github.com/FNA-XNA/Theorafile") (synopsis "Ogg Theora Video Decoder Library") (description "Theorafile is a library for quickly and easily decoding Ogg Theora videos. Theorafile was written to be used for FNA's VideoPlayer.") (license license:zlib)))) (define-public dvdbackup (package (name "dvdbackup") (version "0.4.2") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/" "dvdbackup-" version "/" "dvdbackup-" version ".tar.xz")) (sha256 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g")))) (build-system gnu-build-system) (inputs (list libdvdcss libdvdread)) (home-page "https://dvdbackup.sourceforge.net") (synopsis "DVD video ripper") (description "A simple command line tool to backup video from a DVD. Decrypts the DVD using @command{libdvdcss}, but does @strong{not} demux, remux, transcode or reformat the videos in any way, producing perfect backups.") (license license:gpl3+))) (define-public svt-av1 (package (name "svt-av1") (version "1.7.0") (source (origin (method git-fetch) (uri (git-reference (url "https://gitlab.com/AOMediaCodec/SVT-AV1.git") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1308g0nqxq65h76a7h91999cbglkwihgrpid64kdn0r9vh6399sq")))) (build-system cmake-build-system) (arguments ;; The test suite tries to download test data and git clone a 3rd-party ;; fork of libaom. Skip it. `(#:tests? #f #:phases (modify-phases %standard-phases (add-after 'install 'install-documentation (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref %outputs "out")) (doc (string-append out "/share/doc/svt-av1-" ,version))) (copy-recursively "../source/Docs" doc) #t)))))) (native-inputs (list yasm)) (synopsis "AV1 video codec") (description "SVT-AV1 is an AV1 codec implementation. The encoder is a work-in-progress, aiming to support video-on-demand and live streaming applications with high performance requirements. It mainly targets Intel-compatible CPUs (x86), but has limited support for other architectures.") (home-page "https://gitlab.com/AOMediaCodec/SVT-AV1") (license license:bsd-2))) (define-public svt-vp9 (package (name "svt-vp9") (version "0.3.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/OpenVisualCloud/SVT-VP9") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1ypdiw4cq22llvm8jyszxdq6r1aydkj80dsxjarjn5b7c1f2q3ar")))) ;; SVT-VP9 only supports 64-bit Intel-compatible CPUs. (supported-systems '("x86_64-linux")) (build-system cmake-build-system) (arguments `(#:tests? #f ; No test suite #:phases (modify-phases %standard-phases (add-after 'install 'install-documentation (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref %outputs "out")) (doc (string-append out "/share/doc/" ,name "-" ,version))) (copy-recursively "../source/Docs" doc) #t)))))) (native-inputs (list yasm)) (home-page "https://github.com/OpenVisualCloud/SVT-VP9") (synopsis "VP9 video encoder") (description "SVT-VP9 is a VP9 video encoder implementation. It is focused on supporting video-on-demand and live encoding on Intel Xeon processors.") (license license:bsd-2))) (define-public w-scan (package (name "w-scan") (version "20170107") (source (origin (method url-fetch) (uri (string-append "https://www.gen2vdr.de/wirbel/w_scan/w_scan-" version ".tar.bz2")) (sha256 (base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("CFLAGS=-O2 -g -fcommon"))) (synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels") (description "This is a small command line utility used to perform frequency scans for DVB and ATSC transmissions without initial tuning data. It can print the result in several formats: @itemize @item VDR channels.conf, @item czap/tzap/xine/mplayer channels.conf, @item Gstreamer dvbsrc plugin, @item VLC xspf playlist, @item XML, @item initial tuning data for scan or dvbv5-scan. @end itemize\n") (home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html") (license license:gpl2+))) (define-public rav1e (package (name "rav1e") (version "0.7.1") (source (origin (method url-fetch) (uri (crate-uri "rav1e" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1sawva6nmj2fvynydbcirr3nb7wjyg0id2hz2771qnv6ly0cx1yd")))) (build-system cargo-build-system) (arguments `(#:install-source? #f #:cargo-inputs (("rust-aom-sys" ,rust-aom-sys-0.3) ("rust-arbitrary" ,rust-arbitrary-1) ("rust-arg-enum-proc-macro" ,rust-arg-enum-proc-macro-0.3) ("rust-arrayvec" ,rust-arrayvec-0.7) ("rust-av-metrics" ,rust-av-metrics-0.9) ("rust-av1-grain" ,rust-av1-grain-0.2) ("rust-backtrace" ,rust-backtrace-0.3) ("rust-bitstream-io" ,rust-bitstream-io-2) ("rust-built" ,rust-built-0.7) ("rust-byteorder" ,rust-byteorder-1) ("rust-cc" ,rust-cc-1) ("rust-cfg-if" ,rust-cfg-if-1) ("rust-clap" ,rust-clap-4) ("rust-clap-complete" ,rust-clap-complete-4) ("rust-console" ,rust-console-0.15) ("rust-crossbeam" ,rust-crossbeam-0.8) ("rust-fern" ,rust-fern-0.6) ("rust-image" ,rust-image-0.24) ("rust-interpolate-name" ,rust-interpolate-name-0.2) ("rust-itertools" ,rust-itertools-0.12) ("rust-ivf" ,rust-ivf-0.1) ("rust-libc" ,rust-libc-0.2) ("rust-libdav1d-sys" ,rust-libdav1d-sys-0.6) ("rust-libfuzzer-sys" ,rust-libfuzzer-sys-0.4) ("rust-log" ,rust-log-0.4) ("rust-maybe-rayon" ,rust-maybe-rayon-0.1) ("rust-nasm-rs" ,rust-nasm-rs-0.2) ("rust-new-debug-unreachable" ,rust-new-debug-unreachable-1) ("rust-nom" ,rust-nom-7) ("rust-noop-proc-macro" ,rust-noop-proc-macro-0.3) ("rust-num-derive" ,rust-num-derive-0.4) ("rust-num-traits" ,rust-num-traits-0.2) ("rust-once-cell" ,rust-once-cell-1) ("rust-paste" ,rust-paste-1) ("rust-profiling" ,rust-profiling-1) ("rust-rand" ,rust-rand-0.8) ("rust-rand-chacha" ,rust-rand-chacha-0.3) ("rust-scan-fmt" ,rust-scan-fmt-0.2) ("rust-serde" ,rust-serde-1) ("rust-serde-big-array" ,rust-serde-big-array-0.5) ("rust-signal-hook" ,rust-signal-hook-0.3) ("rust-simd-helpers" ,rust-simd-helpers-0.1) ("rust-system-deps" ,rust-system-deps-6) ("rust-thiserror" ,rust-thiserror-1) ("rust-toml" ,rust-toml-0.8) ("rust-tracing" ,rust-tracing-0.1) ("rust-tracing-chrome" ,rust-tracing-chrome-0.7) ("rust-tracing-subscriber" ,rust-tracing-subscriber-0.3) ("rust-v-frame" ,rust-v-frame-0.3) ("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2) ("rust-y4m" ,rust-y4m-0.8)) #:cargo-development-inputs (("rust-assert-cmd" ,rust-assert-cmd-2) ("rust-criterion" ,rust-criterion-0.5) ("rust-interpolate-name" ,rust-interpolate-name-0.2) ("rust-nom" ,rust-nom-7) ("rust-pretty-assertions" ,rust-pretty-assertions-1) ("rust-quickcheck" ,rust-quickcheck-1) ("rust-rand" ,rust-rand-0.8) ("rust-rand-chacha" ,rust-rand-chacha-0.3) ("rust-semver" ,rust-semver-1)) #:phases (modify-phases %standard-phases (replace 'build (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (invoke "cargo" "cinstall" "--release" ;; Only build the dynamic library. "--library-type" "cdylib" (string-append "--prefix=" out)))))))) (native-inputs (append (if (target-x86?) (list nasm) '()) (list pkg-config rust-cargo-c))) (inputs (list libgit2-1.7 zlib)) (home-page "https://github.com/xiph/rav1e/") (synopsis "Fast and safe AV1 encoder") (description "@code{rav1e} is an AV1 video encoder. It is designed to eventually cover all use cases, though in its current form it is most suitable for cases where libaom (the reference encoder) is too slow.") ;; This package shows a large speed boost when tuned for newer architectures. (properties `((tunable? . #t))) (license license:bsd-2))) (define-public peek (package (name "peek") (version "1.5.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/phw/peek") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1xwlfizga6hvjqq127py8vabaphsny928ar7mwqj9cyqfl6fx41x")))) (build-system meson-build-system) (arguments '(#:glib-or-gtk? #t)) (inputs (list gtk+ python-wrapper)) (native-inputs (list desktop-file-utils ; for update-desktop-database gettext-minimal `(,glib "bin") ; for glib-compile-resources `(,gtk+ "bin") ; For gtk-update-icon-cache pkg-config vala)) (home-page "https://github.com/phw/peek") (synopsis "Simple animated GIF screen recorder") (description "Peek makes it easy to create short screencasts of a screen area. It was built for the specific use case of recording screen areas, e.g. for easily showing UI features of your own apps or for showing a bug in bug reports. With Peek, you simply place the Peek window over the area you want to record and press \"Record\". Peek is optimized for generating animated GIFs, but you can also directly record to WebM or MP4 if you prefer.") (license license:gpl3+))) (define-public wf-recorder (package (name "wf-recorder") (version "0.3.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ammen99/wf-recorder") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "18csvix8fdqir52q729rgcy355xy2ngvmr05l1abflpbvsklbn52")))) (build-system meson-build-system) (native-inputs (list pkg-config)) (inputs (list ffmpeg pulseaudio wayland wayland-protocols libx264)) (home-page "https://github.com/ammen99/wf-recorder") (synopsis "Screen recorder for wlroots-based compositors") (description "@code{wf-recorder} is a utility program for screen recording of wlroots-based compositors. More specifically, those that support @code{wlr-screencopy-v1} and @code{xdg-output}.") (license license:expat))) (define-public guvcview (package (name "guvcview") (version "2.0.8") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/guvcview/source/guvcview-" "src-" version ".tar.bz2")) (sha256 (base32 "108c4g0ns9i1wnxyalmpjqbhlflmrj855vxgggr6qrl6h924w7x2")))) (build-system gnu-build-system) (arguments ;; There are no tests and "make check" would fail on an intltool error. '(#:tests? #f)) (native-inputs (list pkg-config intltool)) (inputs (list bdb gtk+ eudev libjpeg-turbo libusb v4l-utils ;libv4l2 ffmpeg ;libavcodec, libavutil sdl2 gsl portaudio alsa-lib)) (home-page "https://guvcview.sourceforge.net/") (synopsis "Control your webcam and capture videos and images") (description "GTK+ UVC Viewer (guvcview) is a graphical application to control a webcam accessible with Video4Linux (V4L2) and to capture videos and images. It provides control over precise settings of the webcam such as exposure, brightness, contrast, and frame rate.") ;; 'COPYING' is GPLv3 but source headers say GPLv2+. (license license:gpl2+))) (define-public get-iplayer (package (name "get-iplayer") (version "3.30") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/get-iplayer/get_iplayer") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1kzsdq1mhm5h83bbdbhh3jhpfvq4f13ly22mfd6vvmhj8mq084pi")))) (build-system perl-build-system) (arguments `(#:tests? #f ; no tests #:phases (modify-phases %standard-phases (delete 'configure) (delete 'build) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin")) (man (string-append out "/share/man/man1"))) (install-file "get_iplayer" bin) (install-file "get_iplayer.cgi" bin) (install-file "get_iplayer.1" man)))) (add-after 'install 'wrap-program (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (perllib (string-append out "/lib/perl5/site_perl/" ,(package-version perl)))) (wrap-program (string-append out "/bin/get_iplayer") `("PERL5LIB" ":" prefix (,(string-append perllib ":" (getenv "PERL5LIB"))))) (wrap-program (string-append out "/bin/get_iplayer.cgi") `("PERL5LIB" ":" prefix (,(string-append perllib ":" (getenv "PERL5LIB"))))))))))) (inputs (list bash-minimal perl-mojolicious perl-lwp-protocol-https perl-xml-libxml)) (home-page "https://github.com/get-iplayer/get_iplayer") (synopsis "Download or stream available BBC iPlayer TV and radio programmes") (description "@code{get_iplayer} lists, searches and records BBC iPlayer TV/Radio, BBC Podcast programmes. Other third-party plugins may be available. @code{get_iplayer} has three modes: recording a complete programme for later playback, streaming a programme directly to a playback application, such as mplayer; and as a @dfn{Personal Video Recorder} (PVR), subscribing to search terms and recording programmes automatically. It can also stream or record live BBC iPlayer output.") (license license:gpl3+))) (define-public ogmtools (package (name "ogmtools") (version "1.5") (source (origin (method url-fetch) (uri (string-append "https://www.bunkus.org/videotools/ogmtools/ogmtools-" version ".tar.bz2")) (sha256 (base32 "1spx81p5wf59ksl3r3gvf78d77sh7gj8a6lw773iv67bphfivmn8")))) (build-system gnu-build-system) (inputs (list libvorbis libdvdread)) (synopsis "Information, extraction or creation for OGG media streams") (description "These tools allow information about (@code{ogminfo}) or extraction from \(@code{ogmdemux}) or creation of (@code{ogmmerge}) OGG media streams. It includes @code{dvdxchap} tool for extracting chapter information from DVD.") (license license:gpl2) (home-page "https://www.bunkus.org/videotools/ogmtools/"))) (define-public libcaption (package (name "libcaption") (version "0.7") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/szatmary/libcaption") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "16mhw8wpl7wdjj4n7rd1c294p1r8r322plj7z91crla5aah726rq")))) (build-system cmake-build-system) (arguments `(#:tests? #f ; Cannot figure out how to run the unit tests #:configure-flags '("-DENABLE_RE2C=ON"))) (native-inputs (list re2c)) (synopsis "CEA608 / CEA708 closed-caption codec") (description "Libcaption creates and parses closed-caption data, providing an encoder / decoder for the EIA608 and CEA708 closed-caption standards. 608 support is currently limited to encoding and decoding the necessary control and preamble codes as well as support for the Basic North American, Special North American and Extended Western European character sets. 708 support is limited to encoding the 608 data in NTSC field 1 user data type structure. In addition, utility functions to create h.264 SEI (Supplementary enhancement information) NALUs (Network Abstraction Layer Unit) for inclusion into an h.264 elementary stream are provided.") (home-page "https://github.com/szatmary/libcaption") (license license:expat))) (define-public video-contact-sheet (package (name "video-contact-sheet") (version "1.13.4") (source (origin (method url-fetch) (uri (string-append "http://p.outlyer.net/vcs/files/vcs-" version ".tar.gz")) (sha256 (base32 "0jsl93r0rnybjcipqbww5hwsr9ln6kz1qnf32qfxdvhfw52n27fw")))) (build-system gnu-build-system) (arguments (list #:make-flags #~(list (string-append "prefix=" #$output)) #:phases #~(modify-phases %standard-phases (delete 'configure) (delete 'build) (delete 'check) (add-after 'install 'wrap-program (lambda _ (wrap-program (string-append #$output "/bin/vcs") `("PATH" ":" prefix ,(map (lambda (dir) (string-append dir "/bin")) (list #$(this-package-input "ffmpeg") #$(this-package-input "imagemagick")))))))))) (inputs (list bash-minimal ffmpeg imagemagick)) (synopsis "Create contact sheets (preview images) from videos") (description "@acronym{VCS, Video Contact Sheet} is a Bash script meant to create video contact sheets (previews) of videos. Any video supported by MPlayer and FFmpeg can be used. A note of warning: Unlike most similar tools VCS, by default, makes screenshots the same size as the video, see the manual for details on how to change this.") (home-page "https://p.outlyer.net/vcs/") (license license:lgpl2.1+))) (define-public svtplay-dl (package (name "svtplay-dl") (version "4.17") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/spaam/svtplay-dl") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "0yjxmvldskw4pji3lg69pbx05izvxahz9my7z5p31mkiz6v33dmx")))) (build-system python-build-system) (inputs (list ffmpeg python-pyaml python-requests python-pysocks python-cryptography)) (home-page "https://svtplay-dl.se/") (synopsis "Download or stream SVT Play's (and others) TV programmes") (description "@code{svtplay-dl} allows downloading TV programmes from various Swedish broadcasters including SVT Play, Sveriges Radio, TV4 Play, along with many others.") (license license:expat))) (define-public syncplay (package (name "syncplay") (version "1.7.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/Syncplay/syncplay") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "08bgndszja4n2kql2qmzl6qrzawxvcwmywsc69lq0dzjnpdk96la")))) (build-system python-build-system) (arguments (list #:imported-modules `(,@%python-build-system-modules (guix build qt-utils) (guix build utils)) #:modules '((guix build python-build-system) (guix build qt-utils) (guix build utils)) #:phases #~(modify-phases %standard-phases (delete 'check) (replace 'install (lambda _ (invoke "make" "install" "DESTDIR=" (string-append "PREFIX=" #$output)))) (add-after 'install 'wrap-qt (lambda* (#:key inputs #:allow-other-keys) (wrap-qt-program "syncplay" #:output #$output #:inputs inputs #:qt-major-version "6")))))) (native-inputs (list python-pyside-6)) (inputs (list bash-minimal python-certifi python-idna python-service-identity python-twisted qtwayland)) (home-page "https://syncplay.pl") (synopsis "Client/server to synchronize media playback on many computers") (description "Syncplay is a solution to synchronize video playback across multiple instances of media players over the Internet. When one person pauses/unpauses playback or skips to a position in the video, this is replicated across all media players connected to the same server and in the same \"room\" (viewing session). A built-in text chat for discussing the synced media is also included for convenience.") (license license:asl2.0)))