me
/
guix
Archived
1
0
Fork 0

gnu: rmlint: Update package style.

* gnu/packages/disk.scm (rmlint)[arguments]:
Rewrite as G-expressions.
[native-inputs, inputs]: Remove input labels.
Tobias Geerinckx-Rice 2023-08-06 02:00:00 +02:00
parent 02ccc57635
commit 3a1547db2e
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 34 additions and 37 deletions

View File

@ -1143,45 +1143,42 @@ LVM D-Bus API).")
"0sk4v1chnk2hvzi92svyf8qgamfs4fvial90qwx4a7dayxhkbsm4")))) "0sk4v1chnk2hvzi92svyf8qgamfs4fvial90qwx4a7dayxhkbsm4"))))
(build-system scons-build-system) (build-system scons-build-system)
(arguments (arguments
`(#:scons ,scons-python2 (list
#:scons-flags (list (string-append "--prefix=" %output) #:scons scons-python2
(string-append "--actual-prefix=" %output)) #:scons-flags
#:tests? #f ; No tests? #~(list (string-append "--prefix=" #$output)
#:phases (string-append "--actual-prefix=" #$output))
(modify-phases %standard-phases #:tests? #f ; no tests
(add-after 'unpack 'scons-propagate-environment #:phases
(lambda* (#:key inputs #:allow-other-keys) #~(modify-phases %standard-phases
;; TODO: `rmlint --gui` fails with (add-after 'unpack 'scons-propagate-environment
;; "Failed to load shredder: No module named 'shredder'". (lambda* (#:key inputs #:allow-other-keys)
;; The GUI might also need extra dependencies, such as ;; TODO: `rmlint --gui` fails with
;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3. ;; "Failed to load shredder: No module named 'shredder'".
(substitute* "lib/cmdline.c" ;; The GUI might also need extra dependencies, such as
(("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};") ;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3.
(string-append (substitute* "lib/cmdline.c"
"const char *commands[] = {\"" (("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};")
(assoc-ref inputs "python") "/bin/python" (string-append "const char *commands[] = {\""
"\", \"python\", NULL};"))) (search-input-file inputs "/bin/python")
;; By design, SCons does not, by default, propagate "\", \"python\", NULL};")))
;; environment variables to subprocesses. See: ;; By design, SCons does not, by default, propagate
;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969> ;; environment variables to subprocesses. See:
;; Here, we modify the SConstruct file to arrange for ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
;; environment variables to be propagated. ;; Here, we modify the SConstruct file to arrange for
(substitute* "SConstruct" ;; environment variables to be propagated.
(("^env = Environment\\(.*\\)" all) (substitute* "SConstruct"
(string-append (("^env = Environment\\(.*\\)" all)
all (string-append all "\nenv['ENV']=os.environ"))))))))
"\nenv['ENV']=os.environ"))))))))
(native-inputs (native-inputs
`(("pkg-config" ,pkg-config) (list `(,glib "bin") pkg-config python-sphinx))
("glib:bin" ,glib "bin")
("python-sphinx" ,python-sphinx)))
(inputs (inputs
`(("python" ,python-wrapper) (list elfutils
("glib" ,glib) glib
("libelf" ,libelf) json-glib
("elfutils" ,elfutils) libelf
("json-glib" ,json-glib) python-wrapper
("libblkid" ,util-linux "lib"))) `(,util-linux "lib")))
(home-page "https://rmlint.rtfd.org") (home-page "https://rmlint.rtfd.org")
(synopsis "Remove duplicates and other lint from the file system") (synopsis "Remove duplicates and other lint from the file system")
(description "@command{rmlint} finds space waste and other broken things (description "@command{rmlint} finds space waste and other broken things