diff mbox series

[bug#65011] gnu: Add xwinwrap.

Message ID DU2P193MB2132A3E5CE48BB7E1B54A540F30BA@DU2P193MB2132.EURP193.PROD.OUTLOOK.COM
State New
Headers show
Series [bug#65011] gnu: Add xwinwrap. | expand

Commit Message

Sergio Pastor Pérez Aug. 2, 2023, 11:01 a.m. UTC
* gnu/packages/xdisorg.scm (xwinwrap): New variable.
---
Note that this is a fork of xwinwrap.

 gnu/packages/xdisorg.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)


base-commit: 5aceacac65784bd2e1fd12304f965ae6026de49d
prerequisite-patch-id: c56db9fa7fc4e07452dea53f2d450bd83abbbc1a
prerequisite-patch-id: 3e6318d61f2efa01f4435152f2139eef8f72572c
prerequisite-patch-id: 1b23c59bab92820a1e102137909922f4d71ed8f9
prerequisite-patch-id: 78a291411f8d86beabbf6d49df0cc78702ad4e65
prerequisite-patch-id: 579224b39cae7869ce11e2e8dba046b5eef606c7
prerequisite-patch-id: f1f62fd5d83d603ca35c17071e615352e90753e3
prerequisite-patch-id: 1843bca37f83e494be67c24e975727fb1fe1248c
prerequisite-patch-id: 5cc0d6cd16ae2ab21c444ed9cabfeea5615e8cda
prerequisite-patch-id: 92a3fab6e4174a4d4877fc5b426752df81e4df39
prerequisite-patch-id: ebf3fd3a8bb02f7dc5cdf504f63d5028b29fe69e
prerequisite-patch-id: 863acbffb59c3b17fb4ea7e11710cbd793c0778d

Comments

Jean Pierre De Jesus DIAZ Aug. 2, 2023, 1:59 p.m. UTC | #1
Hello Sergio,

>+    (version "0.0.6")

It seems that the project doesn't contain any tag in the upstream
repository and doesn't contain mention of any version released.

So in that case the common convention is to use 0.0.0 as the version
and also it could use (git-version "0.0.0" revision commit) where
revision usually starts at 0 and commit is the commit used for the
source like other packages do.  For example:

```
(define-public xwinwrap
  (let ((revision "0")
        (commit "ec32e9b72539de7e1553a4f70345166107b431f7"))
    (package
      (version (git-version "0.0.0" revision commit)))))
```

And on the origin's git-reference the string can be simply replaced by
the commit variable defined at the top of the package.

>+     '(#:phases (modify-phases %standard-phases

The new style for defining packages is using G-Expressions, so
it would be expressed as:

```
(list #:phases
      #~(modify-phases %standard-phases
          ...))
```


When using G-Exps, this:

>+                      (mkdir-p (string-append %output "/bin")w

Also becomes:

```
(mkdir-p (string-append #$output "/bin"))
```

So, %output can be replaced by #$output in general.

>+                  (delete 'check)

This can be removed and instead the argument `#:tests? #f` could be
added, along with an explanation for the motive, i.e. no tests.

Cheers,

—
Jean-Pierre De Jesus DIAZ
diff mbox series

Patch

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index da5ca76e10..fff1bddd23 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -3301,6 +3301,40 @@  (define-public jumpapp
     (home-page "https://github.com/mkropat/jumpapp")
     (license license:expat)))
 
+(define-public xwinwrap
+  (package
+    (name "xwinwrap")
+    (version "0.0.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/r00tdaemon/xwinwrap")
+                    (commit "ec32e9b72539de7e1553a4f70345166107b431f7")))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0l3ng6w8jl9mryk5nx61qpd1bv5yqm7cnwy2s3vcy88n04ggbap9"))))
+    (build-system gnu-build-system)
+    (inputs (list libx11 libxrender libxext))
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'fix-hardcoded-paths
+                    (lambda _
+                      (substitute* "Makefile"
+                        (("/usr/local")
+                         %output))))
+                  (delete 'configure)
+                  (delete 'check)
+                  (add-before 'install 'create-missing-dirs
+                    (lambda _
+                      (mkdir-p (string-append %output "/bin")))))))
+    (home-page "https://github.com/r00tdaemon/xwinwrap")
+    (synopsis "X utility that allows sticking most
+of apps to a desktop background")
+    (description "Fork of xwinwrap.  Xwinwrap allows you to stick most
+of the apps to your desktop background.")
+    (license license:gpl3+)))
+
 (define-public xkbset
   (package
     (name "xkbset")