diff mbox series

[bug#65784] gnu: Add woeusb.

Message ID 20230906130103.3121-1-adam.mohidin.kandur@gmail.com
State New
Headers show
Series [bug#65784] gnu: Add woeusb. | expand

Commit Message

Adam Kandur Sept. 6, 2023, 1:01 p.m. UTC
* gnu/packages/admin.scm (woeusb): New variable.
---
 gnu/packages/admin.scm | 65 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

Comments

Christopher Baines Oct. 20, 2023, 9:42 a.m. UTC | #1
Adam Kandur <adam.mohidin.kandur@gmail.com> writes:

> * gnu/packages/admin.scm (woeusb): New variable.
> ---
>  gnu/packages/admin.scm | 65 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 65 insertions(+)
>
> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> index 604cd70..6b971e8 100644
> --- a/gnu/packages/admin.scm
> +++ b/gnu/packages/admin.scm
> @@ -2388,6 +2388,71 @@ (define-public wakelan
>  network, which causes enabled computers to power on.")
>      (license license:gpl2+)))
>  
> +(define-public woeusb
> +  (let ((revision "0")
> +        ;; named branch is outdated
> +        (commit "34b400d99d3c4089f487e1d4f7d71970b2d4429e"))
> +    (package
> +      (name "woeusb")
> +      (version (git-version "0.0.0" revision commit))
> +      (source
> +       (origin
> +	 (method git-fetch)
> +	 (uri (git-reference
> +	       (url "https://github.com/WoeUSB/WoeUSB.git")
> +	       (commit commit)))
> +	 (file-name (git-file-name name version))
> +	 (sha256
> +	  (base32 "05ghja2rpn4kqak9yll398na54dscsfnm3z5f2pi54lan98wzimh"))))
> +      (build-system trivial-build-system)
> +      (inputs
> +       (list ntfs-3g grub ncurses parted coreutils util-linux wimlib))
> +      (arguments
> +       `(#:modules ((guix build utils))
> +         #:builder
> +         (begin
> +           (use-modules (guix build utils))
> +           ;; copy source
> +           (copy-recursively (assoc-ref %build-inputs "source") ".")
> +           ;; patch source
> +           (substitute* "sbin/woeusb"
> +             (("tput sgr0") (string-append (assoc-ref %build-inputs "ncurses")
> +                                           "/bin/tput"
> +                                           " sgr0"))
> +             (("parted --script")
> +              (string-append (assoc-ref %build-inputs "parted")
> +                             "/sbin/parted --script"))
> +             (("parted \\\\")
> +              (string-append (assoc-ref %build-inputs "parted")
> +                             "/sbin/parted \\"))
> +             (("grub-install") (string-append (assoc-ref %build-inputs "grub")
> +                                              "/sbin/grub-install"))
> +             (("command -v mkntfs") (string-append
> +                                     "command -v "
> +                                     (assoc-ref %build-inputs "ntfs-3g")
> +                                     "/sbin/mkntfs"))
> +             (("command_mkntfs_ref=mkntfs") (string-append
> +                                             "command_mkntfs_ref="
> +                                             (assoc-ref %build-inputs "ntfs-3g")
> +                                             "/sbin/mkntfs"))
> +             (("readlink \\\\") (string-append
> +                                 (assoc-ref %build-inputs "coreutils")
> +                                 "/bin/readlink \\"))
> +             (("wimlib-imagex") (string-append
> +                                 (assoc-ref %build-inputs "wimlib")
> +                                 "/bin/wimlib-imagex"))
> +             ;; could not find partprobe package
> +             ;; as i see this command never used in the program
> +             (("partprobe \\\\") "\\"))
> +           ;; install phase
> +           (install-file "sbin/woeusb" (string-append %output "/bin"))
> +           #t)))
> +      (home-page "https://github.com/WoeUSB/WoeUSB")
> +      (synopsis "A Microsoft Windows® USB installation media preparer for GNU+Linux")
> +      (description "Very usefull package for anyone who wants to make a bootable Windows® USB stick
> +using free and open source operating system.")
> +      (license license:gpl3+))))
> +
>  (define-public dmidecode
>    (package
>      (name "dmidecode")

Hi Adam,

Does this build for you locally? According to QA, grub is undefined, so
maybe there's an import missing.

Thanks,

Chris
Adam Kandur Oct. 26, 2023, 12:17 a.m. UTC | #2
yeah, my bad
will send a new one


On Fri, 20 Oct 2023 at 12:43, Christopher Baines <mail@cbaines.net> wrote:
>
>
> Adam Kandur <adam.mohidin.kandur@gmail.com> writes:
>
> > * gnu/packages/admin.scm (woeusb): New variable.
> > ---
> >  gnu/packages/admin.scm | 65 ++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 65 insertions(+)
> >
> > diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> > index 604cd70..6b971e8 100644
> > --- a/gnu/packages/admin.scm
> > +++ b/gnu/packages/admin.scm
> > @@ -2388,6 +2388,71 @@ (define-public wakelan
> >  network, which causes enabled computers to power on.")
> >      (license license:gpl2+)))
> >
> > +(define-public woeusb
> > +  (let ((revision "0")
> > +        ;; named branch is outdated
> > +        (commit "34b400d99d3c4089f487e1d4f7d71970b2d4429e"))
> > +    (package
> > +      (name "woeusb")
> > +      (version (git-version "0.0.0" revision commit))
> > +      (source
> > +       (origin
> > +      (method git-fetch)
> > +      (uri (git-reference
> > +            (url "https://github.com/WoeUSB/WoeUSB.git")
> > +            (commit commit)))
> > +      (file-name (git-file-name name version))
> > +      (sha256
> > +       (base32 "05ghja2rpn4kqak9yll398na54dscsfnm3z5f2pi54lan98wzimh"))))
> > +      (build-system trivial-build-system)
> > +      (inputs
> > +       (list ntfs-3g grub ncurses parted coreutils util-linux wimlib))
> > +      (arguments
> > +       `(#:modules ((guix build utils))
> > +         #:builder
> > +         (begin
> > +           (use-modules (guix build utils))
> > +           ;; copy source
> > +           (copy-recursively (assoc-ref %build-inputs "source") ".")
> > +           ;; patch source
> > +           (substitute* "sbin/woeusb"
> > +             (("tput sgr0") (string-append (assoc-ref %build-inputs "ncurses")
> > +                                           "/bin/tput"
> > +                                           " sgr0"))
> > +             (("parted --script")
> > +              (string-append (assoc-ref %build-inputs "parted")
> > +                             "/sbin/parted --script"))
> > +             (("parted \\\\")
> > +              (string-append (assoc-ref %build-inputs "parted")
> > +                             "/sbin/parted \\"))
> > +             (("grub-install") (string-append (assoc-ref %build-inputs "grub")
> > +                                              "/sbin/grub-install"))
> > +             (("command -v mkntfs") (string-append
> > +                                     "command -v "
> > +                                     (assoc-ref %build-inputs "ntfs-3g")
> > +                                     "/sbin/mkntfs"))
> > +             (("command_mkntfs_ref=mkntfs") (string-append
> > +                                             "command_mkntfs_ref="
> > +                                             (assoc-ref %build-inputs "ntfs-3g")
> > +                                             "/sbin/mkntfs"))
> > +             (("readlink \\\\") (string-append
> > +                                 (assoc-ref %build-inputs "coreutils")
> > +                                 "/bin/readlink \\"))
> > +             (("wimlib-imagex") (string-append
> > +                                 (assoc-ref %build-inputs "wimlib")
> > +                                 "/bin/wimlib-imagex"))
> > +             ;; could not find partprobe package
> > +             ;; as i see this command never used in the program
> > +             (("partprobe \\\\") "\\"))
> > +           ;; install phase
> > +           (install-file "sbin/woeusb" (string-append %output "/bin"))
> > +           #t)))
> > +      (home-page "https://github.com/WoeUSB/WoeUSB")
> > +      (synopsis "A Microsoft Windows® USB installation media preparer for GNU+Linux")
> > +      (description "Very usefull package for anyone who wants to make a bootable Windows® USB stick
> > +using free and open source operating system.")
> > +      (license license:gpl3+))))
> > +
> >  (define-public dmidecode
> >    (package
> >      (name "dmidecode")
>
> Hi Adam,
>
> Does this build for you locally? According to QA, grub is undefined, so
> maybe there's an import missing.
>
> Thanks,
>
> Chris
diff mbox series

Patch

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 604cd70..6b971e8 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -2388,6 +2388,71 @@  (define-public wakelan
 network, which causes enabled computers to power on.")
     (license license:gpl2+)))
 
+(define-public woeusb
+  (let ((revision "0")
+        ;; named branch is outdated
+        (commit "34b400d99d3c4089f487e1d4f7d71970b2d4429e"))
+    (package
+      (name "woeusb")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+	 (method git-fetch)
+	 (uri (git-reference
+	       (url "https://github.com/WoeUSB/WoeUSB.git")
+	       (commit commit)))
+	 (file-name (git-file-name name version))
+	 (sha256
+	  (base32 "05ghja2rpn4kqak9yll398na54dscsfnm3z5f2pi54lan98wzimh"))))
+      (build-system trivial-build-system)
+      (inputs
+       (list ntfs-3g grub ncurses parted coreutils util-linux wimlib))
+      (arguments
+       `(#:modules ((guix build utils))
+         #:builder
+         (begin
+           (use-modules (guix build utils))
+           ;; copy source
+           (copy-recursively (assoc-ref %build-inputs "source") ".")
+           ;; patch source
+           (substitute* "sbin/woeusb"
+             (("tput sgr0") (string-append (assoc-ref %build-inputs "ncurses")
+                                           "/bin/tput"
+                                           " sgr0"))
+             (("parted --script")
+              (string-append (assoc-ref %build-inputs "parted")
+                             "/sbin/parted --script"))
+             (("parted \\\\")
+              (string-append (assoc-ref %build-inputs "parted")
+                             "/sbin/parted \\"))
+             (("grub-install") (string-append (assoc-ref %build-inputs "grub")
+                                              "/sbin/grub-install"))
+             (("command -v mkntfs") (string-append
+                                     "command -v "
+                                     (assoc-ref %build-inputs "ntfs-3g")
+                                     "/sbin/mkntfs"))
+             (("command_mkntfs_ref=mkntfs") (string-append
+                                             "command_mkntfs_ref="
+                                             (assoc-ref %build-inputs "ntfs-3g")
+                                             "/sbin/mkntfs"))
+             (("readlink \\\\") (string-append
+                                 (assoc-ref %build-inputs "coreutils")
+                                 "/bin/readlink \\"))
+             (("wimlib-imagex") (string-append
+                                 (assoc-ref %build-inputs "wimlib")
+                                 "/bin/wimlib-imagex"))
+             ;; could not find partprobe package
+             ;; as i see this command never used in the program
+             (("partprobe \\\\") "\\"))
+           ;; install phase
+           (install-file "sbin/woeusb" (string-append %output "/bin"))
+           #t)))
+      (home-page "https://github.com/WoeUSB/WoeUSB")
+      (synopsis "A Microsoft Windows® USB installation media preparer for GNU+Linux")
+      (description "Very usefull package for anyone who wants to make a bootable Windows® USB stick
+using free and open source operating system.")
+      (license license:gpl3+))))
+
 (define-public dmidecode
   (package
     (name "dmidecode")