;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 David Craven ;;; ;;; 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 . (define-module (gnu services sddm) #:use-module (gnu packages admin) #:use-module (gnu packages display-managers) #:use-module (gnu packages freedesktop) #:use-module (gnu packages xorg) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu services xorg) #:use-module (gnu system pam) #:use-module (gnu system shadow) #:use-module (guix gexp) #:use-module (guix records) #:export (sddm-configuration sddm-configuration? sddm-service-type sddm-service)) (define-record-type* sddm-configuration make-sddm-configuration sddm-configuration? (sddm sddm-configuration-sddm (default sddm)) ;; [General] ;; valid values are x11 and wayland ;; currently doesn't do anything is enabled by wayland greeter PR (display-server sddm-configuration-display-server (default "x11")) ;; valid values are on, off or none (numlock sddm-configuration-numlock (default "on")) (halt-command sddm-configuration-halt-command ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2014, 2015, 2017, 2020, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016, 2021 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be> ;;; Copyright © 2017, 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com> ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> ;;; Copyright © 2021 Simon Streit <simon@netpanic.org> ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net> ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com> ;;; Copyright © 2022 Joeke de Graaf <joeke@posteo.net> ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; ;;; 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 mp3) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages gcc) #:use-module (gnu packages bash) #:use-module (gnu packages boost) #:use-module (gnu packages cdrom) #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gnome) #:use-module (gnu packages ncurses) #:use-module (gnu packages glib) #:use-module (gnu packages gtk) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages xiph) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages linux) ;alsa-lib #:use-module (gnu packages video) ;ffmpeg #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (guix build-system cmake) #:use-module (guix build-system meson)) (define-public libmad (package (name "libmad") (version "0.15.1b") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/mad/libmad/" version "/libmad-" version ".tar.gz")) (sha256 (base32 "14460zhacxhswnzb36qfpd1f2wbk10qvksvm6wyq5hpvdgnw7ymv")) (patches (search-patches "libmad-armv7-thumb-pt1.patch" "libmad-armv7-thumb-pt2.patch" "libmad-md_size.patch" "libmad-length-check.patch" "libmad-mips-newgcc.patch")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'configure 'remove-unsupported-gcc-flags (lambda _ ;; remove option that is not supported by gcc any more (substitute* "configure" ((" -fforce-mem") "")) #t)) ;; Normally one should not add a pkg-config file if one is not provided ;; by upstream developers, but Audacity expects a pkg-config file for ;; this package, and other major GNU/Linux distributions already provide ;; such a file. (add-after 'install 'install-pkg-config (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (pkg-config-dir (string-append out "/lib/pkgconfig"))) (mkdir-p pkg-config-dir) (with-output-to-file (string-append pkg-config-dir "/mad.pc") (lambda _ (format #t "prefix=~@*~a~@ libdir=${prefix}/lib~@ includedir=${prefix}/include~@ Name: libmad~@ Description:~@ Version: ~a~@ Libs: -L${libdir} -lmad~@ Cflags: -I${includedir}~%" out ,version))))))))) (synopsis "MPEG audio decoder") (description "MAD (MPEG Audio Decoder) supports MPEG-1 and the MPEG-2 extension to lower sampling frequencies, as well as the de facto MPEG 2.5 format. All three audio layers — Layer I, Layer II, and Layer III (i.e. MP3) — are fully implemented. This package contains the library.") (license license:gpl2+) (home-page "https://www.underbit.com/products/mad/"))) (define-public libid3tag (package (name "libid3tag") (version "0.15.1b") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/mad/libid3tag/" version "/libid3tag-" version ".tar.gz")) (sha256 (base32 "0lb1w883dc46dajbdvnia5870brl5lvnlk7g7y58y9wpg5p4znk3")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases ;; Normally one should not add a pkg-config file if one is not provided ;; by upstream developers, but Audacity expects a pkg-config file for ;; this package, and other major GNU/Linux distributions already provide ;; such a file. (add-after 'install 'install-pkg-config (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (pkg-config-dir (string-append out "/lib/pkgconfig"))) (mkdir-p pkg-config-dir) (with-output-to-file (string-append pkg-config-dir "/id3tag.pc") (lambda _ (format #t "prefix=~@*~a~@ libdir=${prefix}/lib~@ includedir=${prefix}/include~@ Name: libid3tag~@ Description:~@ Version: ~a~@ Libs: -L${libdir} -lid3tag -lz~@ Cflags: -I${includedir}~%" out ,version)))))) ,@(if (and (%current-target-system) (or (target-riscv64?) (target-aarch64?))) `((add-after 'unpack 'update-config (lambda* (#:key native-inputs inputs #:allow-other-keys) (for-each (lambda (file) (install-file (search-input-file (or native-inputs inputs) (string-append "/bin/" file)) ".")) '("config.guess" "config.sub"))))) '())))) (native-inputs (if (and (%current-target-system) (or (target-riscv64?) (target-aarch64?))) (list config) '())) (inputs (list zlib)) (synopsis "Library for reading ID3 tags") (description "Libid3tag is a library for reading ID3 tags, both ID3v1 and the various versions of ID3v2.") (license license:gpl2+) (home-page "https://www.underbit.com/products/mad/"))) (define-public id3lib (package (name "id3lib") (version "3.8.3") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/id3lib/id3lib/" version "/id3lib-" version ".tar.gz")) (sha256 (base32 "0yfhqwk0w8q2hyv1jib1008jvzmwlpsxvc8qjllhna6p1hycqj97")) (modules '((guix build utils))) ;; Don't use bundled zlib (snippet '(begin (delete-file-recursively "zlib") #t)) (patches (search-patches "id3lib-CVE-2007-4460.patch" "id3lib-UTF16-writing-bug.patch")))) (build-system gnu-build-system) (inputs (list zlib)) (arguments `(#:phases (modify-phases %standard-phases (add-before 'configure 'apply-patches ;; TODO: create a patch for origin instead? (lambda _ (substitute* "configure" (("iomanip.h") "")) ; drop check for unused header ;; see http://www.linuxfromscratch.org/patches/downloads/id3lib/ (substitute* "include/id3/id3lib_strings.h" (("include <string>") "include <cstring>\n#include <string>")) (substitute* "include/id3/writers.h" (("//\\#include <string.h>") "#include <cstring>")) (substitute* "examples/test_io.cpp" (("dami;") "dami;\nusing namespace std;")) #t))))) (s